Closed MicahGale closed 2 weeks ago
Not actually replicating #499 yet.
The first expansion is ok. It seems to occur on the $N^\text{th}$ expansion on a line where $N>1$.
Awww. I see. Thanks.
This looks more correctly failing:
> assert new_line == gold_line.rstrip().expandtabs(8)
E AssertionError: assert 'imp:e 0 2r 2r' == 'imp:e 0 2r 1 r'
E
E - imp:e 0 2r 1 r
E ? ^^
E + imp:e 0 2r 2r
E ? ^
I accidentally stumbled upon #489 in this testing:
E AssertionError: assert '10214 0 (1 2.03.04)' == '10214 0 (1 2i 4)'
E
E - 10214 0 (1 2i 4)
E ? ^^^
E + 10214 0 (1 2.03.04)
E ? ^^^^^
(this is for tests/inputs/test_interp_edge.imcnp
).
The ShortcutNode
-> GeometryTree
-> ShortcutNode
transform is a bit lossy. The question is: is this acceptable for now?
Top/right side is the original input.
E AssertionError: assert '10214 0 (1 2I 4 )' == '10214 0 (1 2i 4)'
E
E - 10214 0 (1 2i 4)
E ? ^^
E + 10214 0 (1 2I 4 )
E ? ^ +
Edit: now tracked in #527.
Yes.
Also found: #526, #524
MCNP Test Model
C Cells
C Graveyard
99 0 +1010
C Seven spheres within a sphere
1 1 -10 -1001
2 1 -10 -1002
3 1 -10 -1003
4 1 -10 -1004
5 1 -10 -1005
6 1 -10 -1006
7 1 -10 -1007
8 0 -1010 1001 1002 1003 1004 1005 1006 1007
C surfaces
1001 SO 0.1
1002 SX -1.1 0.1
1003 SX +1.1 0.1
1004 SY -1.1 0.1
1005 SY +1.1 0.1
1006 SZ -1.1 0.1
1007 SZ +1.1 0.1
1010 SO 3
C data
C Let the importances be equal.
imp:n 0 1 2 3 10 12 14 16 1
C Second linear interpolation recompressed incorrectly
imp:p 0 2i 3 10 2i 16 1
C Repeat
VOL J 1 2R 2 10 2R 20
C materials
C UO2 5 atpt enriched
m1 92235.80c 5
92238.80c 95
C execution
ksrc 0 0 0
kcode 100000 1.000 50 1050
mode n p
MCNP Test Model
C Cells
C Graveyard
99 0 +1010
C Seven spheres within a sphere
1 1 -10 -1001
2 1 -10 -1002
3 1 -10 -1003
4 1 -10 -1004
5 1 -10 -1005
6 1 -10 -1006
7 1 -10 -1007
8 0 -1010 1001 1002 1003 1004 1005 1006 1007
C surfaces
1001 SO 0.1
1002 SX -1.1 0.1
1003 SX +1.1 0.1
1004 SY -1.1 0.1
1005 SY +1.1 0.1
1006 SZ -1.1 0.1
1007 SZ +1.1 0.1
1010 SO 3
C data
C Let the importances be equal.
imp:n 0 1 2 3 10 12 14 16 1
C Second linear interpolation recompressed incorrectly
imp:p 0 2i 3 3i 16 1
C Repeat
C Repeat
VOL J 1 2R 2 10 2R 20
C materials
C UO2 5 atpt enriched
m1 92235.80c 5
92238.80c 95
C execution
ksrc 0 0 0
kcode 100000 1.000 50 1050
mode n p
Can decide if coverage needs to be increased: https://coveralls.io/builds/69589075
141 of 144 new or added lines in 6 files covered. (97.92%)
1 existing line in 1 file now uncovered. 6146 of 6265 relevant lines covered (98.1%)
0.98 hits per line
Need to test multiple consecutive shortcuts of all types. For example, the following linear interpolation is expanded incorrectly.
< imp:p 0 2i 3 10 2i 16 1 --- > imp:p 0 2i 3 3i 16 1
526 also persists. I'll post an example.
I think I covered this one right?
Try reading and rewriting this input: https://github.com/idaholab/MontePy/pull/520#issuecomment-2325199121
I'm using commit 843db181452f29c36780ec4094273c1df1d0732d
Ohh I see it now, I focused on the wrong problem there.
Ok your bug with regards to Importance
seems to be solved.
This had to be manually addressed because importance
is a special snow-flake and has its own system for handling syntax trees.
And... it broke again.
Description
Bug fix #499
This fixes the bug from #499. This bug came down to a bug when two repeat shortcuts are touching. The second repeat assumes that the repeat node to its left is the value this one is repeating. To solve this the logic is updated to see if these edge values match.
Test Improvement #497
In the process I implemented testing where all valid input files are readin, "written" out and then re-read in, and the original and new files are compared. This found various padding bugs.
Bug fix: #489
For the bug: #489, interpolations (and all shortcuts) in geometry definitions were not recompressed. This was due to the fact that the
GeometryTree
had no idea that a shortcut was involved. This will be fixed by:GeometryTree
accordingly when it comes from a shortcutGeoemtryTree
.Bug Fix #526
This is actually #352 in disguise.
Bug fix #352
This was due to the trailing comments not being found properly due to a few reasons. In #352 the issue was due to the default trees for cell modifiers being added. This makes it look like there were no trailing comments.
This case was fixed by flagging default tree items in the parameters, and ignoring them for transferring comments.
The other case found was not being transferred from a tally comment. In this case the padding was attached to the classifier. The
get_trailing_comment
logic had to be updated to allow falling through to that very first node in the tree. This issue was in part causing #526 due to the new line additions due to the comment being in the wrong object.Checklist
Jump
Repeat