Installation for Development¶
To set up the project for development, clone the repository and install it along with the dev extra dependencies:
git clone https://github.com/gambitproject/gtdraw
cd gtdraw
pip install -e ".[dev]"You’ll also need to follow the rest of the steps on the installation page for LaTeX and other requirements.
Testing¶
The project includes a comprehensive test suite using pytest.
To run all tests:
pytest tests/ -vTo run tests with coverage reporting:
pytest tests/ --cov=gtdraw --cov-report=htmlReleases¶
To release a new version of gtdraw:
Update the version number in
pyproject.toml, the only place it is written.gtdraw.__version__is read from the installed package’s metadata, so reinstall (pip install -e .) to see a new version locally.Create a pull request targeting the
mainbranch with the change.Once the pull request is approved and merged, update your local
mainbranch:git checkout main git pull origin mainCreate and push a new tag corresponding to the version:
git tag vX.X.X git push origin tag vX.X.XFinally, create a new Release on GitHub based on the pushed tag. Publishing the release starts the
Publish to PyPIworkflow, which runs the tests and stops if the tag, less itsv, differs from the version inpyproject.toml, before anything is built or uploaded.