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.
Summary
As per my own experience and Issue #77, I believe that the ability to save an npz file is a significant missing feature to this otherwise great tool! So I went and implemented it! The user can simply specify the
--save-stats
flag and the stats of the first path will be generated and saved in the location of the second path.Changes
--save-stats
to the argument parsersave_fid_stats
usingcalcualte_fid_given_paths
as a guide and making use ofnp.savez_compressed
__main__
, if the--save-stats
flag has been specified, runsave_fid_stats
and exit early. This design makes it clear that the--save-stats
flag is the option and the original workflow is still the primary workflow.README.md
to document the changesTest Plan
I have manually tested the new workflow and the original and they behave exactly as expected. By logical inspection of the changes I've made, I believe no errors will have been introduced, however, I failed to run the included test suite due to an error that is present on master - prior to my changes. The error I am receiving is:
Please advise how to fix this and I can rerun the test suite.
Code formatting
I have done my best to copy the style in which the existing code is written. I could not find a linter that is in use - if there is one, please make me aware of it.