-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix bug that can't parse materials with implicit library specification. #368
Merged
MicahGale
merged 13 commits into
develop
from
365-material-specifications-cannot-unpack-non-iterable-valuenode-object
Apr 15, 2024
Merged
Fix bug that can't parse materials with implicit library specification. #368
MicahGale
merged 13 commits into
develop
from
365-material-specifications-cannot-unpack-non-iterable-valuenode-object
Apr 15, 2024
Conversation
This file contains 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
MicahGale
added
the
bugs
A deviation from expected behavior that does not reach the level of being reportable as an "Error".
label
Feb 6, 2024
MicahGale
added
the
parsers are hard
Examples of where MCNP syntax is complicated and should be simplified.
label
Feb 12, 2024
This needs to wait until #336 is merged due to the de facto deployment freeze depending on that. |
…-non-iterable-valuenode-object
MicahGale
added
the
critical
An issue that seriously limits user adoption or hampers current use.
label
Feb 14, 2024
…-non-iterable-valuenode-object
Pull Request Test Coverage Report for Build 8695235312Details
💛 - Coveralls |
…-non-iterable-valuenode-object
…-non-iterable-valuenode-object
tjlaboss
approved these changes
Apr 15, 2024
…-non-iterable-valuenode-object
Thank you! |
MicahGale
deleted the
365-material-specifications-cannot-unpack-non-iterable-valuenode-object
branch
April 15, 2024 19:54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bugs
A deviation from expected behavior that does not reach the level of being reportable as an "Error".
critical
An issue that seriously limits user adoption or hampers current use.
parsers are hard
Examples of where MCNP syntax is complicated and should be simplified.
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.
The material parser was built assuming that all isotope specifications required a library, e.g.,
1001.80c
. However according to the 6.2 manual table 3-32:Therefore, this assumption is flawed.
To fix this, a dedicated
MaterialParser
was created.1001
is ambiguous if it is part of a number sequence or a ZAID. So this parser just accepts both Isotopes and number sequences as valid. This avoids the need of contextual parser with a look-ahead capability by making the input contextual as an input level.@SterlingButters you can review this if you like, but you don't need to.
As for the specific error message that was found in #365. The Material assumed it had an
IsotopesNode
which is a list of tuples, and was given aListNode
instead. It tried to unpack theValueNode
inside the list like a tuple, and freaked out.Fixes #365.