Read the JCAMP-DX version as a version, not as the whole record line - #204
Merged
headmeister merged 2 commits intoAug 10, 2026
Merged
Conversation
gdevenyi
force-pushed
the
fix/jcampdx-version-comment
branch
from
August 8, 2026 19:50
a77cf0e to
23be73c
Compare
`ruff format --check` reported twelve files as unformatted, so any change touching one of them dragged unrelated reflow into its diff. Run the formatter once, on its own, so subsequent changes show only what they actually change. Formatting only: no behaviour changes, and `ruff check` is clean before and after. The suite is unchanged at 2140 passed, 12 skipped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017SNrm3jFhpTPShP8xGkePC
_detect_version returned everything after ##JCAMP-DX= and checked it against
a list of literal strings. Spec 2.1 makes $$ a JCAMP-DX comment, and
ParaVision writes one on this very record: the spnam1 of the PV6 and PV7
studies carries
##JCAMP-DX= 5.00 $$ BRUKER JCAMP library (alpha version)
which was rejected with JcampdxVersionError. Folder catches that and drops
the child, so the shape-pulse definition simply disappeared from the tree
with no diagnostic. The whitelist already carried two library-identification
strings rather than versions -- the same problem, patched one spelling at a
time.
Parse the version instead: cut at $$, then take the first token. The
whitelist becomes four version numbers, and both the loaded-parameter path
and verify_version go through the same parser.
Closes isi-nmr#197
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SNrm3jFhpTPShP8xGkePC
gdevenyi
force-pushed
the
fix/jcampdx-version-comment
branch
from
August 8, 2026 20:50
23be73c to
433a6c8
Compare
Contributor
Author
|
Rebased onto #213 ( Integration check across all eleven conformance PRs merged together: 2164 passed, 12 skipped; corpus load test 3202 → 3207 of 3478 with zero newly broken datasets. |
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.
Fixes #197.
Spec 2.1 makes
$$a JCAMP-DX comment._detect_versionreturned the whole line tail and compared it against a list of literals, so a realspnam1was rejected:Folder.make_treecatchesJcampdxVersionErrorand drops the child, so through aFolderthe file just vanished with no diagnostic. The whitelist already carried two library-identification strings rather than versions — the same problem, patched one spelling at a time.Change
JCAMPDX.parse_versioncuts at$$and takes the first token._detect_version, the loaded-parameter path inversion, andverify_versionall go through it, soSUPPORTED_VERSIONSbecomes four version numbers.After the fix both
spnam0andspnam1in the PV6 and PV7 studies load and report5.00;acqpstill reports4.24.Test
test_the_version_record_is_read_as_a_version_not_as_a_whole_linecovers all five spellings observed across the corpus, andtest_an_unsupported_version_is_still_rejectedkeeps the rejection path honest. Both build their file inline — no vendor data.Suite: 2146 passed, 12 skipped.