Contributing to starlette-context
Thank you for considering contributing to starlette-context! This project is open to contributions from anyone in the community.
Getting Started
Prerequisites
Python 3.10+
uv for dependency management
Setup
Fork the repository on GitHub
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/starlette-context.git cd starlette-context
Set up the development environment using uv:
uv syncInstall pre-commit hooks:
pre-commit install
Development Workflow
Running Tests
Run the entire test suite:
uv run pytest
Run tests with coverage report:
uv run pytest --cov=starlette_context
Code Style
This project uses several tools to ensure code quality:
You can run all checks with:
make run-hooks
Adding Features
Create a branch for your feature:
git checkout -b feature/your-feature-name
Implement your changes
Add tests for your changes
Update documentation as needed
Run tests and linting to ensure everything passes
Commit your changes
Pull Requests
Push your branch to your fork:
git push origin feature/your-feature-name
Open a pull request against the
masterbranch of the main repositoryEnsure the PR description clearly describes the problem and solution
Include the relevant issue number if applicable
Guidelines
Testing
All new features should include tests
Maintain or improve test coverage
Both unit and integration tests are welcome
Documentation
Update documentation for any new features or changes to existing ones
Make sure your code is well-documented with docstrings
Include examples where appropriate
Versioning
This project follows Semantic Versioning:
MAJOR version for incompatible API changes
MINOR version for new functionality in a backwards compatible manner
PATCH version for backwards compatible bug fixes
Commit Messages
Use clear and meaningful commit messages:
Use the present tense (“Add feature” not “Added feature”)
Use the imperative mood (“Move cursor to…” not “Moves cursor to…”)
Reference issues and pull requests where appropriate
Code of Conduct
Please be respectful and considerate of others when contributing to this project. We aim to foster an inclusive and welcoming community.
Questions?
If you have any questions or need help, please open an issue on GitHub.