Contributing¶
Thank you for your interest in contributing to the Quantize project! This document provides guidelines and instructions for contributing.
Setting Up Development Environment¶
Fork the repository on GitHub.
Clone your fork locally:
git clone https://github.com/yourusername/quantize.git cd quantize
Set up a development environment:
python setup_venv.pyThis will create a virtual environment and install the package in development mode.
Install development dependencies:
pip install -e ".[dev]"
Development Workflow¶
Create a branch for your changes:
git checkout -b feature/your-feature-name
Make your changes to the codebase.
Run the tests to ensure your changes don’t break existing functionality:
pytest
Format your code using Black:
black .Sort imports using isort:
isort .Commit your changes:
git commit -m "Add your meaningful commit message here"
Push your changes to your fork:
git push origin feature/your-feature-name
Create a pull request from your fork to the main repository.
Code Style¶
This project follows the Black code style. Please ensure your code is formatted with Black before submitting a pull request.
The project also uses isort to sort imports according to the Black profile.
Testing¶
All new features should include tests. This project uses pytest for testing.
To run the tests:
pytest
Documentation¶
All new features should include documentation. This project uses Sphinx for documentation.
To build the documentation:
Install Sphinx and the Read the Docs theme:
pip install sphinx sphinx_rtd_theme
Build the documentation:
cd docs make html
View the documentation by opening
docs/build/html/index.htmlin your browser.
Pull Request Guidelines¶
Include a clear and descriptive title.
Include a description of the changes made.
Ensure all tests pass.
Ensure code is formatted with Black and imports are sorted with isort.
Update documentation if necessary.
Reference any related issues.
Feature Requests and Bug Reports¶
If you have a feature request or have found a bug, please open an issue on GitHub.
When reporting a bug, please include:
A clear and descriptive title.
A description of the expected behavior.
A description of the actual behavior.
Steps to reproduce the bug.
Your environment information (Python version, OS, etc.).
License¶
By contributing to this project, you agree that your contributions will be licensed under the project’s MIT license.