pySTEPS / pysteps

Python framework for short-term ensemble prediction systems.
https://pysteps.github.io/
BSD 3-Clause "New" or "Revised" License
471 stars 168 forks source link

Adapt pysteps to allow for postprocessing plugins #405

Open joeycasey87 opened 4 months ago

joeycasey87 commented 4 months ago

Added an infrastructure.py file to the postprocessing folder which should operate in the same way as the interface file does for the importers in the io folder. The postprocessor file is currently effectively empty as no postprocessor plugins have been added yet. A line has been added to the init file so that it should act similar to the init file in the io folder.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 85.71429% with 16 lines in your changes missing coverage. Please review.

Project coverage is 84.01%. Comparing base (d77fe73) to head (d9b593d). Report is 11 commits behind head on master.

Files Patch % Lines
pysteps/postprocessing/interface.py 78.87% 15 Missing :warning:
pysteps/tests/test_interfaces.py 96.55% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #405 +/- ## ========================================== + Coverage 83.67% 84.01% +0.34% ========================================== Files 159 162 +3 Lines 12649 12994 +345 ========================================== + Hits 10584 10917 +333 - Misses 2065 2077 +12 ``` | [Flag](https://app.codecov.io/gh/pySTEPS/pysteps/pull/405/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pySTEPS) | Coverage Δ | | |---|---|---| | [unit_tests](https://app.codecov.io/gh/pySTEPS/pysteps/pull/405/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pySTEPS) | `84.01% <85.71%> (+0.34%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pySTEPS#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

joeycasey87 commented 3 months ago

Hi @dnerini, could you please review this pull request when you have the time? The extended version of the cookiecutter plugin template which can be used to create importer, diagnostic postprocessing, and nowcast plugins is nearly finished but I require the postprocessing interface to be merged to ensure that everything is behaving correctly when tested. Cheers

ladc commented 3 months ago

Thanks for this contribution! We discussed how to make it more generic and @joeycasey87 will try to refactor it tomorrow to allow for various kinds of post-processors including new ensemblestats and bias correction methods, for example. To be continued.

dnerini commented 2 months ago

what's the status of this PR? should we mark it as a draft?