File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ def petab1to2(yaml_config: Path | str, output_dir: Path | str = None):
9595 # Update condition table
9696 for condition_file in problem_config .get (v2 .C .CONDITION_FILES , []):
9797 condition_df = v1 .get_condition_df (get_src_path (condition_file ))
98- condition_df = _melt_condition_df (
99- condition_df , petab_problem .model
100- )
98+ condition_df = v1v2_condition_df (condition_df , petab_problem .model )
10199 v2 .write_condition_df (condition_df , get_dest_path (condition_file ))
102100
103101 for measurement_file in problem_config .get (v2 .C .MEASUREMENT_FILES , []):
@@ -185,10 +183,10 @@ def _copy_file(src: Path | str, dest: Path):
185183 shutil .copy (str (src ), str (dest ))
186184
187185
188- def _melt_condition_df (
186+ def v1v2_condition_df (
189187 condition_df : pd .DataFrame , model : v1 .Model
190188) -> pd .DataFrame :
191- """Melt condition table."""
189+ """Convert condition table from petab v1 to v2 ."""
192190 condition_df = condition_df .copy ().reset_index ()
193191 with suppress (KeyError ):
194192 # TODO: are condition names still supported in v2?
You can’t perform that action at this time.
0 commit comments