Thanks for your interest in contributing to ScraperGuard!
- Clone the repository:
git clone https://github.com/mostafam-dev/scraperguard.git
cd scraperguard- Install in development mode:
pip install -e ".[dev]"Or with uv:
uv sync --extra dev- Verify the installation:
pytest
scraperguard --help# Run all tests
pytest
# Run with coverage
pytest --cov=scraperguard --cov-report=term-missing
# Run a specific test file
pytest tests/test_health.py
# Run tests matching a pattern
pytest -k "test_schema"We use ruff for linting and formatting:
# Check for lint errors
ruff check src/ tests/
# Auto-fix lint errors
ruff check --fix src/ tests/
# Format code
ruff format src/ tests/Configuration is in pyproject.toml under [tool.ruff].
We use mypy for static type checking:
mypy src/scraperguard/Configuration is in pyproject.toml under [tool.mypy].
- Fork the repository and create a feature branch:
git checkout -b feature/my-feature-
Make your changes, ensuring:
- All tests pass (
pytest) - Code is formatted (
ruff format) - No lint errors (
ruff check) - Types check cleanly (
mypy src/scraperguard/)
- All tests pass (
-
Write tests for new functionality.
-
Commit with a clear message describing the change.
-
Open a pull request against the
mainbranch.
src/scraperguard/ # Main package source
tests/ # Test suite (mirrors src/ structure)
examples/ # Working examples and configs
docs/ # Documentation
Please open an issue on GitHub with:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Python version and OS