Contributing
Thanks for helping improve gleplot. This page covers what you need before opening a pull request. For commit types and how releases are cut, see docs/guides/VERSIONING.md.
Setup
git clone https://github.com/benhuddart/gleplot.git
cd gleplot
pip install -e ".[dev]"
Tests
pytest tests/ -v
Tests that shell out to the gle binary are marked @pytest.mark.gle and are skipped when GLE is not installed. See docs/guides/TESTING.md for the test layers and the fixed-point check.
Code style
CI checks black, isort, flake8 and mypy, and all four must pass. gleplot supports Python 3.9+; the formatters and mypy need 3.10+.
black src tests examples docs
isort src tests examples docs
flake8 src tests examples docs
mypy src
Docs and examples
CI runs every example and builds the Sphinx site with warnings treated as errors, so a malformed docstring or a broken example fails the pull request. To check locally (GLE required for the gallery images):
pip install -e ".[dev,docs]"
python examples/run_and_compile.py
python docs/prepare_gallery.py
sphinx-build -W --keep-going -b html docs/source docs/build/html
examples/run_and_compile.py holds the one list of examples. Add a new example there: the run fails on an example_* function under examples/basic/ or examples/advanced/ that is not listed. The gallery is generated from the same list: it shows each example’s images and code, with its docstring as the caption. Without GLE, python examples/run_and_compile.py --no-compile runs the examples without compiling them. The runner writes into examples/outputs/, which is ignored, and an example writes to the current directory rather than next to its own source. No generated figure or data file is committed, so running the examples leaves git status clean.
Commits
Use conventional commits. The type decides the release; docs/guides/VERSIONING.md lists what each one does.
Pull requests
Run the test suite and formatters above.
Add or extend tests for behavior you change.
Update user-facing docs when the API or workflows change.
Open a PR with a clear summary and test plan.
Questions and bugs
Open a GitHub issue with steps to reproduce, expected vs actual behavior, and your Python/OS versions when reporting bugs.