Skip to content

Commit

Permalink
Release 0.21.0
Browse files Browse the repository at this point in the history
Merge pull request AMICI-dev#2266 from dweindl/release_0.21.0
  • Loading branch information
dweindl authored Jan 16, 2024
2 parents ffcbf66 + a8cebe6 commit 224e9be
Show file tree
Hide file tree
Showing 171 changed files with 6,124 additions and 4,505 deletions.
31 changes: 31 additions & 0 deletions .github/actions/install-macos-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Install AMICI dependencies for MacOS
description: Install AMICI dependencies for MacOS

runs:
using: "composite"
steps:
# use all available cores
- run: echo "AMICI_PARALLEL_COMPILE=" >> $GITHUB_ENV
shell: bash

# AMICI repository root
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
shell: bash

# BioNetGen path
- run: echo "BNGPATH=${AMICI_DIR}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
shell: bash

# CMake hints
# Ensure CMake is using the python version that we will use for the python tests later on
- run: echo "PYTHON_EXECUTABLE=${Python3_ROOT_DIR}/bin/python3" >> $GITHUB_ENV
shell: bash
- run: echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $GITHUB_ENV
shell: bash
- run: echo "BOOST_ROOT=$(brew --prefix)/opt/boost" >> $GITHUB_ENV
shell: bash

# install amici dependencies
- name: homebrew
run: brew install hdf5 swig gcc libomp boost
shell: bash
3 changes: 2 additions & 1 deletion .github/actions/setup-sonar-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ runs:

- name: Install sonarcloud tools
run: |
sudo apt-get install nodejs curl unzip \
sudo apt-get update \
&& sudo apt-get install nodejs curl unzip \
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_branch.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Deploy Branch
on: [push, merge_group, workflow_dispatch]
on: [push, pull_request, merge_group, workflow_dispatch]

jobs:
sdist:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

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

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -67,10 +67,10 @@ jobs:
sudo apt-get update \
&& sudo apt-get install -y \
pandoc \
python3-venv
&& pip install tox
- name: Set up SWIG
uses: ./.github/actions/setup-swig

- name: Run sphinx
run: scripts/run-sphinx.sh
run: tox -e doc
2 changes: 1 addition & 1 deletion .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Installation
on: [push, merge_group, workflow_dispatch]
on: [push, pull_request, merge_group, workflow_dispatch]

jobs:
archive:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test_matlab.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: Matlab
on: [push, merge_group, workflow_dispatch]
on:
push:
merge_group:
workflow_dispatch:
pull_request:
branches:
- master


jobs:
matlab:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_petab_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: |
source ./build/venv/bin/activate \
&& pytest --cov-report=xml:coverage.xml \
--cov=./ python/tests/test_*petab*.py
--cov=./ python/tests/test_*petab*.py python/tests/petab/
# run test models
- name: Run PEtab test suite
Expand All @@ -85,6 +85,7 @@ jobs:
tests/petab_test_suite/
- name: Codecov
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
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"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-22.04, macos-latest]

runs-on: ${{ matrix.os }}
Expand Down
67 changes: 54 additions & 13 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- master
- develop

jobs:
ubuntu-cpp-python-tests:
Expand Down Expand Up @@ -65,6 +66,7 @@ jobs:
${AMICI_DIR}/python/tests/test_splines.py
- name: Codecov Python
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -84,6 +86,7 @@ jobs:
&& lcov -a coverage_cpp.info -a coverage_py.info -o coverage.info
- name: Codecov CPP
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -92,6 +95,7 @@ jobs:
fail_ci_if_error: true

