Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cowprotocol/solver-rewards/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before cloning the repository, make sure you have the following installed:- Python >= 3.10 — check with
python3 --version - Git — check with
git --version - pip-tools (optional, for dependency management) —
pip install pip-tools
Installation
Install dependencies
Run the The Makefile uses a sentinel file
install target. It creates a venv/ virtualenv, upgrades pip, and installs all packages from requirements.txt.venv/.install so subsequent make invocations skip reinstalling unless requirements.txt changes.Code style
The project follows the Black code formatter with no custom configuration — Black’s defaults apply.Linting
Pylint is used to lint thesrc/ package. The project ships a minimal .pylintrc that disables two checks:
fixme— allowsTODO/FIXMEcomments in sourcelogging-fstring-interpolation— allows f-strings in log calls
Type checking
Mypy runs in--strict mode against the src/ package. The mypy.ini targets Python 3.12 and sets two relaxations for the src.* namespace:
| Option | Value | Reason |
|---|---|---|
ignore_missing_imports | True | Several third-party stubs are absent |
allow_untyped_calls | True | Calls into untyped third-party code |
allow_any_generics | True | Generic aliases without type parameters |
Running all checks
make check chains formatting, linting, and type checking in a single command. Run this before opening a pull request.
Makefile reference
Managing dependencies
Direct dependencies are declared inrequirements.in. The fully-pinned requirements.txt is generated from it using pip-tools.
To add or update a dependency:
Edit requirements.in
Add the package (with an optional version constraint) to Current direct dependencies include:
requirements.in:dune-client, duneapi, web3, safe-eth-py, pandas, numpy, psycopg2-binary, SQLAlchemy, python-dotenv, requests, and dev tools black, mypy, pylint, pytest.Compile the lockfile
Compilation can take several minutes for large dependency trees or on first run. Add
-v to watch progress: