Skip to content

Move installation-related modules to amici._installation #371

Move installation-related modules to amici._installation

Move installation-related modules to amici._installation #371

name: PEtab
on:
push:
branches:
- main
- 'release*'
pull_request:
branches:
- main
merge_group:
workflow_dispatch:
jobs:
build:
name: PEtab SciML Testsuite
runs-on: ubuntu-latest
env:
ENABLE_GCOV_COVERAGE: TRUE
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v5
with:
fetch-depth: 20
# todo, update after https://github.com/sebapersson/petab_sciml_testsuite/issues/14 is merged
- name: Download PEtab SciML test suite
run: |
git clone --depth 1 --branch main \
https://github.com/FFroehlich/petab_sciml_testsuite \
tests/sciml/testsuite
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies
# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y python3-venv
- run: |
echo "${HOME}/.local/bin/" >> $GITHUB_PATH
# install AMICI
- name: Install python package
run: scripts/installAmiciSource.sh
- name: Install Python dependencies
run: |
source ./venv/bin/activate \
&& pip3 install wheel pytest shyaml pytest-cov
# retrieve test models
- name: Download and install PEtab SciML
run: |
source ./venv/bin/activate \
&& python -m pip install git+https://github.com/petab-dev/petab_sciml.git@main#subdirectory=src/python
- name: Install petab
# FIXME: Currently, an older version of petab that is required for
# these tests, because petab-sciml is currently a mix of petab v1
# and v2 functionality.
run: |
source ./venv/bin/activate \
&& python3 -m pip uninstall -y petab \
&& python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@sciml
- name: Run PEtab SciML testsuite
run: |
source ./venv/bin/activate \
&& pytest --cov-report=xml:coverage_petab_sciml.xml \
--cov=amici tests/sciml/test_sciml.py
- name: Codecov
if: (github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev') && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage_petab_sciml.xml
flags: petab_sciml
fail_ci_if_error: true