Repository navigation
Conversation
Serpent 2.2.3 with ``set depmtx 1`` writes additional scalar and matrix declaration lines (e.g. ``flx = 2;``, ``N0 = zeros(n, 1);``) between the time header and the first N0 isotope entry. The reader raised a ``SerpentToolsException`` when it hit these unrecognized lines. Add a loop in ``DepmtxReader._read`` that advances past any lines which do not match ``NDENS_REGEX`` before starting to parse the N0 block. The fix is backward-compatible: files without extra lines are parsed identically. Add a regression test that prepends ``flx`` and ``N0 = zeros`` lines to the existing ``depmtx_ref.m`` fixture and verifies the parsed arrays match the reference reader output exactly. Fixes CORE-GATECH-GROUP#533 Signed-off-by: Mike German <mike@stepsventures.com>
steps-re
force-pushed
the
fix/depmtx-extra-header-lines
branch
from
August 5, 2026 15:55
68aea96 to
64992b2
Compare
Collaborator
Contributor
Author
Collaborator
|
thank you 😁 |
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
Serpent 2.2.3 with
set depmtx 1writes additional scalar and matrix declaration lines between the time header and the N0 isotope data, for example:The current reader immediately tries to match the line after
t = ...as an N0 entry and raises:Fix
In
DepmtxReader._read, advance past any lines that do not matchNDENS_REGEXbefore starting to parse the N0 block. The change is backward-compatible: files without extra lines are parsed identically.Test
Added
test_depmtx_extra_header_lineswhich prependsflxandN0 = zerosdeclarations to the existingdepmtx_ref.mfixture and verifies the parsed arrays exactly match the unmodified reference reader.Fixes #533
Signed-off-by: Mike German mike@stepsventures.com