Development Guide¶
This guide covers the local development workflow for Onion Peeler, focusing on dependency management and testing strategies.
Dependency Management¶
We use uv as our primary package manager for its speed and robust environment isolation. However, standard venv and pip are still supported.
1. Installation & Syncing¶
First, ensure you have your chosen tool installed and the environment synchronized.
If you haven't installed uv yet:
To install the core project dependencies and create a virtual environment:
2. Dependency Groups¶
Onion Peeler uses optional dependency groups (e.g., dev for testing, docs for documentation).
3. Running Commands¶
Use these commands to execute scripts or CLIs within the project's environment.
Testing¶
We use pytest for unit and integration testing.
Running All Tests¶
Testing Specific Components¶
Connectivity & Quality¶
Tor Connectivity Test¶
To verify that your local or Dockerized Tor service is reachable by the Scrapy engine:
Linting and Formatting¶
We use Ruff for maintaining code quality.
- Check for errors:
make lint - Auto-fix formatting:
make format