idaholab / MontePy

MontePy is the most user friendly Python library (API) to read, edit, and write MCNP input files.
https://www.montepy.org/
MIT License
32 stars 7 forks source link

Warn when excess blank lines show up in an input model #525

Open MicahGale opened 3 months ago

MicahGale commented 3 months ago

Is your feature request related to a problem? Please describe.

Sometimes when editing a model you accidently add an extra blank line in the middle of a block or maybe two blank lines at the end of a block that leads to MCNP (and MontePy) throwing out a lot of information.

MontePy can sometimes detect this (when this leads to material definitions missing, for instance). It would be nice if every time MontePy raised a warning.

Describe the solution you'd like If MontePy finds more lines of information after it has decided it should be done reading it should raise a Warning.

Describe alternatives you've considered Users could do a regex search for the number of blank lines in a model and where they are.