dtcenter / METplus

Python scripting infrastructure for MET tools.
https://metplus.readthedocs.io
Apache License 2.0
92 stars 36 forks source link

Feature #2578 PCPCombine -input_thresh for missing inputs #2609

Closed georgemccabe closed 3 weeks ago

georgemccabe commented 4 weeks ago

Additional Changes

Pull Request Testing

Added unit tests to test new behavior.

Review code changes Ensure all automated tests pass (except short_range:10-12 which is an unrelated known failure)

Pull Request Checklist

See the METplus Workflow for details.

JohnHalleyGotway commented 3 weeks ago

@georgemccabe I see updates to the prune_emtpy(...) in these changes for checking for and removing files that are empty... i.e. have file size of 0. Is this actually needed for this issue or just somewhat related?

I can imagine that whether or not empty files appear in a file list could have a potentially large impact on functionality. But it's only applied when prune_empty(...) is called.

How often is that called? Do you see a potential for unexpected behavior here? Or is this all working as it should?

georgemccabe commented 3 weeks ago

The prune_empty function is currently only called by ExtractTiles wrapper. I think it is no longer needed, as the wrapper has since been refactored and shouldn't produce any empty files. I can remove it to see if it has any impact on any use cases and add it back in if it is actually needed. The changes here involved creating a function to traverse through a directory and replacing any logic that does that to call the function instead.

@georgemccabe I see updates to the prune_emtpy(...) in these changes for checking for and removing files that are empty... i.e. have file size of 0. Is this actually needed for this issue or just somewhat related?

I can imagine that whether or not empty files appear in a file list could have a potentially large impact on functionality. But it's only applied when prune_empty(...) is called.

How often is that called? Do you see a potential for unexpected behavior here? Or is this all working as it should?