sphinx-need-sysml is developed by the following contributors:
| Name | Role |
|---|---|
| Chris | Author & Maintainer |
- Python ≥ 3.10
piporuv
# Clone the repository
git clone https://github.com/user/sphinx-need-sysml.git
cd sphinx-need-sysml
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install the package in editable mode with dev dependencies
pip install -e ".[test,docs]"
pip install pre-commit ruff mypy nox
# (Optional) Install PlantUML for diagram rendering
# sudo apt install plantuml # Debian/Ubuntu
# brew install plantuml # macOS
# Install pre-commit hooks
pre-commit install# Run all tests
pytest tests/ -v
# Run a specific test file
pytest tests/test_need_types.py -v
# Run tests with coverage
pytest tests/ --cov=sphinx_need_sysml --cov-report=html# Run tests across Python/Sphinx version matrix
nox -s tests
# Run linting
nox -s lint
# Build documentation
nox -s docssource .venv/bin/activate
cd docs
sphinx-build -b html . _build/html
# Open _build/html/index.html in a browserThis project uses ruff for linting and formatting:
# Check for lint issues
ruff check sphinx_need_sysml/ tests/
# Auto-fix fixable issues
ruff check --fix sphinx_need_sysml/ tests/
# Check formatting
ruff format --check sphinx_need_sysml/ tests/
# Apply formatting
ruff format sphinx_need_sysml/ tests/mypy sphinx_need_sysml/The project uses GitHub Actions for continuous integration. The CI pipeline
runs on every push to main and on all pull requests.
- Lint —
ruff checkandruff format --checkon all Python files - Type Check —
mypy sphinx_need_sysml/with strict mode - Test —
nox -s testsruns the test matrix:- Python 3.10, 3.12
- Sphinx 5.0, 7.2.5, 8.1.3
- sphinx-needs 2.1, 4.2, 5.1, 6.0.0, 6.3.0, 8.0.0
- Docs Build —
nox -s docsverifies documentation builds without errors
- All lint checks must pass (no ruff violations)
- All type checks must pass (no mypy errors)
- All test combinations must pass (48+ tests)
- Documentation must build without errors
Install pre-commit hooks locally to catch issues before pushing:
pre-commit install
pre-commit run --all-files- Create a feature branch from
main - Make your changes and add/update tests
- Run
pytest tests/ -vandruff check sphinx_need_sysml/ tests/locally - Push your branch and open a pull request
- Ensure all CI checks pass
- Request review from a maintainer
- Update
VERSIONinsphinx_need_sysml/__init__.py - Update
CHANGELOG.mdwith release notes - Create a git tag:
git tag v0.1.0 - Push the tag:
git push origin v0.1.0 - GitHub Actions publishes to PyPI on tag push
By contributing to this project, you agree that your contributions will be licensed under the MIT License.