diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a64d4f9..a84fb517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ ## 0.2 series +### 0.2.4 + +* Made figure sizes for visualization functions customizable via `petab.visualize.plotting.DEFAULT_FIGSIZE` + by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/222 +* Fixed Handling missing `nominalValue` in `Problem.get_x_nominal` + by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/223 +* Fixed pandas 2.1.0 `FutureWarnings` + by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/226 +* Added pre-commit-config, ran black, isort, ... + by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/225 + +**Full Changelog**: https://github.com/PEtab-dev/libpetab-python/compare/v0.2.3...v0.2.4 + ### 0.2.3 * Fixed validation failures in case of missing optional fields in visualization tables diff --git a/doc/conf.py b/doc/conf.py index 7e3932ae..d29b2984 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,7 +20,7 @@ # -- Project information ----------------------------------------------------- project = "libpetab-python" -copyright = "2018, the PEtab developers" +copyright = "2018-2023, the PEtab developers" author = "PEtab developers" # The full version, including alpha/beta/rc tags diff --git a/petab/core.py b/petab/core.py index d62b398f..05deb161 100644 --- a/petab/core.py +++ b/petab/core.py @@ -70,15 +70,25 @@ def write_simulation_df(df: pd.DataFrame, filename: Union[str, Path]) -> None: df.to_csv(filename, sep="\t", index=False) -def get_visualization_df(visualization_file: Union[str, Path]) -> pd.DataFrame: +def get_visualization_df( + visualization_file: Union[str, Path, pd.DataFrame, None] +) -> Union[pd.DataFrame, None]: """Read PEtab visualization table Arguments: - visualization_file: URL or filename of PEtab visualization table + visualization_file: + URL or filename of PEtab visualization table to read from, + or a DataFrame or None that will be returned as is. Returns: Visualization DataFrame """ + if visualization_file is None: + return None + + if isinstance(visualization_file, pd.DataFrame): + return visualization_file + try: types = {PLOT_NAME: str} vis_spec = pd.read_csv( diff --git a/petab/version.py b/petab/version.py index d35910e3..9ec4593a 100644 --- a/petab/version.py +++ b/petab/version.py @@ -1,2 +1,2 @@ """PEtab library version""" -__version__ = "0.2.3" +__version__ = "0.2.4"