Skip to content

Commit b326886

Browse files
authored
Merge branch '88-blockscraper-implementation' into asdt
2 parents edfaf3f + e1b9d69 commit b326886

File tree

159 files changed

+7989
-3464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+7989
-3464
lines changed

.github/workflows/pylint.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: Pylint
2-
31
on: [push]
42

53
jobs:
@@ -20,4 +18,13 @@ jobs:
2018
pip install pylint
2119
pip install -r requirements.txt
2220
- name: Analysing the code with pylint
23-
run: pylint --disable=C0114,C0115,C0116 --exit-zero scrapegraphai/**/*.py scrapegraphai/*.py
21+
run: pylint --disable=C0114,C0115,C0116 --exit-zero scrapegraphai/**/*.py scrapegraphai/*.py
22+
- name: Check Pylint score
23+
run: |
24+
pylint_score=$(pylint --disable=all --enable=metrics --output-format=text scrapegraphai/**/*.py scrapegraphai/*.py | grep 'Raw metrics' | awk '{print $4}')
25+
if (( $(echo "$pylint_score < 8" | bc -l) )); then
26+
echo "Pylint score is below 8. Blocking commit."
27+
exit 1
28+
else
29+
echo "Pylint score is acceptable."
30+
fi

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- pre/*
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install git
14+
run: |
15+
sudo apt update
16+
sudo apt install -y git
17+
- name: Install Python Env and Poetry
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.9'
21+
- run: pip install poetry
22+
- name: Install Node Env
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
- name: Checkout
27+
uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
persist-credentials: false
31+
- name: Build app
32+
run: |
33+
poetry install
34+
poetry build
35+
id: build_cache
36+
if: success()
37+
- name: Cache build
38+
uses: actions/cache@v2
39+
with:
40+
path: ./dist
41+
key: ${{ runner.os }}-build-${{ hashFiles('dist/**') }}
42+
if: steps.build_cache.outputs.id != ''
43+
44+
release:
45+
name: Release
46+
runs-on: ubuntu-latest
47+
needs: build
48+
environment: development
49+
if: |
50+
github.event_name == 'push' && github.ref == 'refs/heads/main' ||
51+
github.event_name == 'push' && github.ref == 'refs/heads/pre/beta' ||
52+
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'main' ||
53+
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged && github.event.pull_request.base.ref == 'pre/beta'
54+
permissions:
55+
contents: write
56+
issues: write
57+
pull-requests: write
58+
id-token: write
59+
steps:
60+
- name: Checkout repo
61+
uses: actions/[email protected]
62+
with:
63+
fetch-depth: 0
64+
persist-credentials: false
65+
- name: Semantic Release
66+
uses: cycjimmy/[email protected]
67+
with:
68+
semantic_version: 23
69+
extra_plugins: |
70+
semantic-release-pypi@3
71+
@semantic-release/git
72+
@semantic-release/commit-analyzer@12
73+
@semantic-release/release-notes-generator@13
74+
@semantic-release/github@10
75+
@semantic-release/changelog@6
76+
conventional-changelog-conventionalcommits@7
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ venv/
2828
*.sqlite
2929
*.google-cookie
3030
examples/graph_examples/ScrapeGraphAI_generated_graph
31-
examples/**/*.csv
32-
examples/**/*.json
31+
examples/**/result.csv
32+
examples/**/result.json
3333
main.py
34+
poetry.lock
35+
36+
# lock files
37+
*.lock
38+
poetry.lock

.releaserc.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
plugins:
2+
- - "@semantic-release/commit-analyzer"
3+
- preset: conventionalcommits
4+
- - "@semantic-release/release-notes-generator"
5+
- writerOpts:
6+
commitsSort:
7+
- subject
8+
- scope
9+
preset: conventionalcommits
10+
presetConfig:
11+
types:
12+
- type: feat
13+
section: Features
14+
- type: fix
15+
section: Bug Fixes
16+
- type: chore
17+
section: chore
18+
- type: docs
19+
section: Docs
20+
- type: style
21+
hidden: true
22+
- type: refactor
23+
section: Refactor
24+
- type: perf
25+
section: Perf
26+
- type: test
27+
section: Test
28+
- type: build
29+
section: Build
30+
- type: ci
31+
section: CI
32+
- "@semantic-release/changelog"
33+
- "semantic-release-pypi"
34+
- "@semantic-release/github"
35+
- - "@semantic-release/git"
36+
- assets:
37+
- CHANGELOG.md
38+
- pyproject.toml
39+
message: |-
40+
ci(release): ${nextRelease.version} [skip ci]
41+
42+
${nextRelease.notes}
43+
branches:
44+
#child branches coming from tagged version for bugfix (1.1.x) or new features (1.x)
45+
#maintenance branch
46+
- name: "+([0-9])?(.{+([0-9]),x}).x"
47+
channel: "stable"
48+
#release a production version when merging towards main
49+
- name: "main"
50+
channel: "stable"
51+
#prerelease branch
52+
- name: "pre/beta"
53+
channel: "dev"
54+
prerelease: "beta"
55+
debug: true
56+

0 commit comments

Comments
 (0)