Uses a recursive function to strip any list elements named "comment" from a parsed pecan.xml. This allows the use of HTML style comments (<!-- a comment -->) in the pecan.xml so annotated version can be used without breaking runs. It also adds a warning to read.settings() when defaulting to "pecan.xml" when a named inputfile is provided and not found.
Another minor addition is that logger.setLevel() now returns (invisibly) the previous level. This behavior is similar to how par() works and is useful for temporarily changing the logger level and then changing it back.
Motivation and Context
I think adding comments in a pecan.xml file is a great way to give myself reminders about what needs to be changed and what needs to stay the same when preparing a series of runs based on a template. This way, I can leave those comments in for others to see and don't have to remember to delete them all.
Review Time Estimate
[ ] Immediately
[ ] Within one week
[ ] When possible
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] My change requires a change to the documentation.
Closes #2950 and #2969.
Description
Uses a recursive function to strip any list elements named "comment" from a parsed pecan.xml. This allows the use of HTML style comments (
<!-- a comment -->
) in the pecan.xml so annotated version can be used without breaking runs. It also adds a warning toread.settings()
when defaulting to "pecan.xml" when a named inputfile is provided and not found.Another minor addition is that
logger.setLevel()
now returns (invisibly) the previous level. This behavior is similar to howpar()
works and is useful for temporarily changing the logger level and then changing it back.Motivation and Context
I think adding comments in a pecan.xml file is a great way to give myself reminders about what needs to be changed and what needs to stay the same when preparing a series of runs based on a template. This way, I can leave those comments in for others to see and don't have to remember to delete them all.
Review Time Estimate
Types of changes
Checklist: