Skip to content

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

  1. PyPI trusted publishing: on pypi.org, add a pending trusted publisher for the project openmotionlabel: owner MotionFabric, repository OpenMotionLabel, workflow release.yml, environment pypi. No API token is stored anywhere.
  2. GitHub environment: in the repository's settings, create the environment pypi (optionally with required reviewers, so a person approves each upload).
  3. Documentation: in the repository's Pages settings, choose "GitHub Actions" as the source. The docs workflow then publishes the site at https://motionfabric.github.io/OpenMotionLabel/ on every push to main.
  4. Contributor License Agreement: sign in to cla-assistant.io with GitHub and install its GitHub App for MotionFabric. Copy CLA.md into a GitHub gist and link the gist to MotionFabric/OpenMotionLabel. In its settings, exempt yourself and bots such as dependabot[bot]. Then add a branch protection rule for main that requires the CLA assistant's status check, so a pull request can't be merged until every author of its commits has accepted. When CLA.md changes, update the gist too: contributors are then asked to accept the new version.

Each release

  1. Update the version in src/openmotionlabel/__init__.py (for example 1.0.0 or 1.0.1rc1).
  2. In CHANGELOG.md, move the "Unreleased" entries under the new version.
  3. Check locally:

    pytest && ruff check . && mypy
    
    python tools/docs/reference.py --check && mkdocs build --strict
    
  4. Commit, then tag and push:

    git tag v1.0.0
    
    git 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.