dispel.processing.level_filters module
Filters used to process specific levels.
-
class dispel.processing.level_filters.AbsentDataSetFilter[source]
Bases: LevelFilter
Filter out levels with absent data set ids.
-
__init__(data_set_id)[source]
- Parameters:
data_set_id (str) –
-
filter(levels)[source]
Filter levels missing the specified data set id.
- Parameters:
levels (Iterable[Level]) –
- Return type:
Set[Level]
-
repr()[source]
Get representation of the filter.
-
class dispel.processing.level_filters.DurationFilter[source]
Bases: LevelFilter
A level filter to fetch level less than a given duration.
-
__init__(max_duration)[source]
- Parameters:
max_duration (float) –
-
filter(levels)[source]
Keep all levels with duration less than max_duration.
- Parameters:
levels (Iterable[Level]) –
- Return type:
Set[Level]
-
repr()[source]
Get representation of the filter.
- Return type:
str
-
class dispel.processing.level_filters.LastLevelFilter[source]
Bases: LevelFilter
A level filter to process only the last level.
-
filter(levels)[source]
Keep last level.
- Parameters:
levels (Iterable[Level]) –
- Return type:
Set[Level]
-
repr()[source]
Get representation of the filter.
- Return type:
str
-
class dispel.processing.level_filters.NotEmptyDataSetFilter[source]
Bases: LevelFilter
Filter out levels with empty data set.
-
__init__(data_set_id)[source]
- Parameters:
data_set_id (str) –
-
filter(levels)[source]
Filter levels with empty dataset.
- Parameters:
levels (Iterable[Level]) –
- Return type:
Set[Level]
-
repr()[source]
Get representation of the filter.
-
class dispel.processing.level_filters.NotEmptyDatasetFilter[source]
Bases: LevelFilter
Filter out levels without the dataset or with empty dataset.
-
__init__(data_set_id)[source]
- Parameters:
data_set_id (str) –
-
filter(levels)[source]
Filter levels missing a dataset or with empty dataset.
- Parameters:
levels (Iterable[Level]) –
- Return type:
Set[Level]
-
repr()[source]
Get representation of the filter.