From 7f27bb36dab33a96c38efa063d3562041bde5f95 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 1 Oct 2024 12:59:11 +0200 Subject: [PATCH] GHA: Install benchmark collection only where necessary (#2522) ... and get rid of the URLs in pyproject.toml that aren't allowed on PyPI --- .github/workflows/deploy_release.yml | 5 ----- .github/workflows/test_petab_test_suite.yml | 8 +++++++- .github/workflows/test_python_cplusplus.yml | 6 ++++++ python/sdist/pyproject.toml | 1 - 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index b18c31ff2a..873c5f6e05 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -36,11 +36,6 @@ jobs: - run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV - - name: Remove direct dependencies from setup.cfg - # Remove any "git+https"-based dependencies that are not supported - # by PyPI and are only required for testing. - run: sed -i '/git+https/d' python/sdist/pyproject.toml - - name: sdist run: scripts/buildSdist.sh diff --git a/.github/workflows/test_petab_test_suite.yml b/.github/workflows/test_petab_test_suite.yml index 64277fe267..c16b40bc30 100644 --- a/.github/workflows/test_petab_test_suite.yml +++ b/.github/workflows/test_petab_test_suite.yml @@ -15,7 +15,7 @@ jobs: build: name: PEtab Testsuite - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest env: ENABLE_GCOV_COVERAGE: TRUE @@ -68,6 +68,12 @@ jobs: && source ./venv/bin/activate \ && cd petab_test_suite && pip3 install -e . + - name: Install PEtab benchmark collection + run: | + git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \ + && export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \ + && source venv/bin/activate && python -m pip install -e $BENCHMARK_COLLECTION/../src/python + - name: Install petab run: | source ./venv/bin/activate \ diff --git a/.github/workflows/test_python_cplusplus.yml b/.github/workflows/test_python_cplusplus.yml index 5ca8076a69..a74f407d00 100644 --- a/.github/workflows/test_python_cplusplus.yml +++ b/.github/workflows/test_python_cplusplus.yml @@ -338,6 +338,12 @@ jobs: path: ${{ env.pooch-cache }} key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }} + - name: Install PEtab benchmark collection + run: | + git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \ + && export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \ + && source venv/bin/activate && python -m pip install -e $BENCHMARK_COLLECTION/../src/python + - name: Python tests run: | scripts/run-python-tests.sh \ diff --git a/python/sdist/pyproject.toml b/python/sdist/pyproject.toml index 621fd43952..fd4e7e22b7 100644 --- a/python/sdist/pyproject.toml +++ b/python/sdist/pyproject.toml @@ -61,7 +61,6 @@ classifiers = [ petab = ["petab>=0.4.0"] pysb = ["pysb>=1.13.1"] test = [ - "benchmark_models_petab @ git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master#subdirectory=src/python", "h5py", "pytest", "pytest-cov",