Added new argument to write json from mfile, added execution of argument to post processing#3287
Merged
timothy-nunn merged 10 commits intomainfrom Sep 13, 2024
Conversation
…ent to postprocessing
timothy-nunn
requested changes
Aug 28, 2024
Collaborator
timothy-nunn
left a comment
There was a problem hiding this comment.
Please could you add an integration test for this (maybe with a once through input file?):
- Does running with this command produce a JSON file at the expected location with the expected name?
- Does the JSON file contain valid JSON?
- Does the JSON contain some outputs we would expect?
| # Check mfile exists, then plot | ||
| mfile = Path(self.args.mfile) | ||
| mfile_path = Path(self.args.mfile) | ||
| mfile_str = str(mfile.resolve()) |
Collaborator
There was a problem hiding this comment.
Suggested change
| mfile_str = str(mfile.resolve()) | |
| mfile_str = str(mfile_path.resolve()) |
Collaborator
Author
There was a problem hiding this comment.
if self.args.plot:
# Check mfile exists, then plot
mfile_path = Path(self.args.mfile)
mfile_str = str(mfile_path.resolve())
| "-mj", | ||
| "--mfilejson", | ||
| action="store_true", | ||
| help="produce a json containing mfile data", |
Collaborator
There was a problem hiding this comment.
Update the help message slightly. Where does it write the JSON file, and with what name?
Collaborator
Author
There was a problem hiding this comment.
parser.add_argument(
"-mj",
"--mfilejson",
action="store_true",
help="Produce a filled json from --mfile arg in working dir",
)
Modified like this
Collaborator
Author
|
I addressed the changes, let me know if further improvements are needed. |
timothy-nunn
approved these changes
Sep 13, 2024
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.
It is useful to have PROCESS dump the mfile to json for UQ work. I have added an argument to do this which is executed in postprocessing