Skip to content

Commit df8dcd6

Browse files
authored
Merge pull request #13 from ScrapeGraphAI/workflows
create first mini workflow
2 parents fc68765 + c90a790 commit df8dcd6

File tree

6 files changed

+208
-0
lines changed

6 files changed

+208
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
6+
# packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
10+
name: 'Dependency review'
11+
on:
12+
pull_request:
13+
branches: [ "main" ]
14+
15+
# If using a dependency submission action in this workflow this permission will need to be set to:
16+
#
17+
# permissions:
18+
# contents: write
19+
#
20+
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
21+
permissions:
22+
contents: read
23+
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
24+
pull-requests: write
25+
26+
jobs:
27+
dependency-review:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: 'Checkout repository'
31+
uses: actions/checkout@v4
32+
- name: 'Dependency Review'
33+
uses: actions/dependency-review-action@v4
34+
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
35+
with:
36+
comment-summary-in-pr: always
37+
# fail-on-severity: moderate
38+
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
39+
# retry-on-snapshot-warnings: true

.github/workflows/pylint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
push:
3+
paths:
4+
- 'scrapegraphai/**'
5+
- '.github/workflows/pylint.yml'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Install the latest version of rye
13+
uses: eifinger/setup-rye@v3
14+
- name: Install dependencies
15+
run: rye sync --no-lock
16+
- name: Analysing the code with pylint
17+
run: rye run pylint-ci
18+
- name: Check Pylint score
19+
run: |
20+
pylint_score=$(rye run pylint-score-ci | grep 'Raw metrics' | awk '{print $4}')
21+
if (( $(echo "$pylint_score < 8" | bc -l) )); then
22+
echo "Pylint score is below 8. Blocking commit."
23+
exit 1
24+
else
25+
echo "Pylint score is acceptable."
26+
fi

pyproject.toml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[project]
2+
name = "Scrape-schema"
3+
version = "0.0.1"
4+
description = "library for creating ontologies from documents"
5+
authors = [
6+
{ name = "Marco Vinciguerra", email = "mvincig11@gmail.com" },
7+
{ name = "Marco Perini", email = "perinim.98@gmail.com" },
8+
{ name = "Lorenzo Padoan", email = "lorenzo.padoan977@gmail.com" }
9+
]
10+
11+
dependencies = [
12+
"certifi==2024.7.4",
13+
"charset-normalizer==3.3.2",
14+
"idna==3.8",
15+
"pdf2image==1.17.0",
16+
"pillow==10.4.0",
17+
"python-dotenv==1.0.1",
18+
"requests==2.32.3",
19+
"urllib3==2.2.2"
20+
]
21+
22+
license = "MIT"
23+
readme = "README.md"
24+
homepage = "https://scrapegraphai.com/"
25+
repository = "https://github.com/ScrapeGraphAI/ScrapeSchema"
26+
documentation = ""
27+
keywords = [
28+
"scrapegraph",
29+
"scrapegraphai",
30+
"langchain",
31+
"ai",
32+
"artificial intelligence",
33+
"gpt",
34+
"machine learning",
35+
"rag",
36+
"nlp",
37+
"natural language processing",
38+
"openai",
39+
"scraping",
40+
"web scraping",
41+
"web scraping library",
42+
"web scraping tool",
43+
"webscraping",
44+
"graph",
45+
]
46+
classifiers = [
47+
"Intended Audience :: Developers",
48+
"Topic :: Software Development :: Libraries :: Python Modules",
49+
"Programming Language :: Python :: 3",
50+
"Operating System :: OS Independent",
51+
]
52+
requires-python = ">=3.9,<4.0"
53+
54+
[project.optional-dependencies]
55+
burr = ["burr[start]==0.22.1"]
56+
docs = ["sphinx==6.0", "furo==2024.5.6"]
57+
58+
[build-system]
59+
requires = ["hatchling"]
60+
build-backend = "hatchling.build"
61+
62+
[tool.rye]
63+
managed = true
64+
dev-dependencies = [
65+
"pytest==8.0.0",
66+
"pytest-mock==3.14.0",
67+
"-e file:.[burr]",
68+
"-e file:.[docs]",
69+
"pylint>=3.2.5",
70+
]
71+
72+
[tool.rye.scripts]
73+
pylint-local = "pylint scrapegraphai/**/*.py"
74+
pylint-ci = "pylint --disable=C0114,C0115,C0116 --exit-zero scrapegraphai/**/*.py"
75+
update-requirements = "python 'manual deployment/autorequirements.py'"

0 commit comments

Comments
 (0)