HopkinsIDD / flepiMoP

The Flexible Epidemic Modeling Pipeline
https://flepimop.org
GNU General Public License v3.0
9 stars 4 forks source link

[Feature request]: Change `resample_skipna` Default To `None` In `gempyor.statistics.Statistic` #340

Open TimothyWillard opened 1 month ago

TimothyWillard commented 1 month ago

Label

enhancement, gempyor, quick issue

Priority Label

low priority

Is your feature request related to a problem? Please describe.

Spinning this out into its own issue from https://github.com/HopkinsIDD/flepiMoP/issues/300#issuecomment-2344562130. It seems dangerous that there is default non-user specified handling of NA values occurring in the Statistics class.

Is your feature request related to a new application, scenario round, pathogen? Please describe.

n/a

Describe the solution you'd like

In this piece of code:

            self.resample_skipna = False
            if (
                resample_config["aggregator"].exists()
                and resample_config["skipna"].exists()
            ):
                self.resample_skipna = resample_config["skipna"].get()

We want to change the resample_skipna attribute to None and then raise a ValueError (or if there's a more appropriate exception) in apply_resample if the given data contains NA values and this attribute is None. Should mention clearly and concisely what the issue is and how the user can address.