Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 10 additions & 25 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,32 @@ jobs:
strategy:
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.12", "3.x"]
python-version: ["3.12", "3.14"]
runs-on: ${{ matrix.platform }}

steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v7
- name: Install uv and python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v9.0.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Get pip cache directory
id: pip_cache_dir
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache
uses: actions/cache@v6
with:
path: ${{ steps.pip_cache_dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci_pip_reqs.txt') }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-dev.txt

- name: Quality tests
run: tox -e quality
run: uvx pre-commit run --all-files
if: matrix.platform == 'ubuntu-latest'

- name: Unit tests
run: tox -e unit
run: |
uv sync --group ci
uv pip install "sympy>=1.12.1"
uv run --no-sync pytest --cov=petab --cov-report=xml --cov-append --durations=10 tests

- name: Coverage
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.x'
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.14'
13 changes: 4 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up python
uses: actions/setup-python@v7
with:
python-version: 3.x
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0

- name: Install dependencies / build sdist
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build
python -m build -s
- name: Build sdist
run: uv build --sdist

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and the easiest way to install it is running

pip3 install petab

`petab` requires Python>=3.11. We are following
`petab` requires Python>=3.12. We are following
[NumPy's Python support policy](https://numpy.org/neps/nep-0029-deprecation_policy.html).

Development versions of the PEtab library can be installed using
Expand Down
3 changes: 2 additions & 1 deletion doc/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ the pre-commit hooks, run:

.. code-block:: bash

pip install pre-commit
uv tool install pre-commit
pre-commit install

To run the pre-commit checks manually on all, not just the modified files, run:
Expand All @@ -85,6 +85,7 @@ To build the documentation, run:

.. code-block:: bash

uv sync --extra doc --extra vis
cd doc
make html
# then open `build/html/index.html` in a browser
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ petab_visualize = "petab.v1.visualize.cli:_petab_visualize_main"
Repository = "https://github.com/PEtab-dev/libpetab-python"
Documentation = "https://petab.readthedocs.io/projects/libpetab-python/"

[dependency-groups]
ci = [
"petab[tests,reports,combine,vis]",
"petabtests @ git+https://github.com/PEtab-dev/petab_test_suite@main",
"benchmark_models_petab @ git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master#subdirectory=src/python",
]

[tool.uv]
# pysb<1.17 fails to build: its legacy `ez_setup.py` bootstrap downloads
# setuptools from a defunct pypi.python.org URL.
constraint-dependencies = ["pysb>=1.17.0"]

[tool.setuptools.packages.find]
include = ["petab", "petab.*"]
namespaces = false
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt

This file was deleted.

38 changes: 0 additions & 38 deletions tox.ini

This file was deleted.