Skip to content

[Changelog] Compile changelog fragments with towncrier and keep uv.lock in sync - #8118

Merged
StafaH merged 18 commits into
isaac-sim:developfrom
hujc7:jichuanh/towncrier-spike
Sep 30, 2026
Merged

StafaH merged 18 commits into
isaac-sim:developfrom
hujc7:jichuanh/towncrier-spike

Conversation

@hujc7

@hujc7 hujc7 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the custom changelog compiler with towncrier and uv version: tools/changelog/cli.py shrinks from 1,146 to ~320 lines and compiles today's pending fragments to the same versions and entries.
  • Keeps uv.lock in step with the nightly version bumps, so a clean checkout's first uv run no longer rewrites it.

Description

  • Fragments: one <slug>.<type>.rst per entry type (added, changed, deprecated, removed, fixed) holding only * bullets; an empty <slug>.minor / <slug>.major raises the bump; <slug>.skip is unchanged. The check rejects the old <slug>[.minor|.major].rst format. The nightly still splits old-format fragments merged before this change or without re-running CI, in a marked workaround section of cli.py that 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; every CHANGELOG.rst keeps the .. towncrier release notes start marker line; each local package must be in uv.lock at its pyproject.toml version. 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 one uv lock on 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. compile stages exactly its outputs and reports any other changed file.
  • Nightly: compiles only branches carrying tools/changelog/towncrier.toml; release branches pick the change up by backport.
  • isaaclab_tasks_experimental gains a CHANGELOG.rst, so its pending fragments now compile.
  • uv.lock is re-locked once: 9 local package pins had fallen behind their pyproject.toml.
  • Supersedes [Changelog] Move the nightly lifecycle into cli.py auto-bump and sync uv.lock #5867.

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:

Added
^^^^^

* Added :class:`~isaaclab.sensors.FooSensor` for per-link foo readings.

Fixed
^^^^^

* Fixed contact sensor reset behavior when only a subset of environments was reset.

After: one file per type, plus an empty tier file:

# source/isaaclab/changelog.d/add-foo-sensor.added.rst
* Added :class:`~isaaclab.sensors.FooSensor` for per-link foo readings.

# source/isaaclab/changelog.d/add-foo-sensor.fixed.rst
* Fixed contact sensor reset behavior when only a subset of environments was reset.

# source/isaaclab/changelog.d/add-foo-sensor.minor
(empty)

Both compile to the same CHANGELOG.rst entry: 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: compile produced the old tool's versions for all 9 packages with pending fragments, byte-identical CHANGELOG.rst entries 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 in uv.lock.
CI also runs a unit test with the real uv and towncrier.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Screenshots

Not applicable.

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks on the changed files
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a .skip changelog fragment for each package whose CHANGELOG.rst gained the marker; the tooling itself is outside the source packages
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

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.
@github-actions github-actions Bot added documentation Improvements or additions to documentation asset New asset feature or request isaac-mimic Related to Isaac Mimic team infrastructure labels Sep 28, 2026
@hujc7

hujc7 commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 28, 2026
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
@hujc7

hujc7 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 29, 2026
@hujc7
hujc7 marked this pull request as ready for review September 29, 2026 05:11
@hujc7
hujc7 requested a review from a team September 29, 2026 05:11
@hujc7

hujc7 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 29, 2026
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.
@hujc7

hujc7 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 29, 2026

@StafaH StafaH left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@ooctipus

Copy link
Copy Markdown
Collaborator

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.
@hujc7

hujc7 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

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 <slug>.minor.rst / .major.rst notes. That split is one marked section in cli.py to delete once none are pending.

@hujc7

hujc7 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

Trimmed from 15 test functions (32 cases) to 9 (18): dropped the mocked call-shape test, duplicate sync_lock coverage and the split_legacy unit tests, and folded same-path cases into the tables. Each removal is backed by a mutation that a remaining test catches. The real uv/towncrier test now also covers an old-format fragment being split and its tier winning.

@hujc7

hujc7 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 29, 2026
…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
@hujc7

hujc7 commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 30, 2026
@StafaH
StafaH merged commit ee99db6 into isaac-sim:develop Sep 30, 2026
55 of 56 checks passed
kellyguo11 pushed a commit that referenced this pull request Sep 30, 2026
… 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]>
@ooctipus
ooctipus deleted the jichuanh/towncrier-spike branch October 1, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation infrastructure isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants