Repository navigation
CI and packaging: SonarCloud version, single CMake version literal, Dependabot and release from tested package - #424
Conversation
src/nunavut/_version.py isn't executable, so the sonar job's set-environment step failed with "Permission denied". That left NUNAVUT_MAJOR_MINOR_VERSION empty, and SonarCloud kept reusing the old "2.3" project version for every analysis since February 2026. Run the script through python3, the same way release.yml does. sonar.buildString was also always empty, because GITHUB_RUN_ID isn't available through the env context. Use github.run_id instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NunavutConfigVersion.cmake hard-coded the version in three places. Only PACKAGE_VERSION was updated for 3.1, so the major-version check still read "3.0". A 4.0 release that updated only PACKAGE_VERSION would have computed major version 3 and rejected find_package(Nunavut 4.0). Read PACKAGE_VERSION in the other two places, the same way CMake's SameMajorVersion template uses one value everywhere. Remove set(NUNAVUT_VERSION "3.0") from NunavutConfig.cmake: execute_process overwrites it before anything reads it. Add a test that requires exactly one quoted version literal across both files, on the PACKAGE_VERSION line, matching the major.minor of __version__. Closes #423 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…420) - Add .github/dependabot.yml: weekly github-actions updates in one grouped PR. - Bump actions to their Node 24 majors: checkout v7, upload-artifact v7, download-artifact v8, setup-python v7, sonarqube-scan-action v8.3.0. This removes the Node.js 20 deprecation warning on 62 of 63 jobs. - release.yml no longer lints, tests and builds the tagged commit again. After the version check, it finds the successful push run of test.yml for that commit, downloads its pypi-package artifact and uploads that. It fails with a specific message if the commit was never tested, the run hasn't succeeded, or the artifact has expired. workflow_dispatch with a tag runs everything except the upload, as a dry run. - test.yml cancels superseded pull_request runs. Branch-push runs each get their own concurrency group, so every main run finishes and leaves a package for release.yml. Closes #420 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |



SonarCloud has labeled every analysis since February 2026 as version "2.3", including the latest one of the 3.1.0 release commit (
cce94a9).Cause: the sonar job's
set-environmentstep runs./src/nunavut/_version.py --major-minor-only, but the file is mode100644in git. The run log shows./src/nunavut/_version.py: Permission denied.echostill succeeds, so the step passes,NUNAVUT_MAJOR_MINOR_VERSIONends up empty, and the scanner receives-Dsonar.projectVersion=with no value. SonarCloud then reuses the last version it was given.-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}was empty for a similar reason:GITHUB_RUN_IDis a runner environment variable and isn't exposed through theenvcontext.Changes
python3 ./src/nunavut/_version.py --major-minor-only, matchingrelease.yml. Locally this prints3.1.${{ github.run_id }}forsonar.buildStringin both the release and PR scan steps.The PR scan from this branch should show the new arguments in the sonar job log. The project version on the SonarCloud dashboard should switch to 3.1 after the first
mainanalysis once this merges.CMake package version literals (#423)
NunavutConfigVersion.cmakehard-coded the version in three places, and onlyPACKAGE_VERSIONwas updated for 3.1. The major-version check still read"3.0", andNunavutConfig.cmakealso setNUNAVUT_VERSION "3.0".NunavutConfigVersion.cmakenow reads"${PACKAGE_VERSION}"in theMATCHEScheck and theCVF_VERSION_MAJORfallback, soset(PACKAGE_VERSION "3.1")is the only place to update.set(NUNAVUT_VERSION "3.0")fromNunavutConfig.cmake.execute_processoverwrites it before anything reads it.test_cmake_package_version_matches_versionintest/gentest_versions/test_versions.pyrequires exactly one quoted version literal across both files, on thePACKAGE_VERSIONline, matching the major.minor of__version__. It failed onmain(listing the three stale"3.0"literals) and passes with this change on Python 3.11 and 3.14.cmake -Pprobe gives the same COMPATIBLE/EXACT results before and after for requests 3.0, 3.1, 3.2, 4.0 and 2.9, plus several version ranges. In a copy bumped to4.0, the old file rejectsfind_package(Nunavut 4.0)(it still computes major 3); the new file accepts it.The test only counts double-quoted literals. An unquoted stale version, such as
set(X 3.0), would not be caught.Closes #423
CI modernization (#420)
Dependabot: new
.github/dependabot.ymlchecksgithub-actionsweekly and groups every update into one PR. Thetoxic/toolshedcontainer images named in the workflows aren't covered and still need manual bumps.Node 24 actions:
checkoutv4→v7,upload-artifactv4→v7,download-artifactv4→v8,setup-pythonv5→v7,sonarqube-scan-actionv6.0.0→v8.3.0. I read the release notes for each skipped major. None of the breaking changes affect how this repo uses these actions:download-artifactv8 now fails on a digest mismatch.setup-pythonv7 removespip-install, which isn't used here.No second test run at release time:
release.ymlno longer lints, tests and builds the tagged commit again. It now:__version__(unchanged);pushrun oftest.ymlfor the tagged commit;pypi-packageartifact;twine.What gets published is exactly what CI built and tested. One side effect: the wheel's build number is now the
test.ymlrun ID (noxfile.pyreadsGITHUB_RUN_ID).pushrun oftest.ymlfor the commit (tag not onmain/*.preview)__version__Dry run: the Run workflow button (
workflow_dispatchwith ataginput) runs every step except the upload.Concurrency:
test.ymlcancels a pull request run when a newer push supersedes it. Branch-push runs each get their own group (keyed by run ID), so everymainrun finishes and leaves a package for the release.Checks:
actionlint(with shellcheck) passes on both workflows.3.1.0found run 40213769476, and itspypi-packageartifact containsnunavut-3.1.0-py3-none-any.whlandnunavut-3.1.0.tar.gzat the root;3.0.1b1failed because its artifact has expired;Not verifiable until after merge:
main— run it against3.1.0;Closes #420
🤖 Generated with Claude Code