Repository navigation
Warn about flagged and outdated versions at runtime - #407
Merged
Merged
Conversation
QSIRecon is not published on PyPI, so check_latest() never found anything there. Point it at the Docker Hub tags API instead, which is where releases are actually distributed and has a far higher unauthenticated rate limit than the GitHub API, and wire it into the parser so users see the "newer version available" banner. Also correct the docs note: 26.0.1 was tagged without these checks.
This was referenced Oct 16, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
==========================================
+ Coverage 50.69% 51.43% +0.73%
==========================================
Files 55 55
Lines 8109 8125 +16
Branches 944 947 +3
==========================================
+ Hits 4111 4179 +68
+ Misses 3756 3704 -52
Partials 242 242 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports fMRIPrep's version-check infrastructure (nipreps/fmriprep#1715) to QSIRecon.
.versions.jsonat the repository root maps release versions to the reason they were flagged. At startup,_build_parserfetches that file frommainand prints fMRIPrep'sFLAGGEDbanner to stderr if the running version appears in it. The file starts with1.2.0and26.0.0, flagged for the template-space.mifparcellation bug (Connectivity .mif parcellations are in template space, not DWI space #399), matching the "Major bugs affecting this version" sections of the changelog.check_latest()(present since the rename from QSIPrep but never called, and pointed at PyPI, where QSIRecon is not published) now queries the Docker Hub tags API and prints the "newer version available" banner. Docker Hub is where releases are distributed, and its unauthenticated rate limit (180 per window, per IP) is far more forgiving than GitHub's 60/hour for clusters behind a shared NAT. Results are cached in~/.cache/qsirecon/latestfor 14 days.try, so a captive portal, rate-limit body, malformed.versions.json, or odd tag name (latest,unstable) can never stop a run.installation.rst, adapted from fMRIPrep's FAQ; the banners link to it.requestsis now a declared dependency (it was only installed transitively).pixi.lockis left for the lockfile workflow.Note that 26.0.1 was tagged without these checks, so releases up to and including 26.0.1 will not print a warning even if they are listed in
.versions.json. The docs say so.Test plan
qsirecon/tests/test_version.pyandqsirecon/tests/test_parser.py(37 tests, ported from fMRIPrep plus cases for non-JSON, rate-limit, and non-version-tag responses) pass locally.versions.json: 26.0.0 prints theFLAGGEDbanner; a non-JSON response is ignoredRelated PRs
The same change in the other PennLINC BIDS Apps:
.versions.jsonflagging🤖 Generated with Claude Code