Contributing¶
Contributing to sphinx-needs-tree-map¶
Thank you for your interest in contributing to sphinx-needs-tree-map!
Development Setup¶
Clone the repository:
git clone https://github.com/patdhlk/sphinx-needs-tree-map.git cd sphinx-needs-tree-map
Create a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -e ".[dev,docs]"
Install pre-commit hooks:
pip install pre-commit pre-commit install
Running Tests¶
pytest tests/ -v
With coverage:
pytest tests/ -v --cov=sphinx_needs_tree_map --cov-report=html
Code Style¶
This project uses:
ruff for linting and formatting
mypy for type checking
Run checks manually:
ruff check sphinx_needs_tree_map tests
ruff format sphinx_needs_tree_map tests
mypy sphinx_needs_tree_map
Or use pre-commit:
pre-commit run --all-files
Building Documentation¶
cd docs
make html
# Open _build/html/index.html
Submitting Changes¶
Fork the repository
Create a feature branch:
git checkout -b feature/my-featureMake your changes and add tests
Ensure all tests pass and code style checks pass
Commit with a clear message
Push to your fork and create a Pull Request
Pull Request Guidelines¶
Include tests for new functionality
Update documentation as needed
Follow the existing code style
Keep commits focused and atomic
Reference any related issues
Reporting Issues¶
Use the GitHub issue templates
Include Sphinx and sphinx-needs versions
Provide a minimal reproducible example when possible
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.