- name: Run sonar-scanner
if: ${{ env.SONAR_TOKEN != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -137,6 +141,7 @@ jobs:
${AMICI_DIR}/python/tests/test_splines_short.py
- name: Codecov Python
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -156,6 +161,7 @@ jobs:
&& lcov -a coverage_cpp.info -a coverage_py.info -o coverage.info
- name: Codecov CPP
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -164,6 +170,7 @@ jobs:
fail_ci_if_error: true

- name: Run sonar-scanner
if: ${{ env.SONAR_TOKEN != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -211,8 +218,8 @@ jobs:

# TODO: Include notebooks in coverage report

osx:
name: Tests OSX
macos_cpp_py:
name: Tests MacOS C++/Python
runs-on: macos-latest

steps:
Expand All @@ -224,16 +231,11 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
- run: echo "BNGPATH=${AMICI_DIR}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
# Ensure CMake is using the python version that we will use for the python tests later on
- run: echo "PYTHON_EXECUTABLE=${Python3_ROOT_DIR}/bin/python3" >> $GITHUB_ENV
- run: echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $GITHUB_ENV
- run: echo "BOOST_ROOT=$(brew --prefix)/opt/boost" >> $GITHUB_ENV
- name: Install dependencies
uses: ./.github/actions/install-macos-dependencies

# install amici dependencies
- name: homebrew
run: brew install hdf5 swig gcc cppcheck libomp boost
run: brew install cppcheck

- name: Build AMICI
run: scripts/buildAll.sh
Expand All @@ -247,8 +249,47 @@ jobs:
- name: cppcheck
run: scripts/run-cppcheck.sh

- name: Python tests
run: scripts/run-python-tests.sh

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

- name: Python tests
run: |
scripts/run-python-tests.sh \
test_pregenerated_models.py \
test_splines_short.py \
test_misc.py
macos_python:
name: Tests MacOS Python
runs-on: macos-latest

steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

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

- name: Install dependencies
uses: ./.github/actions/install-macos-dependencies

- name: Install python package
run: |
pip show numpy > /dev/null || python3 -m pip install numpy
scripts/installAmiciSource.sh
- name: Check OpenMP support
run: source build/venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())"

- name: Get BioNetGen
run: scripts/buildBNGL.sh

- name: Python tests
run: |
scripts/run-python-tests.sh \
--ignore=test_pregenerated_models.py \
--ignore=test_splines_short.py \
--ignore=test_misc.py
20 changes: 16 additions & 4 deletions .github/workflows/test_python_ver_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
experimental: [false]

steps:
Expand All @@ -44,15 +44,27 @@ jobs:
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

# install AMICI
- name: Build BNGL
run: scripts/buildBNGL.sh

- name: Install python package
run: scripts/installAmiciSource.sh

# until https://github.com/dateutil/dateutil >2.8.2 is released https://github.com/dateutil/dateutil/issues/1314
- run: source build/venv/bin/activate && pip3 install git+https://github.com/dateutil/dateutil.git@296d419fe6bf3b22897f8f210735ac9c4e1cb796
if: matrix.python-version == '3.12'

# install pysb before sympy to allow for sympy>=1.12 (https://github.com/pysb/pysb/commit/e83937cb8c74afc9b2fa96595b68464946745f33)
- run: source build/venv/bin/activate && pip3 install git+https://github.com/pysb/pysb

# until sympy>1.12 is released
- run: source build/venv/bin/activate && pip3 install git+https://github.com/sympy/sympy.git@master
if: matrix.python-version == '3.12'

- name: Python tests
run: |
source build/venv/bin/activate \
&& pip3 install git+https://github.com/pysb/pysb \
&& python3 -m pytest --ignore-glob=*petab* \
&& python3 -m pytest \
--durations=10 \
--ignore-glob=*petab* \
--ignore-glob=*test_splines.py ${AMICI_DIR}/python/tests
1 change: 1 addition & 0 deletions .github/workflows/test_sbml_semantic_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
path: tests/amici-semantic-results

- name: Codecov SBMLSuite
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- cron: '48 4 * * *'
pull_request:
branches:
- develop
- master

jobs:
Expand Down
37 changes: 22 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files", "--line-length", "79"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -16,15 +10,28 @@ repos:
args: [--allow-multiple-documents]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.11
hooks:
- id: black-jupyter
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
args: ["--line-length", "79"]
# Run the linter.
- id: ruff
args:
- --fix
- --config
- python/sdist/pyproject.toml

# Run the formatter.
- id: ruff-format
args:
- --config
- python/sdist/pyproject.toml

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py39-plus"]
additional_dependencies: [pyupgrade==3.15.0]

exclude: '^(ThirdParty|models)/'
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ build:
- libatlas-base-dev
- swig
tools:
python: "3.9"
python: "3.11"
Loading

0 comments on commit 224e9be

Please sign in to comment.