Releasing¶
Releases are built and published by the release workflow when a version tag is pushed. The
interface is built into the package first, so the wheel and the source archive install without
Node.js.
Once: set up publishing and contributions¶
- PyPI trusted publishing: on pypi.org, add a pending trusted publisher
for the project
openmotionlabel: ownerMotionFabric, repositoryOpenMotionLabel, workflowrelease.yml, environmentpypi. No API token is stored anywhere. - GitHub environment: in the repository's settings, create the environment
pypi(optionally with required reviewers, so a person approves each upload). - Documentation: in the repository's Pages settings, choose "GitHub Actions" as the source.
The
docsworkflow then publishes the site at https://motionfabric.github.io/OpenMotionLabel/ on every push tomain. - Contributor License Agreement: sign in to cla-assistant.io
with GitHub and install its GitHub App for
MotionFabric. CopyCLA.mdinto a GitHub gist and link the gist toMotionFabric/OpenMotionLabel. In its settings, exempt yourself and bots such asdependabot[bot]. Then add a branch protection rule formainthat requires the CLA assistant's status check, so a pull request can't be merged until every author of its commits has accepted. WhenCLA.mdchanges, update the gist too: contributors are then asked to accept the new version.
Each release¶
- Update the version in
src/openmotionlabel/__init__.py(for example1.0.0or1.0.1rc1). - In
CHANGELOG.md, move the "Unreleased" entries under the new version. -
Check locally:
pytest && ruff check . && mypypython tools/docs/reference.py --check && mkdocs build --strict -
Commit, then tag and push:
git tag v1.0.0git push origin main v1.0.0
The workflow builds the interface and the packages, installs the wheel on Windows, macOS and
Linux and runs a smoke test there (tools/release/smoke_test.py: the example session labeled,
filled and given events, and the server answering), then publishes to PyPI and creates a GitHub
release with the files. A tag with rc, a or b in it is published as a pre-release.
Building by hand¶
cd frontend && npm ci && npm run build && cd ..
python -m pip install build twine
python -m build && twine check dist/*
python tools/release/smoke_test.py
The smoke test runs against the installed oml, so run it in a fresh environment where the
built wheel is installed.