Thank you for your interest in contributing to this project! This document provides guidelines and instructions for contributing.
This project follows standard Python code style guidelines with some specific tooling:
- Black: For code formatting
- isort: For sorting imports
- Flake8: For code linting
- mypy: For static type checking
- Clone the repository
- Install development dependencies:
pip install black flake8 isort mypy pre-commit- Install pre-commit hooks:
pre-commit installWe use pre-commit hooks to ensure code quality before committing. The hooks will:
- Format code with Black
- Sort imports with isort
- Run Flake8 linting
- Perform type checking with mypy
- Check for common issues (trailing whitespace, file endings, etc.)
If a hook fails, the commit will be aborted. Fix the issues and try again.
A GitHub Actions workflow is set up to run these checks automatically on pull requests and pushes to the main branch. The workflow:
- Runs on any push or pull request to main/master that modifies Python files
- Installs the necessary dependencies
- Runs Black, Flake8, isort, and mypy
- Reports any issues in the GitHub interface
You can run the checks manually with the following commands:
# Format code
black app/
# Sort imports
isort app/
# Lint code
flake8 app/
# Type check
mypy --ignore-missing-imports app/- Fork the repository
- Create a feature branch
- Make your changes
- Ensure all tests pass and linting is clean
- Submit a pull request
Your pull request will be reviewed, and you may be asked to make changes before it is merged.
If you find a bug or have a feature request, please open an issue on GitHub. Please include:
- A clear description of the issue or feature
- Steps to reproduce (for bugs)
- Expected behavior
- Actual behavior
- Any relevant logs or screenshots
Thank you for contributing!