Thanks for your interest in contributing! Here's how to get started.
# Clone the repo
git clone https://github.com/GeoRouv/crawldiff.git
cd crawldiff
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install in development mode with all dependencies
pip install -e ".[dev]"# Run tests
pytest tests/ -q
# Run linter
ruff check src/ tests/
# Run type checker
mypy src/crawldiff --strict
# Auto-fix lint issues
ruff check src/ tests/ --fixAll three checks (tests, ruff, mypy) must pass before merging. CI runs them automatically on every push and PR.
src/crawldiff/
├── cli.py # Typer app entry point
├── commands/ # CLI command implementations
├── core/ # Business logic (cloudflare API, differ, storage, summarizer)
├── output/ # Output formatters (terminal, JSON, markdown)
└── utils/ # Shared utilities (config, URL normalization, duration parsing)
tests/ # Mirrors src/ structure
- Python 3.12+ — use modern syntax (
X | Yunions, etc.) - Type hints on all function signatures — enforced by
mypy --strict snake_caseeverywhere (PEP 8)- Functions over classes; dataclasses for structured data
async/awaitfor all I/O- User-facing errors via
rich, not raw tracebacks
- Use
pytestwithpytest-asynciofor async tests - Use
respxto mockhttpxrequests - Use the
tmp_dbfixture fromconftest.pyfor database tests - Tests should be fast and not require network access
- Fork the repo and create a feature branch
- Make your changes
- Ensure all checks pass:
pytest && ruff check src/ tests/ && mypy src/crawldiff --strict - Open a pull request with a clear description of what changed and why
Open an issue at github.com/GeoRouv/crawldiff/issues with:
- What you expected to happen
- What actually happened
- Steps to reproduce
crawldiff --versionoutput