Add option to exclude input cubes in output of multimodel statistics#978
Add option to exclude input cubes in output of multimodel statistics#978valeriupredoi merged 4 commits intomasterfrom
Conversation
|
It would also be good to add a unit test to ensure that this doesn't get broken again in the future. |
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
| statistics=statistics, | ||
| output_products=output_products, | ||
| span=span, | ||
| keep_originals=keep_originals, |
There was a problem hiding this comment.
If this is never going to be exposed and only applies to PreprocessorFile, why not fix it in the public function?
| keep_originals=keep_originals, | |
| statistics_products = _multiproduct_statistics( | |
| products=products, | |
| statistics=statistics, | |
| output_products=output_products, | |
| span=span, | |
| ) | |
| if keep_originals: | |
| return products | statistics_products | |
| else: | |
| return statistics_products |
There was a problem hiding this comment.
@stefsmeets when you suggest code changes via the Github interactive editor there is no need to add text formatting syntax (like ```python here). Also @Peter9192 I would change keep_originals to something like save_input_cubes since originals refers more to the initial un-preprocced data and the option name doesn't tell the user what it does. Also note that for this to be in the documentation needs a mention of it 👍
|
OK I confirm that this fixes #975 - before and after fix: @Peter9192 cheers for the very quick fix, we need to get this in v2.2 pronto @jvegasbsc - we need a test this functionality is preserved as @stefsmeets says, please add it here 🍺 |
|
Here's a very simple test. I don't have any more time right now. |
valeriupredoi
left a comment
There was a problem hiding this comment.
looks good to me, cheers @Peter9192 🍺
LisaBock
left a comment
There was a problem hiding this comment.
Works for me as well! Thanks!
…978) * Add option (default True) to keep original cubes * Better docstring Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl> * Superficial test to verify the output products of multimodel statistics * slight reformulation of conditional Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl> Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Description
Before you get started
Checklist
To help with the number pull requests: