---
myst:
html_meta:
"description": "The eOn release workflow: cog-driven version bump, towncrier changelog, PyPI publish, GitHub release, conda-forge feedstock, and incomplete-release recovery."
"keywords": "eOn release, cocogitto, towncrier, conventional commits, PyPI, conda-forge feedstock, atomistic-cookbook"
---
# Release workflow
eOn releases use [cocogitto (`cog`)](https://docs.cocogitto.io/) 7+ to derive the
next semver tag from the conventional-commit log, run the mechanical bump
steps, create an atomic signed tag, and emit the source tarball. Towncrier owns
`CHANGELOG.md`. Tag push triggers `.github/workflows/release.yml` (GitHub
Release + tarball asset + optional PyPI). Maintainers then open a
[conda-forge/eon-feedstock](https://github.com/conda-forge/eon-feedstock) PR.
This page is the maintainer source of truth. Patterns are adapted from rgpot
(`release assert` / `release-prepare` / towncrier CI / staged `release.yml`) to
eOn surfaces (`pyproject.toml`, `pixi.toml`, `condaEnvs/`, meson via
`client/get_version.py`).
## Version surfaces (single semver)
| Surface | Role |
|---------|------|
| `pyproject.toml` `project.version` | **Source of truth** for Python/meson-python; docs `conf.py`, `client/get_version.py`, meson/CMake read here |
| `pixi.toml` `version` | Lockstep mirror (cog `sed` on bump) |
| `CHANGELOG.md` | Towncrier-only; `## [X.Y.Z](...)` section per cut |
| `docs/source/releases/vX.Y.Z/` | Curated Sphinx release notes |
| Git tag `vX.Y.Z` | Annotated (prefer signed) tag; drives `release.yml` |
| GH asset `eon-vX.Y.Z.tar.xz` | `git archive` tarball (hash-stable) |
| PyPI project `eon-akmc` | Wheel/sdist via meson-python. PyPI `eon` is EoN epidemics. Import package stays `eon/`. Config: `ci/gha/pypi.ncl` |
| conda-forge `eon` | Feedstock consumes GH tarball URL + sha256 |
Towncrier writes the `## [X.Y.Z]` block from fragments under
`docs/newsfragments/`.
Run `release_assert.py` locally or in CI:
```bash
python3 scripts/release_assert.py # pyproject == pixi semver
python3 scripts/release_assert.py 2.14.0 --require-changelog
python3 scripts/release_assert.py 2.14.0 --notes /tmp/release_notes.md
```
## Tooling map
| Tool | Role |
|------|------|
| [cocogitto](https://docs.cocogitto.io) (`cog`) 7+ | Bump, version commit, annotated tag |
| [towncrier](https://towncrier.readthedocs.io) | `CHANGELOG.md` from `docs/newsfragments/` |
| `scripts/release_assert.py` | Lockstep + optional CHANGELOG section check (rgpot `potctl release assert` analogue) |
| `.github/workflows/release.yml` | On `v*`: `release_assert` → tarball → GH release → PyPI (stable only) |
| `.github/workflows/release-prepare.yml` | Advisory dry-run on PRs / `workflow_dispatch` |
| `.github/workflows/towncrier.yml` | `towncrier check` when listed paths change |
| `SECURITY.md` | Supported versions + report path |
| `.github/CODEOWNERS` | Release-surface review hints |
## CI generation (Nickel, rgpot-style)
Release-related Actions workflows are **authored in Nickel** under `ci/gha/` and
exported to `.github/workflows/` (same contract as rgpot's `ci/gha/workflow.ncl`
→ `build.yml`; eOn applies it to **release** workflows since we do not yet own
a combinatorial build matrix in Nickel). Internal write-up context:
rgpot `release_process_v1.2.0_lockstep_potctl_cog_towncrier.org` (Nickel section:
matrix is Nickel-owned; release publish can stay YAML in rgpot — here release
publish is Nickel-owned so the process PR cannot drift from hand-edited YAML).
| Nickel | Generated (commit the Nickel source and the YAML together) |
|--------|------------------------------------------------------|
| `ci/gha/common.ncl` | shared pins/helpers |
| `ci/gha/release.ncl` | `.github/workflows/release.yml` |
| `ci/gha/release_prepare.ncl` | `.github/workflows/release-prepare.yml` |
| `ci/gha/towncrier_check.ncl` | `.github/workflows/towncrier.yml` |
```bash
./ci/gha/gen.sh
# or: pixi r -e cigen gen-gha # once cigen env/lock is available
nickel export --format yaml ci/gha/release.ncl -o .github/workflows/release.yml
```
See `ci/gha/README.md`. Other `ci_*.yml` workflows remain hand-maintained until ported.
## Maintainer secrets / one-time setup
Do once per GitHub repo (Settings):
| Secret / config | Used by |
|-----------------|---------|
| `PYPI_API_TOKEN` or trusted publisher (PyPI → GitHub, environment `release`) | `release.yml` job `pypi` |
| Optional environment `release` with required reviewers | Required reviewers before publish |
| GPG/signing keys on maintainer machines | Prefer `git tag -s` / signed commits. GHA signing is a separate channel. |
**PyPI first-time (`eon-akmc`; PyPI `eon` is EoN epidemics):**
1. Create account at [pypi.org](https://pypi.org); enable 2FA.
2. Preferred: configure [Trusted Publishing](https://docs.pypi.org/trusted-publishers/)
for owner/repo `TheochemUI/eOn` (or your fork), workflow `release.yml`,
environment `release`, project name `eon-akmc` (see `ci/gha/pypi.ncl`). Then `release.yml` uses
`pypa/gh-action-pypi-publish` with OIDC (no long-lived token).
3. Fallback: create API token scoped to project `eon-akmc`, store as repo secret
`PYPI_API_TOKEN` (`pypi-...` prefix).
4. Local dry-run (no upload):
```bash
python3 -m pip install build twine
python3 -m build
twine check dist/*
```
5. Never `twine upload` by hand unless CI is down; the tag workflow is the
source of truth for stable tags.
## Multi-package monorepo: fat tarball vs splits
One monorepo, two distribution shapes (both can publish from the same tag train):
| Shape | Artifact | Primary consumer |
|-------|----------|------------------|
| **Fat tree** | `eon-vX.Y.Z.tar.xz` (`git archive` of the full tag) | **conda-forge `eon-feedstock`**, EasyBuild, source builds |
| **Splits** | PyPI `eon-akmc`, `pyeonclient`, `eon-schema`, … | pip/uv focused installs |
Schema/package layout may be cleaned up over time. The release rule is:
**always produce one complete fat archive for the conda-forge recipe**, and
**also** publish splits when those packages have independent consumers.
### Fat tarball (feedstock path)
- Built by `release.yml`: `git archive --format=tar "$TAG" | xz -9 > eon-v….tar.xz`
- Must be a **complete monorepo** snapshot the feedstock can build (`schema/`,
`eon/`, `client/`, tools, meson, and any `packages/` the tree uses).
- Cap’n Proto **authoring:** `schema/eon_params.capnp`. After edits:
`python tools/params_ssot/codegen.py` then
`./packages/eon-schema/scripts/sync_ssot_into_package.sh` (vendors into the
split for PyPI). Commit generated outputs so the fat archive is self-contained.
- Feedstock continues to use only the fat tarball URL + sha256 — **no new
conda package required** when adding PyPI splits.
### Split PyPI packages
| Project | Location | Notes |
|---------|----------|--------|
| `eon-akmc` | root (import `eon`) | Full-tree tag release job |
| `pyeonclient` | `pyproject-pyeonclient.toml` | Wheel CI; optional `[models]` |
| `eon-schema` | `packages/eon-schema/` | Independent `0.y.z`; vendored SSoT; see package `PUBLISHING.md` |
Detail: [`packages/eon-schema/PUBLISHING.md`](https://github.com/TheochemUI/eOn/blob/develop/packages/eon-schema/PUBLISHING.md).
Monorepo developer docs (package map, CI matrix) can expand later under
`docs/source/devdocs/` without changing this fat/split release contract.
**conda-forge first-time:** feedstock already exists at
[conda-forge/eon-feedstock](https://github.com/conda-forge/eon-feedstock). New
maintainers request access via the feedstock `recipe/recipe.yaml` maintainers
list / staged recipes process.
## Windows and conda-forge (issue #15)
win-64 includes **in-tree Fortran** (EAM/GAGAFE-class pots). See
[conda-forge/eon-feedstock#15](https://github.com/conda-forge/eon-feedstock/issues/15),
feedstock `build.bat`, and [Windows Compatibility and Scientific Computing](https://rgoswami.me/posts/windows-compat-sci-cpp/)
(stack sizes, MinGW/MSVC ABI, xtb import libs).
| Platform | `compiler('fortran')` | meson (feedstock / GHA Windows) |
|----------|----------------------|----------------------------------|
| linux / osx | yes | defaults (`with_fortran` on unless opted out) |
| win-64 | **yes** (m2w64 gfortran; no MSVC Fortran) | `--default-library=static -Dwith_fortran=true -Dwith_cuh2=true` |
- Meson already adds **`/STACK:16777216`** on MSVC links (Windows 1 MB default
overflows large Fortran stack arrays; Linux is ~8 MB).
- MinGW-built **xtb** still needs the **dumpbin / `lib /DEF:`** MSVC import library
step in feedstock `build.bat` (C++/torch stay MSVC).
- **CuH2** is on with the rest of in-tree Fortran (iso_c_binding via m2w64 gfortran).
- Runtime pot **DLLs** (`LoadLibrary`) sit beside in-tree Fortran in the
conda package.
- Before feedstock go-live after a cut: confirm Azure **win-64** is green with
`with_fortran=true` and `with_cuh2=true` on the version/sha256 PR.
## 1. Pre-release checklist
Before invoking `cog bump`, verify:
- [ ] Every PR intended for the release is merged into `main`.
- [ ] `CHANGELOG.md` is up to date *through the previous release only* —
towncrier will prepend the new section from `docs/newsfragments/*`. If
fragments are missing for user-facing changes, add them first
(`uvx towncrier create` or see `docs/newsfragments/README.md`).
- [ ] Preview fragments: `uvx towncrier build --draft` (or
`pixi r -e dev towncrier build --draft` if the env has towncrier).
- [ ] `docs/source/releases/v/release-notes.md` and `index.md` exist
and are linked from `docs/source/releases/index.md` (cog cannot generate
these — they are curated).
- [ ] CI is green on `main` (build, docs, pre-commit, serve/xtb/metatomic as
relevant).
- [ ] `pixi install --locked` succeeds cleanly (so the lockfile regeneration
hook has something stable to work from).
- [ ] `python3 scripts/release_assert.py` passes (surfaces already agree, or
you are about to let cog set both).
- [ ] PyPI dry-run considered: `python3 -m build && twine check dist/*` on a
clean tree (optional but recommended before first-ever PyPI cut).
- [ ] **Incomplete prior release reconciled** — see
{ref}`§ Incomplete / stuck releases `. Reconcile
`vN.M.P` (finalize or supersede) before a new semver if the GH asset, PyPI,
or feedstock is still unfinished.
- [ ] **Downstream integration test passes** (blocking for metatomic consumers).
The [lab-cosmo/atomistic-cookbook](https://github.com/lab-cosmo/atomistic-cookbook)
example `eon-pet-neb` exercises eOn + PET-MAD on the oxadiazole NEB. Point a
cookbook checkout at the prospective release commit (override `eon` in its
`environment.yml`, or `pip install -e` the eOn tree) and run:
```bash
nox -e eon-pet-neb
```
Pass = nox exits 0, gallery artefacts regenerate, `client_traceback.log` in
the example dir is empty. A regression blocks the release.
## 2. Running `cog bump`
Happy path on `main` (cocogitto 7+):
```bash
cog bump --auto --annotated 'Release v
See CHANGELOG.md.'
```
Override inference with `--minor`, `--major`, or `--version X.Y.Z` when needed
(e.g. only `feat(docs)` since last tag but you want a patch).
Dry-run first (also available via Actions → **Release prepare** workflow
dispatch):
```bash
cog bump --auto --dry-run
# or pin: cog bump --version 2.15.0 --dry-run
```
### What `cog bump` does
Defined in `cog.toml`:
1. Picks the next version (semver from conventional commits since last tag, or
from the flag).
2. Runs `pre_bump_hooks`:
- `sed` the new version into `pyproject.toml` and `pixi.toml`.
- `uvx pixi-to-conda-lock pixi.lock --output condaEnvs` regenerates
`condaEnvs/*.conda-lock.yml`.
- `pixi r -e dev towncrier build --version {{version}} --date $(date +%Y-%m-%d)
--yes` consumes `docs/newsfragments/` and prepends `CHANGELOG.md`.
- `python3 scripts/release_assert.py {{version}} --require-changelog` fails
the bump if surfaces diverged or the new section is missing.
3. Stages the diff and writes the release commit
(`chore(version): ` by default).
4. Creates the annotated tag `v` (configure local git for signed tags if
policy requires).
5. Runs `post_bump_hooks`:
- Prints reminder that `release.yml` on tag push builds the tarball, creates
the GH release, and publishes PyPI (stable only).
- Optional local tarball (also produced in CI):
`git archive --format=tar v{{version}} | xz -9 > eon-v{{version}}.tar.xz`
`cog.toml` sets `disable_changelog = true` (towncrier owns `CHANGELOG.md`) and
`branch_whitelist = ["main"]` so `cog bump` refuses non-main branches.
(post-bump-actions)=
## 3. Post-bump actions
1. Inspect the release commit:
```bash
git show HEAD
python3 scripts/release_assert.py --print-version
```
Expect: version bumps in `pyproject.toml`/`pixi.toml`, regenerated
`condaEnvs/*.conda-lock.yml`, new `CHANGELOG.md` section, consumed
newsfragments deleted, plus your curated `docs/source/releases/vX.Y.Z/`
pages if you added them in the same commit or the one before it.
2. Push the commit and tag together:
```bash
git push origin main --follow-tags
```
3. **GitHub Actions** (`release.yml`) on the tag:
- **release_assert**: checkout, `release_assert.py $VERSION --require-changelog`, emit
notes artifact (CHANGELOG section or curated `release-notes.md`).
- **tarball**: `git archive` → `eon-vX.Y.Z.tar.xz` artifact.
- **gh-release**: create/update GitHub Release with tarball attached and
notes body (idempotent if release already exists — uploads asset if missing).
- **pypi** (stable tags `X.Y.Z` only): build + publish via trusted
publisher or `PYPI_API_TOKEN`.
Manual fallback if Actions is unavailable:
```bash
git archive --format=tar v | xz -9 > eon-v.tar.xz
gh release create v eon-v.tar.xz \
--title v \
--notes-file docs/source/releases/v/release-notes.md
```
The feedstock URL requires this exact asset name.
4. Confirm channels before feedstock PR:
- [ ] GitHub release `vX.Y.Z` exists with asset `eon-vX.Y.Z.tar.xz`
- [ ] `python3 scripts/release_assert.py X.Y.Z --require-changelog` on the
tagged commit
- [ ] PyPI shows `eon-akmc==X.Y.Z` (stable only; check
`https://pypi.org/project/eon-akmc/X.Y.Z/`) **or** document intentional skip
for this cut
- [ ] Then proceed to {ref}`§4 conda-forge `
### Verify the published documentation
The **Build and Deploy Documentation** workflow (`ci_docs.yml`) builds
Sphinx and the C++ API reference. Pull requests produce a downloadable
`documentation` artifact. Pushes to `main` and `develop` update the site root on the
`gh-pages` branch. A version tag publishes the full site once under
`versions/vX.Y.Z/`, including its guide, schema and assets. The file
`versions/vX.Y.Z/.source-revision` records the tagged commit. Later
branch deployments retain those files.
After the documentation workflow for the tagged commit succeeds, open the
version from the [release index](https://eondocs.org/releases/index.html).
Check that its link opens the user guide for the released interface. For
the LI-NEB release, the [v3.7.0 guide](https://eondocs.org/versions/v3.7.0/user_guide/lineb.html)
shows the rginstanton build option and the `eonclient --features` output
for the fixed-energy solver. The [v3.7.0 configuration schema](https://eondocs.org/versions/v3.7.0/schema/lineb.json)
lists the `Lineb` settings.
(conda-forge-feedstock-bump)=
## 4. conda-forge feedstock bump
Once the GitHub release is published (asset URL resolves), update
[conda-forge/eon-feedstock](https://github.com/conda-forge/eon-feedstock):
1. Fork/clone feedstock; branch `release-` off `main`.
2. In `recipe/recipe.yaml`, set `context.version` to `""`.
3. Compute tarball sha256 and replace the first `source[].sha256`:
```bash
curl -sSL "https://github.com/TheochemUI/eOn/releases/download/v/eon-v.tar.xz" \
| sha256sum
```
4. Reset `build.number: 0` (or `0` under `build:` per recipe schema).
5. Verify patches still apply (`fix_vesin_const.patch`, `fix_capnpc.patch`,
or current recipe patch set); regenerate against the new tree if not.
6. Commit, push, open PR against `conda-forge/eon-feedstock` (title e.g.
`eon `).
7. Watch Azure Pipelines (linux-64, osx-64, osx-arm64, win-64) via
`cf-ci watch conda-forge/eon-feedstock#` or the PR checks UI.
8. After merge, verify `conda install -c conda-forge eon=` in a clean env.
Paste-ready PR body template (fill version/sha256):
```markdown
## eon
Bump eon to from upstream GitHub release.
- Source: https://github.com/TheochemUI/eOn/releases/download/v/eon-v.tar.xz
- sha256:
- build number reset to 0
- Patches: verified apply / updated as needed
Checklist:
- [ ] context.version ==
- [ ] source sha256 matches tarball
- [ ] build.number 0
- [ ] patches apply
- [ ] CI matrix green
```
(incomplete-stuck-releases)=
## 5. Incomplete / stuck releases
eOn has had cuts where **version / tag / CHANGELOG / release-notes exist** but
**GitHub release asset, PyPI, and/or feedstock were never finished**, and/or
**commits reached `main` after the version chore** without a new semver.
Example state at process-nail-down time: tip may report `2.14.0` in
`pyproject.toml`/`pixi.toml` with tag `v2.14.0` and a `CHANGELOG` section, while
post-tag commits (fixes/features) sit on `main` and newsfragments may be empty
again. Treat that as **incomplete multi-channel state**.
### Decision tree
```text
Is there a tag vN.M.P on origin?
├─ NO → normal path: fragments + curated notes + cog bump (§1–3)
└─ YES
├─ Are ALL channels done for N.M.P?
│ (GH release + eon-vN.M.P.tar.xz asset + PyPI eon==N.M.P [stable] + feedstock PR/merge)
│ ├─ YES, and main == tag tip (or only docs/ci after tag)
│ │ → start next semver (fragments for post-tag user-facing work)
│ └─ YES, but main has user-facing commits after tag
│ → next semver (do NOT retag N.M.P; add fragments for post-tag work)
└─ NO (missing GH asset and/or PyPI and/or feedstock)
├─ main tip is still the release commit (or only trivial fixes you accept as N.M.P)
│ → FINALIZE N.M.P (below); do not cog-bump a new version yet
└─ main has diverged with commits that must cut as a newer semver
→ SUPERSEDE: document N.M.P as partially published; cut N.M.P+1 (or minor)
with fragments covering post-tag work; finalize missing N.M.P channels
only if consumers need that exact tag (usually: finish tarball/GH for
historical accuracy, skip re-PyPI if you never uploaded, feedstock only
for the version you intend conda users to get)
```
### Finalize a stuck `vN.M.P` (no new semver)
On the tagged commit (detached or temporary branch at the tag):
```bash
git fetch origin tag vN.M.P
git switch --detach vN.M.P
python3 scripts/release_assert.py N.M.P --require-changelog
git archive --format=tar vN.M.P | xz -9 > eon-vN.M.P.tar.xz
# If GH release missing or asset missing:
gh release create vN.M.P eon-vN.M.P.tar.xz --title vN.M.P \
--notes-file docs/source/releases/vN.M.P/release-notes.md
# or: gh release upload vN.M.P eon-vN.M.P.tar.xz --clobber
```
PyPI: only if `N.M.P` was never uploaded and you still want that exact version
on the index (metadata must match the tag tree). If post-tag `main` differs and
you already decided to supersede, **skip** PyPI for `N.M.P` and publish only the
new semver.
Feedstock: open/update PR only for the version you want conda-forge to publish
(usually the semver you fully finalized, often the newest complete cut).
### Supersede with a new semver
1. List post-tag commits: `git log vN.M.P..main --oneline`.
2. Add `docs/newsfragments/*` for user-facing post-tag changes (and any that
lacked fragments at `N.M.P` time if they still lack a changelog voice).
3. Add `docs/source/releases/v/` pages; link from `releases/index.md`.
4. On `main`: `cog bump --version ` (or `--auto` / `--patch` / `--minor`).
5. Complete {ref}`§3 ` and {ref}`§4 `
for **NEW** only.
6. Optionally still attach `eon-vN.M.P.tar.xz` to the old GH release for
reproducibility; do not double-publish conflicting PyPI/conda builds.
### Anti-patterns
- Retagging `vN.M.P` to a different commit (breaks tarball/sha256 consumers).
- Running `cog bump` while intending to finalize an incomplete same version
(creates `N.M.P+1` or fails assert if versions already at next).
- Opening a feedstock PR before the GH asset URL returns 200.
- Publishing PyPI from a dirty/unreleased tree that does not match the tag.
## 6. Pre-release / RC tags
```bash
cog bump --version 2.15.0-rc.1
git push origin main --follow-tags
```
- `release.yml` creates a **prerelease** GitHub Release.
- **Skips PyPI** (stable index only; avoid yanking/pollution).
- Promote with a normal stable bump to `2.15.0` and full fragment set as needed.
## 7. Manual fallback (cog unavailable)
When `cog bump` fails mid-run (hook error, unexpected prompt) no commit is
written yet — fix and re-run. Hand sequence (reference commits like
`1edaf4d8 chore: release v2.12.0`):
```bash
sed -i 's/^version = "[^"]*"/version = ""/' pyproject.toml pixi.toml
uvx pixi-to-conda-lock pixi.lock --output condaEnvs
pixi r -e dev towncrier build --version \
--date "$(date +%Y-%m-%d)" --yes
# Curate docs/source/releases/v/{index.md,release-notes.md} + toctree
python3 scripts/release_assert.py --require-changelog
git add -A
git commit -m "chore: release v"
git tag -s -a v -m "Release v
"
git archive --format=tar v | xz -9 > eon-v.tar.xz
```
Then {ref}`§3 ` push and channel completion.
## 8. API / Doxygen documentation check
Python API docs stay on Sphinx autodoc/autodoc2. The C++ `client/` tree is
a sibling doxyYoda HTML site at `/api-cpp/` (`docs/source/Doxyfile_doxyyoda.cfg`,
`pixi run -e docs install-doxyhtml`, wired in `ci_docs.yml`).
**Release check (current policy):**
- [ ] Sphinx docs build is green on `main` (`ci_docs.yml` or local
`pixi r -e docs …` / project-documented doc target).
- [ ] `docs/build/html/api-cpp/index.html` exists after `install-doxyhtml`.
- [ ] Curated release notes exist under `docs/source/releases/vX.Y.Z/`.
## 9. Paper tags
Preprints and paper-related tags do not need the release machinery; lightweight
annotated tags only:
```bash
git tag -a arXiv_2510.06030v3 45c077cb
# feat(arxiv): descriptive one-line summary
#
# body, including the arXiv link
```
## 10. Changelog fragments (every user-facing PR)
```bash
uvx towncrier create --content "Short user-facing note." 42.added.md
# or interactive:
uvx towncrier create
```
Types (`towncrier.toml`): `security`, `removed`, `deprecated`, `added`, `dev`,
`changed`, `fixed`. Preview: `uvx towncrier build --draft`.
CI runs `towncrier check` on PRs when listed paths change (`towncrier.yml`).
Pure `docs` / `ci` / `chore` commits may omit fragments if they avoid those
paths.
## 11. How to verify this release-process PR (no live cut required)
```bash
python3 scripts/release_assert.py
python3 scripts/release_assert.py 2.14.0 --require-changelog
python3 -m pytest tests/release/ -q
uvx towncrier build --draft # ok if no fragments (empty output / skip)
python3 -c "import tomllib, pathlib; tomllib.loads(pathlib.Path('cog.toml').read_text()); print('cog.toml ok')"
# optional if build deps present:
# python3 -m build && twine check dist/*
```
Confirm docs name GH release/tarball, PyPI, and conda-forge/eon-feedstock;
incomplete-release recovery (§5); and Doxygen deferral (§8).