This repo is part of a research conducted at Ben Gurion University, and is thus open source. We would love to receive your input!
Please ensure your pull request adheres to the following guidelines:
- Search previous suggestions before making a new one, as yours may be a duplicate.
- Make an individual pull request for each suggestion.
- New categories or improvements to the existing categorization are welcome.
- Check your spelling and grammar.
- Make sure your text editor is set to remove trailing whitespace.
- The pull request and commit should have a useful title.
PyDiffGame requires Python >= 3.11 and uses uv for environment and dependency management. Install uv, sync the locked development environment, and enable the pre-commit hooks so the code-quality tools run automatically on every commit:
# install uv: https://docs.astral.sh/uv/getting-started/installation/
uv sync --extra dev
uv run pre-commit installuv sync creates the virtual environment and installs the exact, locked
dependencies. Run the tooling through uv run:
uv run ruff format src/PyDiffGame tests # auto-format (black-compatible)
uv run ruff check src/PyDiffGame tests # lint
uv run mypy src/PyDiffGame # type-check
uv run pytest # test suiteContinuous integration runs the formatter check, the linter, the type checker and the full suite (all via uv) across Python 3.11–3.14, so please make sure they pass locally.
The project is on continuous deployment for source changes: every commit
to master that touches source files automatically cuts a new release.
A commit triggers a release when it changes any of:
src/PyDiffGame/**— the package itselfpyproject.toml— packaging metadata, dependencies, classifiers
Docs (*.md, docs/**), tests (tests/**), tooling (tools/**, .github/**,
.pre-commit-config.yaml), images and the lock file do not trigger a
release on their own. A mixed commit (e.g. src/foo.py + README.md) does
trigger one — the path filter matches if any changed file matches.
When a release-triggering commit lands on master, the publish workflow:
- Increments the version with
tools/bump_version.py, which rolls each component over at 9 (2.0.9 -> 2.1.0,2.9.9 -> 3.0.0), updates bothpyproject.tomlandsrc/PyDiffGame/__init__.py, and commits the bump back tomasteraschore: bump version to X.Y.Z [skip ci]. - Builds the distributions with
uv build. - Uploads them to PyPI via Trusted Publishing (OIDC — no tokens or secrets).
- Creates a
v<version>GitHub Release with auto-generated notes and the built wheels/sdist attached.
The workflow can also be triggered manually from Actions -> Upload Python Package -> Run workflow if you ever need to re-run it.
You normally never edit the version by hand. To bump it locally (e.g. to test),
run uv run python tools/bump_version.py (--dry-run to preview, --current
to print the current version). The PyPI upload is idempotent (skip-existing),
so re-running the workflow is safe.
The publish workflow itself commits the version bump back to master. Three
independent guards stop that commit from re-triggering the workflow:
- The bump commit message contains
[skip ci], which GitHub Actions natively honors by not creating a workflow run at all for that push. - The
bump-versionjob has an explicitif:that skips when the actor isgithub-actions[bot]or the head-commit message contains[skip ci]. bump_version.pyis the single source of truth for the version, so a tampered bump commit still wouldn't double-bump.
Thank you for your contribution!
Joshua Shay Kricheli