The class mt_metadata.timeseries.filters.filtered.Filtered has attrs: applied and name which both return lists.
The current behaviour is that the applied list must either have the same number of values as the names list, orapplied can be a list of a single boolean.
If Filtered's _check_consistency method sees a single boolean in applied, it assumes filters.applied all have the same value as the lone boolean.
Aurora does not like this -- it wants these two lists have the same length, so for a given list of filter names we know explicitly whether these have been applied or not. I would rather not add logic in downstream applications to handle this.
I propose to modify _check_consistency (which is called by name.setter) to explicitly assign applied a list of bools of the same length as name, and warn the user this is happening.
Of course, one should explicitly add the applied list while building the MTH5, but sometimes I forget
The class
mt_metadata.timeseries.filters.filtered.Filtered
has attrs:applied
andname
which both return lists.The current behaviour is that the
applied
list must either have the same number of values as thenames
list, orapplied
can be a list of a single boolean.If
Filtered
's_check_consistency
method sees a single boolean inapplied
, it assumesfilters.applied
all have the same value as the lone boolean.Aurora does not like this -- it wants these two lists have the same length, so for a given list of filter names we know explicitly whether these have been applied or not. I would rather not add logic in downstream applications to handle this.
I propose to modify
_check_consistency
(which is called byname.setter
) to explicitly assignapplied
a list of bools of the same length asname
, and warn the user this is happening.Of course, one should explicitly add the
applied
list while building the MTH5, but sometimes I forget