We love your input! We want to make contributing to CodeRatchet as easy and transparent as possible.
- Fork the repo and create your branch from
main. - Set up your development environment:
python -m venv venv source venv/bin/activate # or `venv\Scripts\activate` on Windows pip install -e ".[dev]"
- Make your changes.
- Run tests and ensure they pass:
pytest
- Run code quality checks:
black . isort . mypy . pylint coderatchet
- Submit a pull request.
- Update documentation for any new features.
- Add tests for new functionality.
- Update the README.md if needed.
- The PR will be merged once you have the sign-off of a maintainer.
We use several tools to maintain code quality:
- Black: Code formatting
- isort: Import sorting
- mypy: Type checking
- pylint: Code analysis
Configuration for these tools is in pyproject.toml.
- Write unit tests for new features
- Maintain test coverage above 80%
- Use meaningful test names and docstrings
- Group related tests in test classes
- Keep docstrings up to date
- Follow Google docstring format
- Update relevant documentation files
- Add examples for new features
When creating new ratchet tests:
- Follow the pattern in
examples/custom_ratchets.py - Include both match and non-match examples
- Write thorough tests
- Document usage and edge cases
Report bugs by opening an issue:
- Describe the bug
- Include steps to reproduce
- Show expected vs actual behavior
- Include relevant code snippets
- Specify your environment
Feature requests are welcome:
- Check it hasn't been requested before
- Open an issue describing the feature
- Explain why it would be useful
- Provide example usage if possible
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
By contributing, you agree that your contributions will be licensed under the MIT License.