Skip to content

Combine lineExpansionWarnings for a single input #198

@MicahGale

Description

@MicahGale

If you do a mass update of cell and surface numbers that leads to a lot of line expansions, the warnings can get very annoying:

The value has expanded, and may change formatting. The original value was 2, new value is 65005.
  problem.write_to_file("updated_numbers.imcnp")
/var/tmp/pbs.1656331.lemhipbs/ipykernel_315073/2996620259.py:20: LineExpansionWarning: The input starting on Line 27 of: updated_numbers.imcnp expanded. 
The new input is:
        27| 65005 1 -8.9 -65020 -66240 66235  imp:n=1 $ COBALT_TARGET_PELLET2 
The value has expanded, and may change formatting. The original value was -63, new value is -65020.
  problem.write_to_file("updated_numbers.imcnp")
/var/tmp/pbs.1656331.lemhipbs/ipykernel_315073/2996620259.py:20: LineExpansionWarning: The input starting on Line 27 of: updated_numbers.imcnp expanded. 
The new input is:
        27| 65005 1 -8.9 -65020 -66240 66235  imp:n=1 $ COBALT_TARGET_PELLET2 
The value has expanded, and may change formatting. The original value was -62, new value is -66240.
  problem.write_to_file("updated_numbers.imcnp")
/var/tmp/pbs.1656331.lemhipbs/ipykernel_315073/2996620259.py:20: LineExpansionWarning: The input starting on Line 27 of: updated_numbers.imcnp expanded. 
The new input is:
        27| 65005 1 -8.9 -65020 -66240 66235  imp:n=1 $ COBALT_TARGET_PELLET2 
The value has expanded, and may change formatting. The original value was 64, new value is 66235.
  problem.write_to_file("updated_numbers.imcnp")

It would be nice to combine all warnings from a single input to an easier to understand warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions