Fix ASCII2NC to check the return status when reading ASCII input files. #1957
Labels
MET: PreProcessing Tools (Point)
MET: Python Embedding
priority: medium
Medium Priority
requestor: METplus Team
METplus Development Team
type: enhancement
Improve something that it is currently doing
Milestone
Describe the Enhancement
This issue arose in testing by @georgemccabe for dtcenter/METplus#1223.
He found that even though the python embedding script he ran in ascii2nc returned bad status, the ascii2nc tool itself did not.
Modify the logic on
MET/met/src/tools/other/ascii2nc/ascii2nc.cc
Line 240 in e903f8f
Here's some input from @georgemccabe about what/how to test:
In this command, the Python script crashes but ascii2nc does not error (you'll likely need to change the output path):
This command succeeds because the file exists:
In general, we let the user's python script determine the error condition. If handed bad status, ascii2nc should error out. Note though that retrieving 0 observations from a python script should not, as a rule, be considered an error. For example, finding 0 storm reports on a given day may not be an error. But if the python script cannot be run or it is run and returns bad status, ascii2nc should error out.
For this issue, test as many combinations of bad behavior as is reasonably possible.
Time Estimate
4 hours.
Sub-Issues
Consider breaking the enhancement down into sub-issues.
None needed.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
None needed.
Enhancement Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Linked issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
The text was updated successfully, but these errors were encountered: