Skip to content

Commit

Permalink
Merge branch 'develop' into jax_export
Browse files Browse the repository at this point in the history
  • Loading branch information
FFroehlich committed Oct 19, 2024
2 parents 8143cc2 + 8f0c8fb commit 781bb3b
Show file tree
Hide file tree
Showing 485 changed files with 48,457 additions and 36,799 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f59fed72eb4d0cedf6abf2a96fe95087ce61478a
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion .github/workflows/deploy_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_protected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
fi
dockerhub:
name: Deploy Dockerhub
name: Deploy Docker Hub
needs: [check-secret]
if: needs.check-secret.outputs.secrets-defined == 'true'
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v4
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: dweindl/amici
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
33 changes: 27 additions & 6 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

environment:
name: pypi
Expand All @@ -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/setup.cfg

- name: sdist
run: scripts/buildSdist.sh

Expand Down Expand Up @@ -74,3 +69,29 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${DOWNSTREAM_REPOSITORY}/actions/workflows/${WORKFLOW_FILE}/dispatches \
-d "{\"ref\": \"dev\", \"inputs\": {\"simulatorVersion\": \"${PACKAGE_VERSION}\", \"simulatorVersionLatest\": \"true\"}}"
dockerhub:
name: Release to Docker Hub
runs-on: ubuntu-22.04

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/checkout@v4
- run: git archive -o container/amici.tar.gz --format=tar.gz HEAD
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: dweindl/amici
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: container/
dockerfile: Dockerfile
tag_semver: true
platforms: linux/amd64,linux/arm64
9 changes: 7 additions & 2 deletions .github/workflows/test_benchmark_collection_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9" ]
python-version: [ "3.11" ]
extract_subexpressions: ["true", "false"]
env:
AMICI_EXTRACT_CSE: ${{ matrix.extract_subexpressions }}
Expand Down Expand Up @@ -52,18 +52,23 @@ jobs:
AMICI_PARALLEL_COMPILE="" pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis,jax]
- run: |
python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@develop \
&& python3 -m pip install -U sympy
# retrieve test models
- name: Download and test 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/" \
&& pip3 install -e $BENCHMARK_COLLECTION/../src/python \
&& AMICI_PARALLEL_COMPILE="" tests/benchmark-models/test_benchmark_collection.sh
# run gradient checks
- name: Run Gradient Checks
run: |
pip install git+https://github.com/ICB-DCM/fiddy.git \
&& cd tests/benchmark-models && pytest ./test_petab_benchmark.py
&& cd tests/benchmark-models && pytest --durations=10 ./test_petab_benchmark.py
# upload results
- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_matlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV

- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
uses: matlab-actions/setup-matlab@v2
- name: Run script
uses: matlab-actions/run-command@v1
uses: matlab-actions/run-command@v2
with:
command: cd matlab; installAMICI; addpath tests; testModels
2 changes: 1 addition & 1 deletion .github/workflows/test_performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/test_petab_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
build:
name: PEtab Testsuite

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

env:
ENABLE_GCOV_COVERAGE: TRUE

strategy:
matrix:
python-version: [3.9]
python-version: ["3.11"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Install petab
run: |
source ./venv/bin/activate \
&& pip3 install wheel pytest shyaml pytest-cov pysb
&& pip3 install wheel pytest shyaml pytest-cov pysb>=1.16
# retrieve test models
- name: Download and install PEtab test suite
Expand All @@ -68,11 +68,26 @@ 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 \
&& python3 -m pip uninstall -y petab \
&& python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@develop \
&& python3 -m pip install git+https://github.com/pysb/pysb@master \
&& python3 -m pip install sympy>=1.12.1
- name: Run PEtab-related unit tests
run: |
source ./venv/bin/activate \
&& pytest --cov-report=xml:coverage.xml \
--cov=./ python/tests/test_*petab*.py python/tests/petab/
--cov=./ python/tests/test_*petab*.py python/tests/petab_/
# run test models
- name: Run PEtab test suite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-22.04, macos-latest]

runs-on: ${{ matrix.os }}
Expand Down
62 changes: 55 additions & 7 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:

strategy:
matrix:
python-version: [ "3.9" ]
python-version: [ "3.11" ]

steps:
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/pooch
Expand All @@ -38,6 +38,11 @@ jobs:
- name: Set up AMICI C++ libraries
uses: ./.github/actions/setup-amici-cpp

- name: Install libsuitesparse-dev
# We don't need libsuitesparse-dev, but let's have it installed,
# to ensure that its presence does not break the build
run: sudo apt-get install -y libsuitesparse-dev

- name: C++ tests
run: scripts/run-cpp-tests.sh

Expand Down Expand Up @@ -117,14 +122,21 @@ jobs:

strategy:
matrix:
python-version: [ "3.9" ]
python-version: [ "3.10" ]

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cache/pooch
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- uses: actions/checkout@v4
- run: git fetch --prune --unshallow

Expand Down Expand Up @@ -193,14 +205,21 @@ jobs:

strategy:
matrix:
python-version: [ "3.9" ]
python-version: [ "3.11" ]

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cache/pooch
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- uses: actions/checkout@v4
- run: git fetch --prune --unshallow

Expand Down Expand Up @@ -233,7 +252,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.11"

- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
Expand All @@ -259,6 +278,17 @@ jobs:
- name: C++ tests
run: scripts/run-cpp-tests.sh

- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(source venv/bin/activate && python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
- name: Cache Pooch Directory
uses: actions/cache@v4
with:
path: ${{ env.pooch-cache }}
key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ github.job }}

- name: Python tests
run: |
scripts/run-python-tests.sh \
Expand All @@ -273,7 +303,7 @@ jobs:

steps:
- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/Library/Caches/pooch
Expand All @@ -282,7 +312,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.11"

- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
Expand All @@ -301,6 +331,24 @@ jobs:
- name: Get BioNetGen
run: scripts/buildBNGL.sh


- name: Get Pooch Cache Directory
id: get-pooch-cache
run: |
echo "pooch-cache=$(source venv/bin/activate && python -c 'import pooch; print(pooch.os_cache("pooch"))')" >> $GITHUB_ENV
- name: Cache Pooch Directory
uses: actions/cache@v4
with:
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 \
Expand Down
Loading

0 comments on commit 781bb3b

Please sign in to comment.