Developing#
This page describes how to set up a development environment for gxformat2 and how to cut a release.
Development Setup#
Create a virtualenv with dev dependencies installed:
make setup-venv
This runs uv sync. The test, lint, mypy, and docs
dependency groups are marked as default-groups in pyproject.toml
so they install automatically.
Optional pre-commit hooks are configured via pre-commit. A sample configuration ships as
.pre-commit-config.yaml.sample. Install the hook with:
make setup-pre-commit
This uses .pre-commit-config.yaml if you have one (copy the sample and
customize), and otherwise falls back to the committed
.pre-commit-config.yaml.sample.
Running Tests and Linters#
make test # pytest
make lint # ruff, flake8, black, mypy, schema build dry-run
make lint-docs # rebuild Sphinx HTML and check for warnings
Set GXFORMAT2_TEST_IWC_DIRECTORY to a local clone of the IWC repository
to enable integration tests that exercise real-world workflows.
Releases#
gxformat2 publishes to PyPI via GitHub Actions trusted publishing — no
~/.pypirc or PyPI credentials are needed on the release machine. Pushing
a version tag to galaxyproject/gxformat2 triggers the publish workflow.
Pre-release checklist#
Run:
make check-release
This verifies:
.venvexists (oruvis available).Working tree is clean (no uncommitted or untracked files).
The
UPSTREAMgit remote exists and points toUPSTREAM_REPO(defaults:galaxyproject/galaxyproject/gxformat2).HISTORY.rsthas entries under the current.devNsection.make clean,make lint, andmake lint-docsall pass.
Fork maintainers can override the defaults:
make check-release UPSTREAM=myfork UPSTREAM_REPO=me/gxformat2
Cutting the release#
Populate the changelog from merged PRs:
make add-history
Review the diff to
HISTORY.rst, adjust as needed, and commit it (make check-releasein the next step requires a clean working tree).Confirm the target version in
gxformat2/__init__.py(__version__is the.devNvariant of the release you intend to cut).make check-release.make release— this runscommit-version,new-version, andpush-release, which commits the version bump, tags the release, bumps__version__to the next.dev0, and pushesmainplus the tag toUPSTREAM. The pushed tag triggers the PyPI publish workflow on GitHub.
If you need finer control the release can be broken into its pieces:
make release-local (commit, tag, next-dev) followed by
make push-release (push main and tags).