Thank you for your interest in contributing to GROUPOID. This document describes the development workflow and guidelines for contributions.
- Fork and clone the repository:
git clone https://github.com/<your-username>/GROUPOID.git
cd GROUPOID- Install all dependencies:
pip install -e ".[all]"- Install pre-commit hooks:
pre-commit installAll code is formatted and checked by the following tools (enforced via pre-commit hooks):
- ruff: Linting and import sorting
- black: Code formatting (line length 99)
- mypy: Static type checking
- bandit: Security analysis
Run all checks manually:
pre-commit run --all-files# All tests
pytest tests/ -v
# Property-based tests only
pytest tests/theory/ -v
# Benchmarks
pytest benchmarks/ -v --benchmark-onlyContributions involving mathematical claims (new algorithms, convergence proofs, complexity bounds) must include:
- A proof or a citation to a peer-reviewed reference
- Property-based tests (using Hypothesis) that verify the claimed invariants
- Clear documentation of assumptions and limitations
If you find a mathematical error in the existing code or documentation, please open an issue using the "Mathematical Correction" template.
- Create a feature branch from
main. - Make your changes, ensuring all pre-commit hooks pass.
- Add or update tests as appropriate.
- Update documentation if your changes affect the public API.
- Open a pull request against
main. - Ensure CI passes (lint, test, security, docs build).
- Address all review comments before merging.
- Open a release-cut PR that bumps the version across every metadata
file that carries it:
pyproject.toml,groupoid/__init__.py,codemeta.json,CITATION.cff(version anddate-released),STATUS.md(both mentions), and.zenodo.json(version, the erratum description, andisNewVersionOfadvanced to the prior version's Zenodo DOI). RollCHANGELOG.md'sUnreleasedsection into a new version heading with compare links. See PRs #40 or #48 for the template. - Merge the PR to
main.
That's it — merging is the release trigger, split across two workflows with one job each:
.github/workflows/auto-tag-release.ymlruns on every push tomainthat touchespyproject.toml. It reads the version out ofpyproject.toml, and if nov<version>tag exists yet, it creates and pushes one (asgithub-actions[bot]) after checking the version has a recognized format and thatCHANGELOG.mddocuments it. A push with no version change, or whose tag already exists, is a no-op.- It then explicitly dispatches
.github/workflows/release.ymlagainst that tag withcreate_github_release: true, rather than relying on the tag push itself to trigger it. This is necessary, not a stylistic choice: GitHub suppresses push-triggered workflow runs caused by aGITHUB_TOKEN-authored push, so the tag push fromauto-tag-release.ymldoes not firerelease.yml's ownpush.tagstrigger (workflow_dispatchis the documented exception to that suppression).release.ymlthen does what it always did: build, provenance and SBOM attestation, publish to PyPI via Trusted Publishing, Sigstore signing, and a GitHub Release (which in turn triggers the Zenodo deposit for the new version DOI). release.yml'spush.tagstrigger remains as a fallback/manual path — a human pushing a tag with their own credentials is not subject to theGITHUB_TOKENsuppression above, so that still works normally. Itsworkflow_dispatchtrigger (create_github_releaseleft at its defaultfalse) republishes an existing tag to PyPI only, without creating a duplicate GitHub Release or Zenodo deposit.
The actual PyPI publish step still runs under the pypi GitHub
Environment; if that environment has required reviewers configured, the
publish waits for that approval exactly as before. Automating the tag
does not remove that gate.
If you need to re-publish an existing tag to PyPI only (no new GitHub
Release, no new Zenodo deposit), use the workflow_dispatch trigger on
release.yml with the ref input set to the existing tag.
When reporting bugs or requesting features, please use the appropriate issue template:
- Bug Report: For reproducible bugs with steps, expected behavior, and environment details.
- Feature Request: For new functionality with motivation and proposed approach.
- Mathematical Correction: For errors in theorems, proofs, or algorithms.
By contributing to GROUPOID, you agree that your contributions will be licensed under the Apache License, Version 2.0.