-
Notifications
You must be signed in to change notification settings - Fork 33
210 lines (173 loc) · 6.68 KB
/
test_petab_test_suite.yml
File metadata and controls
210 lines (173 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
name: PEtab
on:
push:
branches:
- main
- 'release*'
pull_request:
branches:
- main
merge_group:
workflow_dispatch:
jobs:
petab_v1:
name: PEtab Testsuite
runs-on: ubuntu-latest
env:
ENABLE_GCOV_COVERAGE: TRUE
strategy:
matrix:
python-version: ["3.14"]
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
- 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
- name: Build BNGL
run: scripts/buildBNGL.sh
- run: |
echo "${HOME}/.local/bin/" >> $GITHUB_PATH
echo "${GITHUB_WORKSPACE}/tests/performance/" >> $GITHUB_PATH
echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
# install AMICI
- name: Install python package
run: scripts/installAmiciSource.sh
- name: Install petab
run: |
source ./venv/bin/activate \
&& pip3 install wheel pytest shyaml pytest-cov pysb>=1.16
# retrieve test models
- name: Download and install PEtab test suite
# FIXME: Until we have proper PEtab v2 import
# (https://github.com/AMICI-dev/AMICI/issues/2662),
# we need `10ffb050380933b60ac192962bf9550a9df65a9c`
# with the pseudo-v2 format instead of `main`
# run: |
# git clone --depth 1 --branch main \
# https://github.com/PEtab-dev/petab_test_suite \
# && source ./venv/bin/activate \
# && cd petab_test_suite && pip3 install -e .
run: |
git clone https://github.com/PEtab-dev/petab_test_suite \
&& source ./venv/bin/activate \
&& cd petab_test_suite \
&& git checkout 10ffb050380933b60ac192962bf9550a9df65a9c \
&& 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@8dc6c1c4b801fba5acc35fcd25308a659d01050e \
&& 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_/
# run test models
- name: Run PEtab test suite
run: |
source ./venv/bin/activate \
&& AMICI_PARALLEL_COMPILE="" pytest -rxXs -v \
--cov-report=xml:coverage.xml \
--cov-append \
--cov=amici \
tests/petab_test_suite/test_petab_suite.py
- name: Codecov
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: petab
fail_ci_if_error: true
petab_v2:
name: PEtab v2 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@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
with:
fetch-depth: 20
- 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
- name: Build BNGL
run: scripts/buildBNGL.sh
- run: |
echo "${HOME}/.local/bin/" >> $GITHUB_PATH
echo "${GITHUB_WORKSPACE}/tests/performance/" >> $GITHUB_PATH
echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
# install AMICI
- name: Install python package
run: scripts/installAmiciSource.sh
- name: Install petab
run: |
source ./venv/bin/activate \
&& pip3 install wheel pytest shyaml pytest-cov pysb>=1.16
# retrieve test models
- name: Download and install PEtab test suite
run: |
git clone https://github.com/PEtab-dev/petab_test_suite \
&& source ./venv/bin/activate \
&& cd petab_test_suite \
&& git checkout c12b9dc4e4c5585b1b83a1d6e89fd22447c46d03 \
&& pip3 install -e .
# TODO: once there is a PEtab v2 benchmark collection
# - 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@8dc6c1c4b801fba5acc35fcd25308a659d01050e \
&& python3 -m pip install git+https://github.com/pysb/pysb@master \
&& python3 -m pip install sympy>=1.12.1
# run test models
- name: Run PEtab test suite
run: |
source ./venv/bin/activate \
&& AMICI_PARALLEL_COMPILE="" pytest -rxXs -v \
--cov-report=xml:coverage.xml \
--cov-append \
--cov=amici \
tests/petab_test_suite/test_petab_v2_suite.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 }}
files: coverage.xml
flags: petab
fail_ci_if_error: true