From 895cd7bc34146b1363d54c947691d6c672cf75e2 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Oct 2024 13:39:56 +0200 Subject: [PATCH 1/6] Action updates via dependabot (#92) Let dependabot suggest updates. --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..edacb6be --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-patch", "version-update:semver-minor"] + target-branch: "develop" From 537330dee9acb48adcce35ff961f9c44a53ebc5c Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Oct 2024 13:41:28 +0200 Subject: [PATCH 2/6] GHA: Add PyPI deployment workflow (#91) On release, deploy package to PyPI. Related to #89 --- .github/workflows/deploy_release.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/deploy_release.yml diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml new file mode 100644 index 00000000..29347a56 --- /dev/null +++ b/.github/workflows/deploy_release.yml @@ -0,0 +1,34 @@ +name: Deploy +on: + release: + types: + - published + +jobs: + pypi: + name: Deploy PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/petab-select + permissions: + id-token: write + + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - uses: actions/checkout@v4 + with: + fetch-depth: 20 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel build + python -m build -s + + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 5114882ca0c696b4ac983f6ade230638290a9fd0 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Oct 2024 15:11:30 +0200 Subject: [PATCH 3/6] Fix minimum Python requirement (#97) petab requires python>=3.10 --- .github/workflows/ci.yml | 2 +- setup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd7d9253..f1671916 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: # test on latest and minimum python version - python-version: ['3.11', '3.9'] + python-version: ['3.12', '3.10'] steps: - name: Check out repository diff --git a/setup.py b/setup.py index 0d47670e..6e4d3ea8 100644 --- a/setup.py +++ b/setup.py @@ -30,8 +30,7 @@ def absolute_links(txt): return txt -# 3.7.1 for NumPy, 3.8 for `typing.get_args` -minimum_python_version = '3.8' +minimum_python_version = '3.10' if sys.version_info < tuple(map(int, minimum_python_version.split('.'))): sys.exit(f'PEtab Select requires Python >= {minimum_python_version}') From 4e1679b66b4d29e24bfb67c0d5e2f4679db10510 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Oct 2024 15:12:01 +0200 Subject: [PATCH 4/6] Doc: Fix heading levels in example (#96) Fixes the sphinx TOC and a typo. --- doc/examples/workflow_cli.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/workflow_cli.ipynb b/doc/examples/workflow_cli.ipynb index a2bc1c1c..e51e6291 100644 --- a/doc/examples/workflow_cli.ipynb +++ b/doc/examples/workflow_cli.ipynb @@ -47,7 +47,7 @@ "source": [ "In each call to `petab_select search`, the following options are required:\n", "- `-y`: The PEtab Select problem YAML file;\n", - "- `-s`: A file that is used to stored the state of the problem (e.g., such that models are not repeated);\n", + "- `-s`: A file that is used to store the state of the problem (e.g., such that models are not repeated);\n", "- `-o`: A file to store the output of the model space search; and\n", "- `-m`: The method used to search or identify models in the model space.\n", "\n", @@ -570,7 +570,7 @@ "id": "655f8efc", "metadata": {}, "source": [ - "# Post-processing\n", + "## Post-processing\n", "After the selection algorithm has terminated, the best model can be stored separately by supplying a list of calibrated models." ] }, From a2ef99c8d4514db5cde10ca8e1e6f14022af5d4a Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Oct 2024 15:12:26 +0200 Subject: [PATCH 5/6] Get rid of petab DeprecationWarnings (#93) Closes #90 --- petab_select/criteria.py | 4 ++-- petab_select/model.py | 4 ++-- petab_select/petab.py | 4 ++-- petab_select/ui.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/petab_select/criteria.py b/petab_select/criteria.py index 1f245a28..a976a0fb 100644 --- a/petab_select/criteria.py +++ b/petab_select/criteria.py @@ -1,8 +1,8 @@ """Implementations of model selection criteria.""" import numpy as np -import petab -from petab.C import OBJECTIVE_PRIOR_PARAMETERS, OBJECTIVE_PRIOR_TYPE +import petab.v1 as petab +from petab.v1.C import OBJECTIVE_PRIOR_PARAMETERS, OBJECTIVE_PRIOR_TYPE import petab_select diff --git a/petab_select/model.py b/petab_select/model.py index 1cf082b2..871a6e2c 100644 --- a/petab_select/model.py +++ b/petab_select/model.py @@ -5,10 +5,10 @@ from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union -import petab +import petab.v1 as petab import yaml from more_itertools import one -from petab.C import ESTIMATE, NOMINAL_VALUE +from petab.v1.C import ESTIMATE, NOMINAL_VALUE from .constants import ( CRITERIA, diff --git a/petab_select/petab.py b/petab_select/petab.py index c827f93d..d121d4d6 100644 --- a/petab_select/petab.py +++ b/petab_select/petab.py @@ -1,9 +1,9 @@ from pathlib import Path from typing import List, Optional -import petab +import petab.v1 as petab from more_itertools import one -from petab.C import ESTIMATE, NOMINAL_VALUE +from petab.v1.C import ESTIMATE, NOMINAL_VALUE from .constants import PETAB_ESTIMATE_FALSE, TYPE_PARAMETER_DICT, TYPE_PATH diff --git a/petab_select/ui.py b/petab_select/ui.py index 204ffd35..a32f9b47 100644 --- a/petab_select/ui.py +++ b/petab_select/ui.py @@ -3,7 +3,7 @@ from typing import Dict, List, Optional, Union import numpy as np -import petab +import petab.v1 as petab from .candidate_space import CandidateSpace, FamosCandidateSpace from .constants import ( From 72b076a76ed6ccdec91d8eebd9fd27be1ba5c48d Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 15 Oct 2024 12:43:47 +0200 Subject: [PATCH 6/6] README.md: PyPI badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c0d87161..a5ee25b8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # PEtab Select +[![PyPI - Version](https://img.shields.io/pypi/v/petab-select)](https://pypi.org/project/petab-select/) + The repository for the development of the extension to PEtab for model selection, including the additional file formats and Python 3 package.