Getting started
Development setup
The project is a monorepo with multiple Python packages underpython_modules/. Each package has its own pyproject.toml managed by uv.
Running tests before submitting
All three test suites must pass:Code style
- Python — code is formatted with ruff. Run
uv run ruff format .anduv run ruff check .before committing. - Type annotations — all public functions should have type annotations. Run
uv run mypy src/to check. - Docstrings — module-level docstrings explain the role of the module. Function docstrings where the behaviour is non-obvious.
Where to make changes
| Area | Location | Notes |
|---|---|---|
| Core server + handlers | python_modules/proxy-hopper/src/proxy_hopper/ | |
| Config models | proxy_hopper/config.py | Pydantic v2 — update the module docstring for any new fields |
| Auth logic | proxy_hopper/auth.py | |
| Memory backend | proxy_hopper/backend/memory.py | |
| Redis backend | python_modules/proxy-hopper-redis/ | Separate package |
| Integration test utils | python_modules/proxy-hopper-testserver/ | |
| Documentation | proxy-hopper-docs/ | Mintlify MDX |
| Helm chart | charts/proxy-hopper/ | |
| Docker examples | examples/docker-compose/ |
Adding a new config field
- Add the field to the appropriate Pydantic model in
config.py - Update the module-level docstring in
config.pywith the new field - Update Config Reference in the docs
- Add a test in
tests/test_config.py - If it’s a server field, add the corresponding env var to Environment Variables
Writing integration tests
Useproxy-hopper-testserver to write end-to-end tests against the real server stack:
Pull request process
- Create a branch from
main - Make your changes with tests
- Ensure all test suites pass
- Update documentation if you changed behaviour or added a feature
- Open a PR against
mainwith a clear description of what and why - Address any review comments
Reporting bugs
Open an issue on GitHub with:- Proxy Hopper version (
docker inspect ghcr.io/cams-data/proxy-hopper:latest | jq '.[0].Config.Labels') - Your config (with credentials redacted)
- Steps to reproduce
- Expected vs actual behaviour
- Relevant log output (use
--log-level DEBUG)