Repository navigation
Conversation
A trailing jump kept by explicit_jumps has no end padding, so a value appended after it was written as J350. ListNode.format now adds a space after a shortcut when its output is not already whitespace-terminated. Updated the universe data test input and assertions to cover this. Co-Authored-By: Claude <noreply@anthropic.com>
…eated-0-crashes-the-write-and-trailing-zeros-are-dropped
MicahGale
marked this pull request as ready for review
November 5, 2026 20:40
This branch has not been deployed
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.
Pull Request Checklist for MontePy
Description
This fixes a few bugs with how
UniverseInputhandles zeros as brought up in #1051.Bug in how
0are transformed back toJump.In MCNP
0andJare interchangeable for Universes. When an explicit 0 was created by0 2RMontePy tried to coerce it back to a Jump, but not fully. This lead to internal errors with trying to combine it with the repeat shortcut.This was solved by not coercing these explicit
0s back toJump.Dropping trailing Jumps from input.
Usually MCNP lets you drop extra final jumps and implicitly fills out the array. Though as pointed out in #1051 the manual states this is not allowed for a
UniverseInputin the data block. These ones must always be explicitly set for every cell, even if just toJump. To solve this one I just made a mechanism for not allowing the final jump to be dropped by default. This only really shows up with Universes are moved from the cell block where implicit universes are allowed, to the data block, where they are not allowed.Fixes #1051
General Checklist
blackversion 26.LLM Disclosure
Are you?
Were any large language models (LLM or "AI") used in to generate any of this code?
Documentation Checklist
.. versionchanged::or.. versionadded::directives.Infrastructure Changes
Significant features or Behavior changes
First-Time Contributor Checklist
pyproject.tomlif you wish to do so.Additional Notes for Reviewers
Ensure that:
📚 Documentation preview 📚: https://montepy--1052.org.readthedocs.build/en/1052/