Repository navigation
build: version the meta package semantically - #31
Conversation
The fixture repo sets the meta version to META_VERSION, so that tests no longer break when a release changes the version, and use semantic versions instead of calendar ones. Part of #26 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The meta distribution foca-plugins switches from calendar to semantic versions (rules in docs/releasing.md) and prepares its first release train, 0.1.0, pinning foca-plugin-generic-routing-random 0.1.0 and foca-plugin-tes-routing-distance 0.1.0. Docs updated for the released plugins. Closes #26 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Spell out the 0.x rule for removed plugins, drop the placeholder changelog entry, flag the PyPI publishers still named after the old environment and build the meta tags of the tests from META_VERSION. Part of #26 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Part of #26 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThis PR converts the Flow diagram for semantic release train versioningflowchart LR
Pins["Pinned plugin changes"] --> Rules["Semantic versioning rules"]
Rules --> Version["foca-plugins 0.1.0"]
Version --> Tag["foca-plugins-v0.1.0"]
Tag --> Release["GitHub release"]
Release --> PreRelease["Pre-release because version is 0.x"]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #31 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 551 551
Branches 71 71
=========================================
Hits 551 551
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/releasing.md" line_range="32-33" />
<code_context>
+ of [cloud-components](https://github.com/elixir-cloud-aai/cloud-components).
+ Each release is a release train: its extras pin plugin versions exactly,
+ and its `foca` requirement declares the FOCA versions that the train was
+ tested with. Its version follows from the changes of the pins since the
+ previous train:
+ - **major:** a pinned plugin gets a major version bump, or a plugin is
+ removed from the train;
</code_context>
<issue_to_address>
**Metadata changes lack version rules**
When a release changes the FOCA requirement or a plugin’s maturity without changing its pinned version, the policy assigns version bumps only for pin changes, but changing the declared FOCA range or moving a plugin between `[experimental]` and `[all]` also changes the published package metadata. Maintainers have no defined version bump for those changes, leaving users on stale dependency constraints or extras, or forcing an arbitrary version choice.
Define how changes to the FOCA requirement and plugin maturity affect the meta distribution’s version.
</issue_to_address>
### Comment 2
<location path="tests/test_release.py" line_range="37" />
<code_context>
- ("foca-plugins-v2026.11.0", "has version '2026.10.0.dev0' on this commit"),
+ ("foca-plugins-0.2.0", "is no tag"),
+ ("foca-plugins-v0.2.0-dev0", "is no tag"),
+ ("foca-plugins-v0.3.0", f"has version '{META_VERSION}' on this commit"),
("foca-plugin-generic-example-noop-v0.1.0", "is never published"),
],
</code_context>
<issue_to_address>
**Malformed version diagnostic passes**
When the mismatch diagnostic contains non-period separators that match the unescaped dots in `META_VERSION`, `test_release_refused` passes `message` to `pytest.raises(match=message)` as a regex, so periods in `META_VERSION` match arbitrary characters. A malformed mismatch diagnostic such as `0x2x0Ydev0` therefore passes, and the test misses incorrect version reporting.
Escape the expected message with `re.escape(message)` before passing it to `pytest.raises(match=...)`.
</issue_to_address>Linked issues
#26 build: version the meta package semantically · 3 of 5 met · 2 to check by hand
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Use semantic versions for the meta package and document the major, minor, and patch rules. | ✅ Met | The versioning rules, including how removals and plugin major bumps affect the train, are documented in docs/releasing.md. |
| 2 | Keep the meta package at 0.x while pinned plugins are 0.x, with breaking changes bumping the minor version. | ✅ Met | The 0.x behavior and an example are included in docs/releasing.md. |
| 3 | Update release documentation, maintainer notes, package version, README, and any checks or tests that expect calendar versions. | ✅ Met | meta/pyproject.toml is set to 0.1.0; the relevant docs and tests are updated, and no calendar-version expectation remains in scripts/. |
| 4 | Release foca-plugins 0.1.0 with the two specified plugin pins. |
👀 Check by hand (external system) | Check PyPI after the release tag is pushed to confirm foca-plugins 0.1.0 is published with both plugin distributions at 0.1.0. |
| 5 | Turn the pending foca-plugins trusted publisher into a regular publisher using the release environment. |
👀 Check by hand (external system) | Check the PyPI trusted-publisher configuration to confirm it names the release environment and is active. |
Sourcery assessment
Needs a human reviewer. 2 findings to address first, and the meta package’s version changes to 0.1.0, and the release workflow will label any 0.x package version as a GitHub pre-release. If a train built from this version is published with the wrong version or metadata, reverting the repository will not remove that published artifact, though a later train can correct it.
Blocking findings: docs/releasing.md:33, tests/test_release.py:37
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Also escape the expected messages of refused tags in the tests. Part of #26 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Switches the meta distribution
foca-pluginsfrom calendar to semanticversions, per the maintainer's decision in #26, and prepares its first
release train,
0.1.0.docs/releasing.md: the meta version rules (major: a pin's major bumpor a removed plugin; minor: an added plugin or a pin's minor bump;
patch: only patch bumps; stays 0.x while the plugins are 0.x, where
major-level changes bump the minor version), with an example; tag
example
foca-plugins-v0.2.0.meta/pyproject.toml: version0.1.0(pins are alreadyfoca-plugin-generic-routing-random==0.1.0andfoca-plugin-tes-routing-distance==0.1.0);uv.lockre-locked.meta/CHANGELOG.md:## 0.1.0with intro, pins and Features (thesebecome the release notes).
README.md,docs/installing.md,meta/README.md(the PyPIdescription): no more "nothing released"; semantic versions; install
examples with
0.1.0.MAINTAINERS.md: PyPI state, plus a to-do: the plugins' publishers werecreated with the environment's old name
pypiand must namereleasebefore their next releases; the pending
foca-pluginspublisher mustname
releasebefore its tag.release.yml: comments only (the prerelease rule0.*already coversthe meta distribution: 0.1.0 becomes a GitHub pre-release).
repofixture sets the meta version toMETA_VERSION, sothe tests no longer depend on the version of the next release.
Full review (tests changed, release workflow touched): adversarial and
quality reviewers, 2 rounds.
Verification
coverage run --source scripts,docs -m pytest tests: 78 passed, 100%coverage
pre-commit run --all-files(ruff, mypy, semgrep, ast-grep, gitleaks,actionlint, package conventions): passed
python -m scripts.checks check: passed;uv build --all-packagesthen
python -m scripts.checks dist dist: passed(
foca_plugins-0.1.0wheel and sdist)Release dry run on this commit:
python -m scripts.release release foca-plugins-v0.1.0givesmeta/foca-plugins/0.1.0;notes foca-plugins-v0.1.0prints the 0.1.0 section;previousisempty (first meta release: the commits list falls back to
meta/)mkdocs build --strict: passedCI: all checks passed (after merging
devwith the Dependabot updatebuild(deps-dev): Bump the python-dependencies group across 1 directory with 4 updates #33 and the Sourcery fixes)
Sourcery: 2 findings fixed (version rules for metadata changes;
re.escapeof expected messages)Note: #32 (FOCA 0.19 support) will bump the plugins, so the 0.1.0 train
will pin the new plugin versions; it is tagged only after #32.
Declined review findings
(low): the tag follows right after this merge.
are applied by hand in the release PR, as now documented.
Closes #26
🤖 Generated with Claude Code