This project uses setuptools_scm, so the package
version is derived from Git tags. Use strict semantic version tags of the form vX.Y.Z
(for example v1.0.1). Any commit that is not exactly on a tag resolves to a development
version such as 1.0.1.dev3+g1a2b3c4.
- Tags must match
vMAJOR.MINOR.PATCHexactly. Pre-release and metadata suffixes are rejected by CI. - A release tag must point at a commit contained in
main. Tags created on other branches are rejected during validation. - Development happens on
dev;devis merged intomainthrough a pull request, and the tag is placed on the resulting merge commit onmain.
-
Make sure
devis green and up to date withmain. -
Update
CHANGELOG.md: move the relevant## [Unreleased]entries into a new## [vX.Y.Z] - YYYY-MM-DDsection and add the comparison links at the bottom. -
Update
.zenodo.json: setversionto the new release and refreshdescriptionwith the release highlights. -
Open and merge the
dev→mainpull request. -
Tag the merge commit on
mainand push the tag:git checkout main git pull git tag -a vX.Y.Z -m "PyNetDesign vX.Y.Z" git push origin vX.Y.ZPushing the tag also publishes the documentation of the release; see Documentation.
-
Verify the version resolves correctly before publishing:
git describe --tags # -> vX.Y.Z python -m build # -> dist/pynetdesign-X.Y.Z.tar.gz
-
Publish the GitHub Release for that tag, using the new
CHANGELOG.mdsection as the release body. -
Merge
mainback intodevso thatdevcontains the tag in its history andsetuptools_scmresolves a sensible development version there.
| Workflow | Trigger | What it does |
|---|---|---|
pytest.yml |
push / PR on main, dev |
Runs pytest pytests/ on Python 3.9-3.12 |
validate-zenodo.yml |
push / PR on main, dev; reusable |
Validates .zenodo.json against the Zenodo schema |
validate-tag.yml |
reusable only | Enforces strict semver and that the tag is contained in main |
release-on-published.yml |
GitHub Release published |
Validates the tag, validates the Zenodo metadata, then builds and checks the distributions |
docs.yml |
push on main, dev; workflow_dispatch |
Builds the HTML and PDF documentation; runs on main deploy it to GitHub Pages and check the version the live site serves |
push-tag.yml |
push of a v* tag |
Validates the tag, then starts a docs.yml run on main that builds and deploys the documentation of the tag |
release-on-published.yml also accepts a workflow_dispatch with a tag input, so a
release can be re-validated without republishing it.
Notes:
- Zenodo metadata validation must pass before the package build starts.
- Tag validation is shared through
validate-tag.yml, so the same rules apply to every workflow that acts on a tag. - PyNetDesign is not published to PyPI. Installation is from source; see
README.md.
The documentation is published to GitHub Pages at https://danikiev.github.io/PyNetDesign/.
Only docs.yml runs on main deploy it: a push to main publishes a development version,
and pushing a release tag starts a run on main that builds the tag and publishes it. Every
deployment ends by reading the version back from the live site, and fails if it differs.
A release is deployed by a run on main, not by a run on the tag, because GitHub Pages
ignores a deployment made from a tag when main has already deployed the same commit, and
still reports it as successful
(actions/deploy-pages#383). The
release tag always sits on a merge commit that main deployed when it was merged.
Use this when the live site shows the wrong version, for example when the
Check the deployed version step of a Docs run failed, or to republish a release:
- On GitHub, open Actions → Docs → Run workflow.
- Keep Use workflow from at
main. Runs on any other branch or on a tag build the documentation but do not deploy it. - Set ref to the release tag, for example
refs/tags/v1.1.0, or leave it empty to publish the currentmain. - Click Run workflow. The run builds the documentation from ref, checks that the documentation of a tag carries its version, deploys it and checks the live site.
The same from a terminal, with the GitHub CLI:
gh workflow run docs.yml --ref main -f ref=refs/tags/v1.1.0To see which version the live site serves (the query string bypasses the CDN cache):
curl -s "https://danikiev.github.io/PyNetDesign/_static/documentation_options.js?$(date +%s)" | grep VERSIONThe repository is archived on Zenodo through the GitHub integration.
- GitHub repository ID:
958300487 - Original manual deposit (v1.0.0): 10.5281/zenodo.14945917
- Sign in to https://zenodo.org (test the flow on https://sandbox.zenodo.org first if you prefer).
- In Zenodo's GitHub settings, enable the
PyNetDesignrepository. - Confirm the repository has a valid
.zenodo.json—validate-zenodo.ymlchecks this on every push.
Important: v1.0.0 was deposited manually before the GitHub integration existed. The integration was therefore enabled only after the
v1.0.0GitHub release was published, so that Zenodo would not mint a second, duplicate DOI for that version. The first integration-created deposit isv1.0.1, which starts a new concept DOI.
- Before tagging — update
.zenodo.json(version,description,keywords,creators,related_identifiersas needed) and make sureLICENSEandREADME.mdare consistent with the release notes. - Create the release — push the
vX.Y.Ztag, then publish the GitHub Release with the highlights fromCHANGELOG.md. - Validate the deposition — confirm Zenodo auto-created a new versioned deposition from the GitHub release, and check the title, version, creators, ORCID, license and description in the Zenodo UI. Verify the source archive is attached.
- Communicate the DOIs — copy the version DOI and the concept DOI into the release
notes,
README.mdanddocs/source/citing.rst. The concept DOI always resolves to the latest version; the version DOI pins one release. - Post-release verification — open the DOI link, check that the citation metadata resolves, and confirm the new version appears under the concept record.
Because the manual v1.0.0 deposit and the integration-created records are separate Zenodo lineages, they must be cross-linked by hand in both directions:
- Forward, in the repository:
.zenodo.jsoncarries arelated_identifiersentry with relationisNewVersionOfpointing at10.5281/zenodo.14945917. Zenodo honours this on every deposit, so it persists across releases. - Backward, on Zenodo: open record
14945917, choose Edit, add a related identifier with relationisPreviousVersionOfpointing at the new version DOI, and publish. This is a metadata-only edit and preserves the existing DOI.