Contributing¶
We welcome contributions to the routing library! This document outlines the process for contributing to this project.
Getting Started¶
- Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/routing.git
-
Create a new branch for your feature or fix:
git checkout -b fix/<your-fix-name>
or for a new feature:
git checkout -b feat/<your-feature-name>
or for a docs changes:
git checkout -b docs/<your-docs-changes-name>
Setting up Pre-commit¶
We use pre-commit hooks to ensure code quality and consistency. To set this up:
-
Install pre-commit:
pip install pre-commit
-
Install the git hooks:
pre-commit install
When you try to commit, these checks will run automatically. If any checks fail, the commit will be prevented and you'll need to fix the issues before committing again.
To run the checks manually:
pre-commit run --all-files
Contributing to Documentation¶
We use MkDocs for our documentation. To set up the documentation environment:
-
Create and activate a virtual environment:
pip install uv uv venv source .venv/bin/activate
-
Install requirements:
uv pip install -r requirements.txt
-
Documentation files are in the
docs/
directory and written in Markdown format. -
To preview your changes locally:
mkdocs serve
Then visit
http://127.0.0.1:8000
in your browser. -
Documentation structure:
docs/ ├── index.md # Main documentation page ├── file.md # Documentation page for file ├── folder/ │ ├── index.md # Documentation page for folder │ └── file.md # Documentation page for file
-
Follow these documentation guidelines:
- Use British English
- Keep paragraphs concise and focused
- Include code examples where appropriate
- Add screenshots for UI-related features
- Update the navigation in
mkdocs.yml
if adding new pages
-
Check for broken links and formatting issues before submitting
Making Changes¶
- Make your changes in your feature branch
- Write or update tests as needed
- Ensure your code follows the existing style of the project
-
Commit your changes:
git commit -m "Description of your changes"
Submitting Changes¶
-
Push your changes to your fork on GitHub:
git push origin <your-branch-name>
-
Open a Pull Request (PR) from your fork to our main repository
- In your PR description, clearly describe:
- What changes you've made
- Why you've made them
- Any relevant issue numbers
Pull Request Guidelines¶
- PRs should focus on a single feature or fix
- Keep changes small and focused
- Update documentation as needed
- Ensure all tests pass
- Follow existing code style and conventions
- All pre-commit checks must pass
- For documentation changes:
- Ensure mkdocs builds successfully
- Preview changes locally before submitting
- Check for broken links and proper formatting
Questions or Issues?¶
If you have questions or run into issues, please:
- Check existing issues on GitHub
- Create a new issue if needed
- Ask questions in the PR itself
Thank you for contributing to the routing library!