Skip to content

Prepare the first release: packaging, license texts, docs site, release workflow - #2

Merged
gonzalocasas merged 3 commits into
mainfrom
chore/release-setup
Nov 12, 2026
Merged

gonzalocasas merged 3 commits into
mainfrom
chore/release-setup

Conversation

@gonzalocasas

Copy link
Copy Markdown
Member

Sets up the first release: packaging metadata, versioning, changelog, the license texts of the Rust crates in the wheel, a docs site, and the release workflow on compas-dev/compas-actions@v1, following compas_pb. Stacked on #1, which should be merged first.

Releasing, once this is merged

  1. Run prepare release (Actions tab, choose minor). It opens release/v0.1.0, which bumps the version and dates the changelog.
  2. Merge it. release builds and tests the wheels and the sdist, publishes them to PyPI, creates the GitHub release and deploys the docs.

What's here

  • Version: 0.0.0 in crates/motion_py/Cargo.toml, where maturin reads it. compas-actions accepts plain X.Y.Z only, so the first release PR bumps it to 0.1.0. [tool.bumpversion] also covers Cargo.lock, __version__ and the changelog heading, which are the only files a release may change.
  • Release workflow: release.yml calls wheels.yml, so the release builds and tests exactly what CI does: Linux x86_64, macOS universal2 and Windows x64 wheels on Python 3.9 and 3.13, plus an sdist built and tested from scratch. Before publishing, it checks that every file carries the release version and passes twine check --strict. Publishing uses PyPI trusted publishing, so there are no tokens.
  • License texts: licenses/THIRD_PARTY_RUST.txt holds the licenses of the 59 crates compiled into the extension, generated with cargo-about (MIT where a crate offers a choice). Wheels and the sdist ship it. A CI job fails if it drifts from Cargo.lock.
  • Metadata: classifiers, keywords, project URLs, dev and docs extras, and ruff settings as in compas_fab (import sorting fixed accordingly). The repo description, homepage, topics and the no changelog label are already set.
  • Docs: an mkdocs site in the compas_fab style (home, how it works, API reference from the docstrings, changelog, license), deployed with mike on release. The README and the docs home page now say pip install compas_fab_native and drop the "spike" wording.

Checked locally

  • A dry run of the release on a clone: bump-my-version 1.3.0 minor gives exactly the five allowed files, Cargo.lock stays consistent, compas-actions' check_release.py reports is-release=true, v0.1.0, and maturin builds compas_fab_native-0.1.0.
  • The wheel and sdist contain LICENSE, NOTICE and all of licenses/, and twine check --strict passes.
  • mkdocs build --strict passes; 40 Python tests, the six examples, ruff and cargo fmt pass.

Expect once

The release metadata check fails on this PR, and the release detection fails once on the merge to main. main has no [tool.bumpversion] yet, so there's no version to compare against. From the next PR on, there is.

Needed outside this PR

  • PyPI: add a pending trusted publisher for compas_fab_native: owner compas-dev, repository compas_fab_native, workflow release.yml, environment pypi.
  • GitHub Pages: after the first release creates gh-pages, enable Pages from that branch. The site should then appear at compas.dev/compas_fab_native, as compas_pb's does.

🤖 Generated with Claude Code

gonzalocasas and others added 3 commits November 11, 2026 23:10
- pyproject.toml: classifiers, keywords, project URLs, dev and docs
  extras, ruff settings (as in compas_fab), and the bump-my-version
  configuration compas-actions releases with. The version starts at
  0.0.0 (compas-actions accepts plain X.Y.Z only); the first release
  bumps it to 0.1.0.
- CHANGELOG.md in the Keep a Changelog layout compas-actions expects.
- licenses/THIRD_PARTY_RUST.txt: license texts of the 59 Rust crates
  compiled into the extension, generated with cargo-about (about.toml,
  about.hbs), MIT preferred where a crate offers a choice. Wheels ship
  it with the other license files.
- __version__, and no more "spike" in the package and bindings docs.
- Imports sorted with compas_fab as a third-party package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README and the docs home page: pip install compas_fab_native, which
  platforms have wheels, how to develop and how to release.
- mkdocs site in the compas_fab style (material, mike, mkdocstrings):
  home, how it works, API reference, changelog, license.
- Links to SPIKE.md point to GitHub, since it lives outside docs/.
- Demo README: the UR description's license file is in compas_fab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- prepare-release.yml opens a release pull request (version bump and
  dated changelog); merging it runs release.yml.
- release.yml: detects the release merge, builds and tests the wheels
  and the sdist through wheels.yml, checks their versions and metadata,
  publishes to PyPI with trusted publishing, creates the GitHub release
  and deploys the docs with mike.
- wheels.yml can be called by release.yml, also builds the sdist, and
  tests a build from it.
- pr-checks.yml: release metadata and changelog checks.
- docs.yml: strict docs build on pull requests.
- ci.yml: ruff, and a check that the shipped Rust license texts match
  Cargo.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from feat/rust-sphere-fitting to main November 12, 2026 07:08
@gonzalocasas
gonzalocasas merged commit 8761f9e into main Nov 12, 2026
18 checks passed
@gonzalocasas
gonzalocasas deleted the chore/release-setup branch November 12, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant