Skip to content

Commit

Permalink
Merge branch 'develop' into adjoint_event
Browse files Browse the repository at this point in the history
# Conflicts:
#	include/amici/model.h
#	models/model_calvetti/model_calvetti.h
#	models/model_dirac/model_dirac.h
#	models/model_events/model_events.h
#	models/model_jakstat_adjoint/model_jakstat_adjoint.h
#	models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h
#	models/model_nested_events/model_nested_events.h
#	models/model_neuron/model_neuron.h
#	models/model_neuron_o2/model_neuron_o2.h
#	models/model_robertson/model_robertson.h
#	models/model_steadystate/model_steadystate.h
#	python/sdist/amici/de_export.py
#	src/model.cpp
  • Loading branch information
dweindl committed Oct 9, 2024
2 parents 7e32da0 + 2784887 commit 114319f
Show file tree
Hide file tree
Showing 588 changed files with 61,918 additions and 44,946 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
3 changes: 3 additions & 0 deletions .github/actions/setup-amici-cpp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ runs:
- run: echo "ENABLE_GCOV_COVERAGE=TRUE" >> $GITHUB_ENV
shell: bash

- run: echo "PYTHONFAULTHANDLER=1" >> $GITHUB_ENV
shell: bash

- name: Set up Sonar tools
uses: ./.github/actions/setup-sonar-tools

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-swig/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
swig_version:
description: 'Swig version to build'
required: false
default: '4.1.1'
default: '4.2.0'

runs:
using: "composite"
Expand Down
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"
8 changes: 4 additions & 4 deletions .github/workflows/deploy_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:

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

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

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 20

Expand All @@ -31,7 +31,7 @@ jobs:
scripts/buildSdist.sh
- name: "Upload artifact: sdist"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sdist
path: python/sdist/dist/amici-*.gz
33 changes: 24 additions & 9 deletions .github/workflows/deploy_protected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,44 @@ on:
workflow_dispatch:

jobs:
dockerhub:
# https://github.com/marketplace/actions/publish-docker
name: Deploy Dockerhub
check-secret:
runs-on: ubuntu-latest
outputs:
secrets-defined: ${{ steps.secret-check.outputs.defined }}
steps:
- name: Check for Secret availability
id: secret-check
shell: bash
run: |
if [ "${{ secrets.DOCKER_USERNAME }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
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 }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- 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@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
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
46 changes: 36 additions & 10 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ jobs:

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

environment:
name: pypi
url: https://pypi.org/p/amici

permissions:
id-token: write

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

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 20

Expand All @@ -29,19 +36,12 @@ 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

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
packages-dir: python/sdist/dist

bioSimulatorsUpdateCliAndDockerImage:
Expand Down Expand Up @@ -69,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
21 changes: 13 additions & 8 deletions .github/workflows/test_benchmark_collection_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ 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 }}

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

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 20

Expand All @@ -49,26 +49,31 @@ jobs:
- name: Install AMICI sdist
run: |
pip3 install --user petab[vis] && \
AMICI_PARALLEL_COMPILE=2 pip3 install -v --user \
AMICI_PARALLEL_COMPILE="" pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis]
- 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/" \
&& AMICI_PARALLEL_COMPILE=2 tests/benchmark-models/test_benchmark_collection.sh
&& 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@v3
- uses: actions/upload-artifact@v4
with:
name: computation times
name: computation-times-${{ matrix.python-version }}-${{ matrix.extract_subexpressions }}
path: |
tests/benchmark-models/computation_times.csv
tests/benchmark-models/computation_times.png
10 changes: 5 additions & 5 deletions .github/workflows/test_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:

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

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

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

- name: Set up doxygen
Expand All @@ -47,11 +47,11 @@ jobs:

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

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

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:

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

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

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

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
Expand Down Expand Up @@ -50,15 +50,15 @@ jobs:

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

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

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

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
Expand All @@ -83,15 +83,15 @@ jobs:

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

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

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

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_matlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
runs-on: ubuntu-20.04

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

- 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
10 changes: 5 additions & 5 deletions .github/workflows/test_performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:

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

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

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 20

Expand All @@ -51,7 +51,7 @@ jobs:
- name: Install AMICI sdist
run: |
AMICI_PARALLEL_COMPILE=2 check_time.sh \
AMICI_PARALLEL_COMPILE="" check_time.sh \
install_sdist pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)
Expand All @@ -64,7 +64,7 @@ jobs:
AMICI_IMPORT_NPROCS=2 check_time.sh petab_import python tests/performance/test.py import
- name: "Upload artifact: CS_Signalling_ERBB_RAS_AKT_petab"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: model_performance_test
path: model_performance_test
Expand Down
Loading

0 comments on commit 114319f

Please sign in to comment.