Guardian Developer Guide
Welcome to the Guardian developer documentation! This guide explains how the project is developed, what is expected from contributors, and how you can get started contributing to Guardian.
Contribution Guidelines
- Code style: Follow PEP8 and use type hints where possible. All code should be well-documented with clear docstrings in English.
- Pre-commit hooks: You must install lefthook to ensure code quality and formatting. See below for setup instructions.
- Tests: All new features and bugfixes should include relevant tests.
- Documentation: Update or add documentation for any new modules, features, or CLI commands.
- Pull requests: Make sure your branch is up to date with
main
and all checks pass before submitting a PR.
Project Setup & Workflow
Guardian uses uv for Python environment and dependency management. Each subproject
has its own pyproject.toml
and isolated virtualenv.
Basic uv Commands
Create a virtual environment for a subproject:
Install dependencies:
Upgrade dependencies:
Run scripts:
Lefthook Setup
Guardian uses lefthook for git pre-commit hooks (linting, formatting, etc.).
Install lefthook hooks for your repo:
This ensures all code is checked before commits and PRs.
Building Documentation with MkDocs
Guardian uses MkDocs for user and developer documentation.
To build and serve the docs locally:
The documentation will be available at http://localhost:8000
How to Contribute
- Fork the repository and clone your fork.
- Create a new branch for your feature or fix.
- Set up your environment with uv and lefthook as described above.
- Make your changes, add tests and documentation.
- Run all checks and make sure everything passes.
- Submit a pull request with a clear description of your changes.
Community & Support
If you have questions or want to discuss ideas, open an issue or join our community chat (see the main README for links).
Thank you for helping make Guardian better for families everywhere!