Skip to content

Commit 04d796b

Browse files
authored
v0.4
2 parents d8fe909 + 95ad284 commit 04d796b

109 files changed

Lines changed: 9998 additions & 2726 deletions

File tree

Some content is hidden

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

.bandit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ skips:
66
- B404 # Using subprocess library
77
- B602 # subprocess call with shell=True identified
88
- B110 # Try, Except, Pass detected.
9-
- B104 # Possible binding to all interfaces.
9+
- B104 # Possible binding to all interfaces.
10+
- B301 # Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
11+
- B108 # Probable insecure usage of temp file/directory.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Documentation issue
2+
description: Report incorrect, unclear, or missing documentation.
3+
labels: [documentation]
4+
body:
5+
- type: checkboxes
6+
attributes:
7+
label: Have you searched if there an existing issue for this?
8+
description: Please search [existing issues](https://github.com/D4Vinci/Scrapling/labels/documentation).
9+
options:
10+
- label: I have searched the existing issues
11+
required: true
12+
13+
- type: input
14+
attributes:
15+
label: "Page URL"
16+
description: "Link to the documentation page with the issue."
17+
placeholder: "https://scrapling.readthedocs.io/en/latest/..."
18+
validations:
19+
required: true
20+
21+
- type: dropdown
22+
attributes:
23+
label: "Type of issue"
24+
options:
25+
- Incorrect information
26+
- Unclear or confusing
27+
- Missing information
28+
- Typo or formatting
29+
- Broken link
30+
- Other
31+
default: 0
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
attributes:
37+
label: "Description"
38+
description: "Describe what's wrong and what you expected to find."
39+
validations:
40+
required: true

.github/workflows/code-quality.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050
- name: Install dependencies
5151
run: |
5252
python -m pip install --upgrade pip
53-
pip install bandit[toml] ruff vermin
53+
pip install bandit[toml] ruff vermin mypy pyright
54+
pip install -e ".[all]"
55+
pip install lxml-stubs
5456
5557
- name: Run Bandit (Security Linter)
5658
id: bandit
@@ -85,6 +87,22 @@ jobs:
8587
vermin -t=3.10- --violations --eval-annotations --no-tips scrapling/
8688
echo "::endgroup::"
8789
90+
- name: Run Mypy (Static Type Checker)
91+
id: mypy
92+
continue-on-error: true
93+
run: |
94+
echo "::group::Mypy - Static Type Checker"
95+
mypy scrapling/
96+
echo "::endgroup::"
97+
98+
- name: Run Pyright (Static Type Checker)
99+
id: pyright
100+
continue-on-error: true
101+
run: |
102+
echo "::group::Pyright - Static Type Checker"
103+
pyright scrapling/
104+
echo "::endgroup::"
105+
88106
- name: Check results and create summary
89107
if: always()
90108
run: |
@@ -126,6 +144,22 @@ jobs:
126144
all_passed=false
127145
fi
128146
147+
# Check Mypy
148+
if [ "${{ steps.mypy.outcome }}" == "success" ]; then
149+
echo "✅ **Mypy (Type Checker)**: Passed" >> $GITHUB_STEP_SUMMARY
150+
else
151+
echo "❌ **Mypy (Type Checker)**: Failed" >> $GITHUB_STEP_SUMMARY
152+
all_passed=false
153+
fi
154+
155+
# Check Pyright
156+
if [ "${{ steps.pyright.outcome }}" == "success" ]; then
157+
echo "✅ **Pyright (Type Checker)**: Passed" >> $GITHUB_STEP_SUMMARY
158+
else
159+
echo "❌ **Pyright (Type Checker)**: Failed" >> $GITHUB_STEP_SUMMARY
160+
all_passed=false
161+
fi
162+
129163
echo "" >> $GITHUB_STEP_SUMMARY
130164
131165
if [ "$all_passed" == "true" ]; then

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
site/*
2+
3+
# AI related files
4+
.claude/*
5+
CLAUDE.md
6+
17
# cached files
28
__pycache__/
39
*.py[cod]

.readthedocs.yaml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
# Read the Docs configuration file
2-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
1+
# See https://docs.readthedocs.com/platform/stable/intro/zensical.html for details
2+
# Example: https://github.com/readthedocs/test-builds/tree/zensical
33

4-
# Required
54
version: 2
65

7-
# Set the OS, Python version, and other tools you might need
86
build:
97
os: ubuntu-24.04
108
apt_packages:
119
- pngquant
1210
tools:
1311
python: "3.13"
14-
15-
# Build documentation with Mkdocs
16-
mkdocs:
17-
configuration: mkdocs.yml
18-
19-
# Optionally, but recommended,
20-
# declare the Python requirements required to build your documentation
21-
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
22-
python:
12+
jobs:
2313
install:
24-
- requirements: docs/requirements.txt
25-
14+
- pip install -r docs/requirements.txt
15+
- pip install ".[all]"
16+
build:
17+
html:
18+
- zensical build
19+
post_build:
20+
- mkdir -p $READTHEDOCS_OUTPUT/html/
21+
- cp --recursive site/* $READTHEDOCS_OUTPUT/html/

0 commit comments

Comments
 (0)