diff --git a/src/vivarium/framework/results/context.py b/src/vivarium/framework/results/context.py index 317867dbd..f7d23d0a5 100644 --- a/src/vivarium/framework/results/context.py +++ b/src/vivarium/framework/results/context.py @@ -5,7 +5,7 @@ """ from collections import defaultdict -from typing import Any, Callable, Generator, List, Optional, Tuple, Type, Union +from typing import Callable, Generator, List, Optional, Tuple, Type, Union import pandas as pd from pandas.core.groupby.generic import DataFrameGroupBy diff --git a/src/vivarium/framework/results/interface.py b/src/vivarium/framework/results/interface.py index 7ed8979b6..25eb9264d 100644 --- a/src/vivarium/framework/results/interface.py +++ b/src/vivarium/framework/results/interface.py @@ -8,7 +8,7 @@ to a simulation. """ -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Union import pandas as pd diff --git a/src/vivarium/framework/results/manager.py b/src/vivarium/framework/results/manager.py index ae052744e..25807899c 100644 --- a/src/vivarium/framework/results/manager.py +++ b/src/vivarium/framework/results/manager.py @@ -6,7 +6,7 @@ from collections import defaultdict from enum import Enum -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union +from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union import pandas as pd diff --git a/src/vivarium/framework/results/observation.py b/src/vivarium/framework/results/observation.py index 6b1fb8255..d31062167 100644 --- a/src/vivarium/framework/results/observation.py +++ b/src/vivarium/framework/results/observation.py @@ -75,7 +75,7 @@ def observe( df: Union[pd.DataFrame, DataFrameGroupBy], stratifications: Optional[tuple[str, ...]], ) -> Optional[pd.DataFrame]: - """Determine whether to observe the given event and, if so, gather the results.""" + # """Determine whether to observe the given event and, if so, gather the results.""" if not self.to_observe(event): return None else: diff --git a/src/vivarium/framework/results/stratification.py b/src/vivarium/framework/results/stratification.py index c9ec7e279..765a047ac 100644 --- a/src/vivarium/framework/results/stratification.py +++ b/src/vivarium/framework/results/stratification.py @@ -5,7 +5,7 @@ """ from dataclasses import dataclass -from typing import Any, Callable, List, Optional, Union +from typing import Callable, List, Optional, Union import pandas as pd from pandas.api.types import CategoricalDtype @@ -24,27 +24,6 @@ class Stratification: This class includes a :meth:`stratify ` method that produces an output column by calling the mapper on the source columns. - - Attributes - ---------- - name - Name of the stratification. - sources - A list of the columns and values needed as input for the `mapper`. - categories - Exhaustive list of all possible stratification values. - excluded_categories - List of possible stratification values to exclude from results processing. - If None (the default), will use exclusions as defined in the configuration. - mapper - A callable that maps the columns and value pipelines specified by the - `requires_columns` and `requires_values` arguments to the stratification - categories. It can either map the entire population or an individual - simulant. A simulation will fail if the `mapper` ever produces an invalid - value. - is_vectorized - True if the `mapper` function will map the entire population, and False - if it will only map a single simulant. """ name: str