Thank you for your interest in contributing to Watchkeeper! This document provides guidelines and workflows for contributing to the project.
- Fork the repository
- Clone your fork locally
- Create a Python virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt
- Use camelCase for variable and function names
- Use CapitalCamelCase for class names
- Write self-documenting code with descriptive names
- Include units in variable/function names when it improves readability
- Avoid nesting more than 3 levels deep
- Write tests for all new code
- Follow PEP 8 guidelines (enforced by ruff)
-
Create a new branch from
dev:- For new features:
feat/feature-name - For bug fixes:
fix/bug-name
- For new features:
-
Make your changes, following these guidelines:
- Each commit should be a complete, reviewable unit
- Write clear commit messages
- Include tests for new functionality
- Update documentation as needed
-
Before submitting:
- Run tests locally:
pytest - Check code formatting:
ruff format --check . - Run type checking:
mypy . - Run security checks:
bandit -r src/
- Run tests locally:
-
Push your changes and create a pull request to the
devbranch
- All PRs must target the
devbranch - PRs must pass all automated checks:
- Linting (ruff)
- Type checking (mypy)
- Security checks (bandit)
- Code formatting (ruff)
- Unit tests
- Infrastructure changes (changes to
.githubdirectory) are not accepted from forks - The project aims to be resource-efficient for systems like Raspberry Pi Zero W
- Core functionality should remain lightweight and modular
If you need help or have questions:
- Check existing issues and documentation
- Open a new issue with:
- Clear description of your question/problem
- Steps to reproduce if applicable
- Relevant system information
- Any error messages or logs
Thank you for contributing to Watchkeeper!