Skip to content

Commit 33019df

Browse files
dweindlclaude
andcommitted
Wire up remaining uv migration changes
Second half of the tox/pip -> uv replacement, accidentally left out of the previous commit: pyproject.toml dependency-group, CI/deploy workflows, README, and dev docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 212fe5e commit 33019df

5 files changed

Lines changed: 23 additions & 36 deletions

File tree

.github/workflows/ci_tests.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,32 @@ jobs:
1212
strategy:
1313
matrix:
1414
platform: [windows-latest, macos-latest, ubuntu-latest]
15-
python-version: ["3.12", "3.x"]
15+
python-version: ["3.12", "3.14"]
1616
runs-on: ${{ matrix.platform }}
1717

1818
steps:
1919
- name: Check out repository
2020
uses: actions/checkout@v7
2121

22-
- name: Prepare python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v7
22+
- name: Install uv and python ${{ matrix.python-version }}
23+
uses: astral-sh/setup-uv@v9
2424
with:
25+
enable-cache: true
2526
python-version: ${{ matrix.python-version }}
2627

27-
- name: Get pip cache directory
28-
id: pip_cache_dir
29-
run: |
30-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
31-
shell: bash
32-
33-
- name: Cache
34-
uses: actions/cache@v6
35-
with:
36-
path: ${{ steps.pip_cache_dir.outputs.dir }}
37-
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci_pip_reqs.txt') }}-${{ hashFiles('**/setup.py') }}
38-
restore-keys: |
39-
${{ runner.os }}-${{ matrix.python-version }}-
40-
41-
- name: Install dependencies
42-
run: |
43-
python -m pip install --upgrade pip wheel
44-
pip install -r requirements-dev.txt
45-
4628
- name: Quality tests
47-
run: tox -e quality
29+
run: uvx pre-commit run --all-files
4830
if: matrix.platform == 'ubuntu-latest'
4931

5032
- name: Unit tests
51-
run: tox -e unit
33+
run: |
34+
uv sync --extra tests --extra reports --extra combine --extra vis --group ci
35+
uv pip install "sympy>=1.12.1"
36+
uv run --no-sync pytest --cov=petab --cov-report=xml --cov-append --durations=10 tests
5237
5338
- name: Coverage
5439
uses: codecov/codecov-action@v7
5540
with:
5641
token: ${{ secrets.CODECOV_TOKEN }}
5742
files: ./coverage.xml
58-
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.x'
43+
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.14'

.github/workflows/deploy.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ jobs:
1616
steps:
1717
- name: Check out repository
1818
uses: actions/checkout@v7
19-
- name: Set up python
20-
uses: actions/setup-python@v7
21-
with:
22-
python-version: 3.x
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v9
2321

24-
- name: Install dependencies / build sdist
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install setuptools wheel build
28-
python -m build -s
22+
- name: Build sdist
23+
run: uv build --sdist
2924

3025
- name: Publish a Python distribution to PyPI
3126
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ and the easiest way to install it is running
2222

2323
pip3 install petab
2424

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

2828
Development versions of the PEtab library can be installed using

doc/development.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ the pre-commit hooks, run:
6060

6161
.. code-block:: bash
6262
63-
pip install pre-commit
63+
uv tool install pre-commit
6464
pre-commit install
6565
6666
To run the pre-commit checks manually on all, not just the modified files, run:
@@ -85,6 +85,7 @@ To build the documentation, run:
8585

8686
.. code-block:: bash
8787
88+
uv sync --extra doc --extra vis
8889
cd doc
8990
make html
9091
# then open `build/html/index.html` in a browser

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ petab_visualize = "petab.v1.visualize.cli:_petab_visualize_main"
8484
Repository = "https://github.com/PEtab-dev/libpetab-python"
8585
Documentation = "https://petab.readthedocs.io/projects/libpetab-python/"
8686

87+
[dependency-groups]
88+
ci = [
89+
"petabtests @ git+https://github.com/PEtab-dev/petab_test_suite@main",
90+
"benchmark_models_petab @ git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master#subdirectory=src/python",
91+
]
92+
8793
[tool.setuptools.packages.find]
8894
include = ["petab", "petab.*"]
8995
namespaces = false

0 commit comments

Comments
 (0)