Skip to content

Commit 1219986

Browse files
committed
replace lint with observable matching
1 parent 52534fa commit 1219986

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

petab/v1/core.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from . import yaml
1717
from .C import * # noqa: F403
18-
from .visualize.lint import validate_visualization_df
1918

2019
logger = logging.getLogger(__name__)
2120
__all__ = [
@@ -300,8 +299,14 @@ def flatten_timepoint_specific_output_overrides(
300299
petab_problem.observable_df.index.name = OBSERVABLE_ID
301300
petab_problem.measurement_df = pd.concat(new_measurement_dfs)
302301

303-
# remove visualization df if it is invalid
304-
if validate_visualization_df(petab_problem):
302+
# remove visualization df if it uses observables that are not in the
303+
# flattened PEtab problem
304+
assert petab_problem.observable_df.index.name == OBSERVABLE_ID
305+
if not all(
306+
petab_problem.observable_df.index.isin(
307+
petab_problem.visualization_df[Y_VALUES]
308+
)
309+
):
305310
petab_problem.visualization_df = None
306311
logger.warning(
307312
"Removing visualization table from flattened PEtab problem."

0 commit comments

Comments
 (0)