From b647f53655c8bc48abc25453f96980c1eaca416b Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 27 Nov 2024 09:07:35 +0100 Subject: [PATCH] CI: don't cache amici; pytest ignore amici_models; passenv BNGPATH * Don't cache the amici installation. We are using amici/develop on purpose to detect problems early on. E.g., #1520 should have been detected much earlier. * Ignore `amici_models` when collecting tests * Use external BNGPATH if set --- .github/workflows/ci.yml | 2 +- pytest.ini | 1 + tox.ini | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4db56ab55..f55f8f6b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,7 +157,7 @@ jobs: - name: Run tests timeout-minutes: 35 - run: tox -e petab + run: tox -e petab && tox e -e petab -- pip uninstall -y amici env: CC: clang CXX: clang++ diff --git a/pytest.ini b/pytest.ini index c852c729e..82ae58578 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,3 +2,4 @@ addopts = "--doctest-modules" filterwarnings = ignore:.*inspect.getargspec\(\) is deprecated.*:DeprecationWarning +norecursedirs = amici_models diff --git a/tox.ini b/tox.ini index e9193e0ad..d1937e4ee 100644 --- a/tox.ini +++ b/tox.ini @@ -29,7 +29,7 @@ envlist = # Base-environment [testenv] -passenv = AMICI_PARALLEL_COMPILE,CC,CXX,MPLBACKEND +passenv = AMICI_PARALLEL_COMPILE,CC,CXX,MPLBACKEND,BNGPATH # Sub-environments # inherit settings defined in the base @@ -75,10 +75,14 @@ description = Test basic functionality on Windows [testenv:petab] -extras = test,amici,petab,pyswarm,roadrunner +extras = test,petab,pyswarm,roadrunner deps = git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python - git+https://github.com/AMICI-dev/amici.git@develop\#egg=amici&subdirectory=python/sdist +# always install amici from develop branch, avoid caching +# to skip re-installation, run `tox -e petab --override testenv:petab.commands_pre=` +commands_pre = + python3 -m pip uninstall -y amici + python3 -m pip install git+https://github.com/AMICI-dev/amici.git@develop\#egg=amici&subdirectory=python/sdist commands = python3 -m pip install git+https://github.com/PEtab-dev/petab_test_suite@main python3 -m pip install git+https://github.com/pysb/pysb@master