Contributing¶
Thanks for your interest in scrape-do-python.
This page covers local setup, the test/lint pipeline, the docs build, and PR conventions.
Code of Conduct
By participating in this project you agree to abide by the Code of Conduct
Local Setup¶
Python Versions
- Requires Python
3.9+ - Unit tests run on a matrix of
3.9/3.10/3.11/3.12/3.13 - Lint, type-checking, and integration tests run on
3.13
Running Tests¶
-
Runs on Every
PushandPR -
Uses
respxto mock HTTP calls -
Fast and don't need any external dependencies
-
Runs on Every
PRandRelease -
Uses a real API token to run live tests against
Scrape.do -
Much slower than unit tests
Logs
-
All integration test runs are logged according to the
Conftest Logging Setup -
Log files are saved at
scrape_do/logs/integration_{timestamp}.log
SCRAPE_DO_API_KEY
The entire suite is SKIPPED when SCRAPE_DO_API_KEY is not set as an environment variable
Test Target
-
Defaults to
Scrape.do's Documented Playground Target -
Override by setting the
HTTPBIN_BASEenvironment variable to a different URL -
Plugins use their respective default URLs
PRs
- Both the
unitandintegrationsuites must pass for a PR to be merged - CI runs both on every PR
Lint & Type-Check¶
CI Gate
Documentation¶
The docs site is built with mkdocs-material and auto-generates the API reference from docstrings via mkdocstrings
Keep The API Reference Updated
-
New public symbols should ship with a
Google-Style Docstringin the source. -
mkdocstringspicks them up automatically to build the documentation
Pull Request Guidelines¶
-
One concern per PR
-
Refactors and feature additions belong in separate PRs from bug fixes
-
Add
unittests for any new SDK behaviour or bug fix -
Integration tests are reserved for changes that interact with
Scrape.do's actual gateway behavior -
Update
CHANGELOGunder a## [Unreleased]section (create the section if it doesn't exist) -
One bullet under
### Added/### Changed/### Fixed/### Removedas appropriate -
Update docstrings to keep this site's documentation updated
CHANGELOG Entries
-
Pre-1.0, theCHANGELOGis the only source of truth for "what changed and why" between releases -
PR titles and commit messages are searchable but not consolidated
-
CHANGELOGis meant to provide users with relevant information about changes so that they can decide whether or not to upgrade
Reporting Bugs / Requesting Features¶
Use Templates
Security Issues
-
Don't open a public issue for security issues
-
See the
Security Policyfor private reporting channels.