This document outlines the recommended development workflow for contributing to this project. Following these guidelines ensures consistency and quality across the codebase.
Our development workflow is designed to:
- Maintain high code quality
- Ensure consistent code style
- Prevent bugs and issues before they reach production
- Streamline the development process
- Facilitate collaboration between team members
Before you begin development, ensure you have:
- Forked and cloned the repository
- Set up your development environment as described in Getting Started
- Installed pre-commit hooks with
uv run pre-commit install - Familiarized yourself with the project structure
When making changes:
- Follow the project's code style guidelines
- Write tests for new functionality
- Update documentation as needed
- Keep commits small and focused
- Use meaningful commit messages
Before submitting your changes, run tests locally:
# Run all tests
poe preOur CI pipeline automatically:
- Runs tests on all PRs
- Checks code quality
- Verifies documentation builds
- Ensures all pre-commit hooks pass
Releases are managed by maintainers and follow these steps:
- Version bump according to Semantic Versioning
- Changelog update
- Tag creation
- Release build and deployment
- Write clean, readable code
- Follow the principle of least surprise
- Keep functions small and focused
- Use meaningful variable and function names
- Add comments for complex logic
- Write tests for all new features
- Maintain high test coverage
- Test edge cases
- Use parameterized tests for similar test cases
- Mock external dependencies
- Update documentation for API changes
- Add examples for new features
- Keep README and other docs up to date
- Document complex algorithms and decisions
- Keep commits atomic and focused
- Write descriptive commit messages
- Rebase feature branches on main regularly
- Squash commits before merging if needed
If pre-commit hooks fail:
- Read the error message carefully
- Fix the issues locally
- Stage the changes
- Try committing again
If you need to bypass hooks temporarily:
git commit -m "your message" --no-verify # (1)- This bypasses pre-commit hooks, but should only be used in exceptional cases
When encountering merge conflicts:
git checkout main # (1)
git pull # (2)
git checkout your-branch # (3)
git rebase main # (4)
# Resolve conflicts
git add . # (5)
git rebase --continue # (6)
git push --force-with-lease origin your-branch # (7)- Switch to the main branch
- Pull the latest changes
- Switch back to your feature branch
- Rebase your branch on main
- Stage resolved conflicts
- Continue the rebase process
- Force push with lease for safety