Development¶
How a release of sbmlsim-core is made. The toolchain, the build of the engine and the tests are in Installation and Test suite.
Release¶
A release is made from develop. Since develop only accepts pull requests, the release is prepared on a branch and tagged once that pull request is merged. The tag vx.y.z starts .github/workflows/publish.yml, which publishes the python package to PyPI and the package to npm with trusted publishing and provenance, so the tag is the publication and cannot be moved or deleted afterwards.
- branch off
develop:git switch -c release/x.y.z develop - write the release notes in
release-notes/x.y.z.md, which the jobcheckofpublish.ymlrequires -
set the version in every place which carries it, which is not only the manifests:
Where What compares it, and when Cargo.toml,[workspace.package], andCargo.lock, whichcargorefreshesthe job checkofpublish.yml, against the tagjs/package.jsonand the two entries ofjs/package-lock.jsonthe job checkofpublish.yml, against the tagCORE_VERSIONofjs/panels.mjsjs/prepack.mjsatnpm pack, which runs only while the tag publishesthe compileroftestdata/golden/model.jsoncargo test --all-features, the jobchecksofci.ymlthe header and the CORE_VERSIONofpython/sbmlsim_core/web/sbmlsim-core.js, the inline build of the JavaScript hostpython/tests/test_web.py, the jobpython-bindingsofci.ymlthe examples: the CDN of js/README.mdand ofdocs/javascript.md, the compiler ofdocs/simulating.md, the fourtag = "vX.Y.Z"of the git dependencies ofdocs/rust.mdnothing A version left behind in the golden model fails the job
checksand with it every job which builds a wheel, so a missed place looks like eight of the fourteen checks red whiletestsuite-parityandtestsuite-casesstay green, the engine itself being unchanged. -
the inline build is generated and is never edited by hand:
cd js && npm ci && node build.mjs, thennode build.mjs --check, which compares the committed build with its sources - make sure everything passes:
cargo fmt --check,cargo clippy --all-targets --all-features -- -D warningsandcargo test --all-features, which buildsengine.wasmand needsWASI_SDK_PATH(see Installation) - push the branch, open the pull request against
developand merge it once the checks are green -
tag the merged commit on
developand push the tag:Check the version before pushing: the tag publishes to PyPI and to npm, and a version of either registry cannot be taken back.
The tag makes all three of a release: the python package on PyPI, the package on npm and the release of this repository, named
sbmlsim-core x.y.zwith the body ofrelease-notes/x.y.z.md. The jobgithub_releasemakes the last one once both registries carry the version, so a release of this repository never announces a version a registry does not have. Nothing of a release is made by hand. -
bump the live demo of the documentation, which is vendored from the published npm package and so can only follow the tag: set
NPM_VERSIONofscripts/demo_assets.pyto the new version, runuv run scripts/demo_assets.pyto vendor the package and compile the model again, compare it withuv run scripts/demo_assets.py --checkand takedocs/demo/through a pull request of its own. Nothing compares this one either, so a demo left behind keeps running the engine of the release before.
CORE_VERSION of js/panels.mjs is the one version no check of a pull request compares, since npm pack runs only while the tag publishes; a release which gets it wrong fails after the tag exists.