Repository navigation
[Changelog] Compile changelog fragments with towncrier and keep uv.lock in sync - #8118
Conversation
Replace the custom compiler with towncrier and uv. `cli.py compile` builds each package's entry with `towncrier build`, bumps its version with `uv version --bump` (patch, or minor/major from an empty `<slug>.minor`/`<slug>.major`), and re-locks uv.lock, refusing any change beyond package version lines. `cli.py check` keeps the per-package fragment gate. Fragments become one `<slug>.<type>.rst` per entry type. Legacy `<slug>[.minor|.major].rst` fragments are still accepted and split, so open PRs need no migration. The nightly and the fragment check run on a pinned uv, the check also runs `uv lock --check`, and pre-commit checks the release-notes marker and bullet-only fragments.
Insert `.. towncrier release notes start` below each CHANGELOG.rst header so towncrier writes new entries after it, and give isaaclab_tasks_experimental a CHANGELOG.rst so its pending fragments are compiled.
Ten local package pins lagged their pyproject.toml versions, so the first `uv run` on a clean checkout rewrote uv.lock. Only those version lines change.
|
run-ci |
Move the legacy fragment split into its own module so it can be dropped as a whole. `cli.py check` now also verifies the release-notes marker, the bullet-only fragment body, and that each local package's uv.lock pin matches its pyproject.toml, without resolving the rest of the lock; the pygrep hooks and the global `uv lock --check` step are removed. The checks are named after what they verify. `cli.py compile` stages exactly its outputs, reports any other changed file, and holds every version bump when the re-lock is refused. The nightly compiles only branches that carry tools/changelog/towncrier.toml.
…er-spike # Conflicts: # docs/source/refs/contributing.rst # skills/developer/changelog-fragments/SKILL.md
|
run-ci |
|
run-ci |
Move the workaround for pre-towncrier fragments into a marked section of cli.py so the tool is one module, split into shared helpers, the legacy workaround, check and compile. Removing the workaround later means deleting that section and its two callers.
|
run-ci |
StafaH
left a comment
There was a problem hiding this comment.
LGTM, let's drop the legacy check, and just make the precommit fail if they are not using the twoncrier format (in the simplest way, no need to write too much logic to check)
|
we can drop/combine some of the low value tests |
The check now rejects old-format fragments with an error that states the expected names and points to the changelog-fragments skill. The nightly still splits old-format fragments merged before this change or without re-running CI. Consolidate the tests on the check and compile entry points: drop the mocked call-shape and duplicate lock tests and the split unit tests, and fold same-path cases into the tables. A mutation of each covered rule fails a remaining test.
|
Done: the check now rejects the old fragment format, with an error that states the expected names and points to the changelog-fragments skill. The nightly still splits old-format fragments that were already merged (two PRs landed with them today), because without that towncrier silently drops |
|
Trimmed from 15 test functions (32 cases) to 9 (18): dropped the mocked call-shape test, duplicate |
|
run-ci |
…er-spike # Conflicts: # source/isaaclab/docs/CHANGELOG.rst # source/isaaclab_experimental/docs/CHANGELOG.rst # source/isaaclab_newton/docs/CHANGELOG.rst # source/isaaclab_ov/docs/CHANGELOG.rst # source/isaaclab_tasks/docs/CHANGELOG.rst
|
run-ci |
… uv docs CLI (#8118, #8105, #8179) (#8210) ## Summary Backports three `develop` PRs to `release/3.0.0`, in merge order: 1. #8118 — towncrier changelog tooling 2. #8105 — camera hot-path cleanup [7B/7] 3. #8179 — uv CLI for Windows docs builds The automatic backport failed for #8118 and #8105. For #8179, this supersedes the bot's draft: - #8209 — bot draft backport of #8179 Once merged, the nightly compiles `release/3.0.0` again: it skips release branches without `tools/changelog/towncrier.toml`. # Description Each PR is cherry-picked with `-x`; every code file matches its source patch. Release-specific changes: 1. #8118 (`ee99db6a820`) - Each `CHANGELOG.rst` conflict resolved as the marker line above the release entries. - `uv.lock` unchanged: release's local package pins already match their `pyproject.toml`. - The bot failed here because `uv.lock` pushed its conflict context past the 1.5M-character inference limit. 2. #8105 (`cd917691992`) - Drops the `.github/workflows/build.yaml` hunk: it edits the `performance-smoke` job, which `release/3.0.0` does not have. The bot's validation rejected this omission. - Splits its 10 old-format fragments into the new format with `cli.py`'s `split_legacy`, keeping all 34 bullets; #8118's check rejects the old format. 3. #8179 (`c1a8bfa50b5`) - Deletes `docs/make.bat`; release held an older copy. - Splits its fragment the same way. - Release's `docs/_redirect/index.html` still hardcodes `./main/` (#7767 is not on this branch), so `isaaclab --docs_multi` writes that redirect unchanged, as release's `make multi-docs` does. ## Type of change - Release backport, carrying #8105's breaking change (`isaaclab` major bump) - New feature, bug fix and documentation update from the source PRs ## Validation 1. `cli.py check release/3.0.0` passes. 2. `tools/changelog` tests: 18 passed. 3. `pre-commit` over the range passes. 4. `cli.py compile` on a scratch copy of this branch: - 9 packages bumped, including `isaaclab` 25.1.0 → 26.0.0 and `isaaclab_tasks_experimental` 0.0.1 → 1.0.0 - every fragment consumed, only its outputs staged - `uv.lock` changed in version lines only 5. Runtime coverage for #8105 and #8179 is left to CI. ## Release backport This PR targets the release branch; no additional backport is needed. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) on the changed files - [x] I have made corresponding changes to the documentation (carried from the source PRs) - [ ] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage (source PRs' tests carried unchanged) - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (carried from the source PRs; #8105 and #8179 converted to the new format) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Co-authored-by: Mustafa H <[email protected]>
Summary
uv version:tools/changelog/cli.pyshrinks from 1,146 to ~320 lines and compiles today's pending fragments to the same versions and entries.uv.lockin step with the nightly version bumps, so a clean checkout's firstuv runno longer rewrites it.Description
<slug>.<type>.rstper entry type (added,changed,deprecated,removed,fixed) holding only*bullets; an empty<slug>.minor/<slug>.majorraises the bump;<slug>.skipis unchanged. The check rejects the old<slug>[.minor|.major].rstformat. The nightly still splits old-format fragments merged before this change or without re-running CI, in a marked workaround section ofcli.pythat never overwrites an existing fragment; delete that section once none are pending.cli.py check(pre-commit and the fragment-check job): each changed package must add a valid fragment and may not change a pending one; everyCHANGELOG.rstkeeps the.. towncrier release notes startmarker line; each local package must be inuv.lockat itspyproject.tomlversion. The rest of the lock is not resolved, so unrelated dependency drift never fails a PR.cli.py compile(nightly): runs only on a clean checkout. Per package,uv version --bump+towncrier build, then oneuv lockon the uv pinned in the Docker images. If the re-lock fails or would change anything but local packages' versions, nothing is committed that night.compilestages exactly its outputs and reports any other changed file.tools/changelog/towncrier.toml; release branches pick the change up by backport.isaaclab_tasks_experimentalgains aCHANGELOG.rst, so its pending fragments now compile.uv.lockis re-locked once: 9 local package pins had fallen behind theirpyproject.toml.Before / after, for a PR that adds a feature and a fix with a minor bump.
Before: one file,
source/isaaclab/changelog.d/add-foo-sensor.minor.rst:After: one file per type, plus an empty tier file:
Both compile to the same
CHANGELOG.rstentry: the check rejects the first in new PRs, and the nightly splits any already merged into the second.Verified in a scratch clone of
develop:compileproduced the old tool's versions for all 9 packages with pending fragments, byte-identicalCHANGELOG.rstentries for 7 and the same bullets in fragment-name order (instead of merge order) for 2, consumed every fragment, staged only its outputs, and changed only version lines inuv.lock.CI also runs a unit test with the real uv and towncrier.
Type of change
Release backport
developScreenshots
Not applicable.
Checklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks on the changed files.skipchangelog fragment for each package whoseCHANGELOG.rstgained the marker; the tooling itself is outside the source packagesCONTRIBUTORS.mdor my name already exists there