-
Notifications
You must be signed in to change notification settings - Fork 1
Add release notes to docs #1071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I copy-pasted these from the release notes on GitHub and tweaked the markdown to format correctly with `mdbook`.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1071 +/- ##
=======================================
Coverage 82.09% 82.09%
=======================================
Files 53 53
Lines 7310 7310
Branches 7310 7310
=======================================
Hits 6001 6001
Misses 1019 1019
Partials 290 290 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a release notes section to the documentation, following the pattern used in MUSE1's documentation. It includes release notes for v2.0.0 (the current release), prepares a draft for v2.1.0 (the next release), and adds automated tests to ensure release notes are maintained for future releases.
Changes:
- Refactored citation verification tests by moving them from
tests/citation_cff.rstotests/release.rsand adding new tests for release note validation - Added release notes documentation files for v2.0.0 and v2.1.0 (draft)
- Updated the PR template to remind contributors to update release notes
- Integrated release notes into the documentation structure via SUMMARY.md
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/release.rs | New test file combining citation version checks with new tests that verify release notes exist and are properly linked |
| tests/citation_cff.rs | Deleted file - functionality moved to tests/release.rs |
| docs/release_notes/v2.1.0.md | Draft release notes for the upcoming v2.1.0 release with features, bug fixes, and experimental features |
| docs/release_notes/v2.0.0.md | Release notes for the current v2.0.0 release, populated from GitHub releases |
| docs/release_notes/README.md | Index page for release notes section with link to v2.0.0 |
| docs/SUMMARY.md | Updated to include release notes section in the documentation navigation |
| .github/PULL_REQUEST_TEMPLATE.md | Added checklist item reminding contributors to update release notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3457c46 to
ee3b564
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| check_link_to_release_notes(Path::new("docs/SUMMARY.md")); | ||
| check_link_to_release_notes(Path::new("docs/release_notes/README.md")); |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test release_notes_file_exists will fail if the release notes file exists but is not yet linked in SUMMARY.md or README.md. This is problematic because the PR description mentions that unreleased version notes (like v2.1.0) are intentionally not included in SUMMARY.md until they are actually released. Consider making the test more flexible to handle this scenario, perhaps by checking if the version has been released before requiring it to be in SUMMARY.md, or by allowing the test to be skipped for pre-release versions.
| check_link_to_release_notes(Path::new("docs/SUMMARY.md")); | |
| check_link_to_release_notes(Path::new("docs/release_notes/README.md")); | |
| // Only require links from SUMMARY/README for non-pre-release versions. | |
| // Pre-release versions typically contain a '-' suffix in their SemVer string | |
| // (e.g., "2.1.0-alpha.1"), and for those it's acceptable for the notes file | |
| // to exist without yet being linked in the docs indices. | |
| if !MUSE2_VERSION.contains('-') { | |
| check_link_to_release_notes(Path::new("docs/SUMMARY.md")); | |
| check_link_to_release_notes(Path::new("docs/release_notes/README.md")); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this makes sense. The other check in this test also doesn't apply to -dev releases though, so we should probably just skip the test altogether in this case.
| - [ ] Update release notes for the latest release if this PR adds a new feature or fixes a bug | ||
| present in the previous release |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checklist item mentions updating release notes "if this PR adds a new feature or fixes a bug present in the previous release". This wording could be clearer. It's ambiguous whether "fixes a bug present in the previous release" means a bug that existed in the previous release (which would warrant a note) or only bugs introduced after the previous release (which wouldn't). Consider rephrasing to make it clear that any user-facing bug fix should be documented in release notes.
| - [ ] Update release notes for the latest release if this PR adds a new feature or fixes a bug | |
| present in the previous release | |
| - [ ] Update release notes for the latest release if this PR adds a new feature or fixes a user-facing bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think the current wording makes more sense. You could have user-facing bugs that were both added and fixed since the last release (not uncommon!) and those don't need documenting.
tsmbland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I've started a new doc for the next release (v2.1.0) and I've populated it based on issues closed since the last release.
Since we won't necessarily know what number the next release will be (it's obvious now, but won't always be), could I propose renaming this to something like upcoming.md. Then when it comes to making a release we can rename the file to whatever release number we decide and create a fresh upcoming.md for the next release. We could also link this in relase_notes/README.md, like "Here is a list of work in progress features which will be available in the next release of MUSE"
Going forward, we should fill this out as we go along.
Don't disagree. I don't really do this for MUSE1 because I find it's easier to put together something cohesive and user-friendly if I write it at the time of release (rather than just collecting a list of bullet points as I go along), but by all means we can do something in-between here.
Also, side point, but apart from now in relase_notes/README.md I don't think we mention anywhere else in the documentation how to actually install MUSE/where to download the executable. It's in the GitHub README, but I think it would be good to make this clearer on the documentation site because this is likely the first thing people will want to know when looking at the documentation!
Another side point, but is it possible to have a documentation page for each release, like we do in MUSE1 (/do we want this?)
docs/release_notes/upcoming.md
Outdated
| - Fix: sign for levies of type `net` was wrong for inputs ([#944]) | ||
| - Fix `--overwrite` option for `save-graphs` command ([#982]) | ||
|
|
||
| [#363]: https://github.com/EnergySystemsModellingLab/MUSE2/issues/363 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In MUSE1 I've set things up so you can write "{github}461" inline to automatically generate links for github issues/PRs. Do you want me to see if I can do something similar here?
Also, do you think it's better to link to the issue, or to the pull request that fixed the issue? I generally do the latter with MUSE1, becuase it's usually more descriptive of the actual change that was made, but what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've obvs gone for linking to the issue, but now that you mention it, linking PRs might make more sense. Will be a faff to change, but we do want to be consistent... maybe I can script it 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably could automatically generate the links, but I think it might be more trouble than it's worth with mdbook. I think the way you'd have to do it is by invoking a script as a preprocessor, which could mean we end up with a dependency on Python for building the docs, which isn't ideal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably could automatically generate the links, but I think it might be more trouble than it's worth with mdbook. I think the way you'd have to do it is by invoking a script as a preprocessor, which could mean we end up with a dependency on Python for building the docs, which isn't ideal.
Ah fair enough. Looks like you can write preprocessors in rust (https://rust-lang.github.io/mdBook/for_developers/preprocessors.html), but might be more effort than it's worth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know! Might be handy for something. I suspect it will be a bit faffier given that Rust isn't really a scripting language though.
I'm not totally averse to having Python be a requirement to work with the docs btw (it already is for the file format stuff anyway). It just seems a bit unnecessary for the mdbook part of the docs -- don't want to end up having to help someone install a Python toolchain just to tweak an equation or something. That said, it might be fine if there's a way to just skip the preprocessing step if Python doesn't exist or whatever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've obvs gone for linking to the issue, but now that you mention it, linking PRs might make more sense. Will be a faff to change, but we do want to be consistent... maybe I can script it 😄
In the end I got Copilot to write a script to do this. It did muck it up the first couple of times, but we got there in the end!
Good idea! I'll do that.
I was thinking we could maybe write some longer sections about anything noteworthy. Maybe like the Linux kernel changelog (though ours will probably be shorter 😄): https://kernelnewbies.org/LinuxChanges
Good point. A lot of users might land on
I don't think there's an easy way to do this with mdbook, so we would have to do some CI shenanigans to build the docs for every version of MUSE2. It is possible and maybe there's some value to it, but the docs are a bit incomplete/wrong in places as it is. We could open an issue for this though -- could be useful in future when the docs are a bit more mature. You can get old versions of the API docs on docs.rs: https://docs.rs/muse2/latest/muse2/ |
My worry is that if we update the documentation as we go along (which we are trying to do, as we should), then it won't necessarily be accurate for users using the latest version, which could end up really confusing. If we don't have a page for every release then I think at least having a "dev" site and a "release" site would be useful. Could also package a documentation build in the download so users have something persistent. |
Do you think we could set things up in a way so that users could run |
|
I'm wondering whether it might actually be worth moving most (but not all) of the content from |
I see your point. I still think it looks quite good to have a fleshed-out GitHub readme, even if there's some repetition with the docs. And realistically this isn't the sort of thing we'd be changing very often. I'll leave it up to you though. |
Yeah, fair enough. Don't want the GitHub readme to be too bare either. Another option is to include the GitHub readme from
Hmm... good point. Maybe it is worth doing sooner rather than later then. Could you open an issue for it? I think there are various technical issues to be worked out here.
Totally. One option would be to bundle the docs, like you suggest, and another would be to have |
Sounds good, I'll open two issues: one for versioning the documentation, and one for adding a |
I had Copilot generate a script to automate this. I checked most of the results and tweaked things a little.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let contents = fs::read_to_string(path).unwrap(); | ||
| assert!( | ||
| contents.contains(&format!("v{MUSE2_VERSION}.md")), | ||
| "File {} does not contain a link to the latest version's release notes", |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message could be more helpful by including the expected filename that should be present. Consider including the format string "v{MUSE2_VERSION}.md" in the error message to make it clear what link is expected.
| "File {} does not contain a link to the latest version's release notes", | |
| "File {} does not contain a link to the latest version's release notes (expected link text: v{{MUSE2_VERSION}}.md)", |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
As suggested by @tsmbland, I've added a release notes section to the documentation, modelled on MUSE1's documentation.
I populated the release notes for the previous release (v2.0.0) from the existing notes on the GitHub releases page. I've started a new doc for the next release (v2.1.0) and I've populated it based on issues closed since the last release. Going forward, we should fill this out as we go along. I haven't included it in
SUMMARY.md, so it won't be built along with the other docs for now -- I figured it would be better to wait until we actually release it, but I suppose we could have the notes for in-progress releases in the docs too, if we want.I added a couple of tests to check that release notes have been added for the latest release in case we forget.
Closes #1068.
Type of change
Key checklist
$ cargo test$ cargo docFurther checks