Skip to content

Commit a040767

Browse files
authored
Merge pull request #906 from ICB-DCM/release_0_10_17
Release 0.10.17
2 parents a4e077f + 6048d34 commit a040767

40 files changed

+1652
-967
lines changed

.github/workflows/test-large-model.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- develop
66
- master
7-
- feature_sparse_quadratures
7+
- fix_896_perftestfiles
88

99
pull_request:
1010
branches:
@@ -53,10 +53,11 @@ jobs:
5353
cd CS_Signalling_ERBB_RAS_AKT \
5454
&& check_time.sh \
5555
petab_import amici_import_petab.py -v \
56-
-s 'PEtab/CS_Signalling_ERBB_RAS_AKT_petab.xml' \
57-
-c 'PEtab/conditions_petab.tsv' \
58-
-m 'PEtab/measurements_petab.tsv' \
59-
-p 'PEtab/parameters_petab.tsv' --no-compile
56+
-n 'CS_Signalling_ERBB_RAS_AKT_petab' \
57+
-s 'FroehlichKes2018/PEtab/CS_Signalling_ERBB_RAS_AKT_petab.xml' \
58+
-c 'FroehlichKes2018/PEtab/conditions_petab.tsv' \
59+
-m 'FroehlichKes2018/PEtab/measurements_petab.tsv' \
60+
-p 'FroehlichKes2018/PEtab/parameters_petab.tsv' --no-compile
6061
6162
# install model package
6263
- name: Install test model
@@ -79,4 +80,4 @@ jobs:
7980
check_time.sh forward_simulation_non_optimal_parameters tests/performance/test.py forward_simulation_non_optimal_parameters
8081
- name: adjoint_sensitivities_non_optimal_parameters
8182
run: |
82-
check_time.sh adjoint_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_sensitivities_non_optimal_parameters
83+
check_time.sh adjoint_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_sensitivities_non_optimal_parameters

.travis.yml

Lines changed: 62 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ matrix:
1313
- os: linux
1414
dist: bionic
1515
language: python
16-
python: 3.7
16+
python: 3.8
1717
compiler: gcc
1818
addons:
1919
apt:
@@ -27,11 +27,21 @@ matrix:
2727
- libc6-dbg
2828
env:
2929
- ENABLE_GCOV_COVERAGE=TRUE
30-
- CI_MODE=test
30+
- CI_BUILD=TRUE
31+
- CI_CPPUTEST=TRUE
32+
- CI_PYTHON=TRUE
33+
- CI_ARCHIVE=TRUE
34+
- CI_NOTEBOOK=TRUE
3135
before_install:
3236
- ./scripts/buildValgrind.sh
3337
after_script:
38+
# cpputest coverage cpp
39+
- lcov --compat-libtool --no-external --directory ${BASE_DIR}/build/CMakeFiles/amici.dir/src --base-directory ${BASE_DIR} --capture --output-file coverage_cpp.info
40+
# py coverage cpp
41+
- lcov --compat-libtool --no-external --directory ${BASE_DIR}/python/sdist/build/temp.linux-x86_64-${TRAVIS_PYTHON_VERSION}/amici/src --base-directory ${BASE_DIR} --capture --output-file coverage_py.info
42+
- lcov -a coverage_cpp.info -a coverage_py.info -o coverage.info
3443
- bash <(curl -s https://codecov.io/bash) -f coverage.info -X fix -F cpp
44+
# py coverage py
3545
- bash <(curl -s https://codecov.io/bash) -f coverage_py.xml -F python
3646
before_deploy:
3747
- cd $BASE_DIR
@@ -43,12 +53,36 @@ matrix:
4353
branch: master
4454
tags: true
4555

56+
- os: linux
57+
dist: bionic
58+
language: python
59+
python: 3.7
60+
compiler: gcc
61+
addons:
62+
apt:
63+
packages:
64+
- libhdf5-serial-dev
65+
- zlib1g-dev
66+
- libatlas-base-dev
67+
- g++-5
68+
- libc6-dbg
69+
env:
70+
- CI_BUILD=TRUE
71+
- CI_PYTHON=TRUE
72+
- CI_NOTEBOOK=TRUE
73+
4674
- os: osx
4775
osx_image: xcode11
4876
language: minimal
4977
compiler: clang
5078
env:
51-
- CI_MODE=test
79+
- CI_BUILD=TRUE
80+
- CI_CPPUTEST=TRUE
81+
- CI_CMAKE=TRUE
82+
- CI_ARCHIVE=TRUE
83+
- CI_CPPCHECK=TRUE
84+
- CI_PYTHON=TRUE
85+
- CI_NOTEBOOK=TRUE
5286
addons:
5387
homebrew:
5488
packages:
@@ -59,6 +93,7 @@ matrix:
5993
update: true
6094
before_install:
6195
- travis_wait brew link --overwrite gcc # fix linker warning regarding /usr/local/include/c++
96+
- brew link --overwrite python # https://github.com/ICB-DCM/AMICI/issues/894
6297
- export -f travis_fold travis_nanoseconds travis_time_start travis_time_finish
6398
- pip3 install --user -U numpy
6499
after_success:
@@ -69,19 +104,21 @@ matrix:
69104
language: minimal
70105
compiler: clang
71106
env:
72-
- CI_MODE=deploy
107+
- CI_DOC=TRUE
73108
addons:
74109
homebrew:
75110
casks:
76111
- mactex
77112
packages:
78-
- doxygen
113+
# - doxygen # disabled because current 1.8.16 does not work with recent ghostscript
114+
- bison # doxygen build
79115
- ragel
80116
- graphviz
81117
update: true
82118
before_install:
83119
- export PATH=/Users/travis/Library/Python/3.7/bin:/Library/TeX/texbin:$PATH
84120
- export -f travis_fold travis_nanoseconds travis_time_start travis_time_finish
121+
- brew link --overwrite python # https://github.com/ICB-DCM/AMICI/issues/894
85122
after_success:
86123
- cd $BASE_DIR # cd to base dir for correct relative path in deploy
87124
deploy:
@@ -98,30 +135,31 @@ install:
98135
- export BASE_DIR=`pwd`
99136
# Build swig4.0 (not yet available with apt) to include pydoc in source distribution for pypi
100137
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/downloadAndBuildSwig.sh && export PATH=${BASE_DIR}/ThirdParty/swig-4.0.1/install/bin:${PATH}; fi
101-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PYTHON_EXECUTABLE=$(which python3); fi # cmake wont be able to find python3 on its own ...
102-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_MODE" == "test" ]]; then pip3 install --upgrade pip==9.0.3 setuptools wheel pkgconfig scipy; fi
103-
- if [[ "$TRAVIS_OS_NAME" != "linux" ]] && [[ "$CI_MODE" == "test" ]]; then pip3 install --user --upgrade pip==9.0.3 setuptools wheel pkgconfig scipy; fi
104-
- if [[ "$CI_MODE" == "deploy" ]]; then pip3 install --user --upgrade pip==9.0.3 doxypypy; fi # pinning pip because of https://github.com/pypa/pip/issues/5240
105-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/buildSuiteSparse.sh; fi
106-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/buildSundials.sh; fi
107-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/buildCpputest.sh; fi
108-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/buildBNGL.sh; fi
109-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/buildAmici.sh; fi
110-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/installAmiciArchive.sh; fi
111-
- if [[ "$CI_MODE" == "test" ]]; then ./scripts/installAmiciSource.sh; fi
138+
- if [[ "$CI_DOC" == "TRUE" ]]; then pip3 install --user --upgrade pip==9.0.3 doxypypy; fi # pinning pip because of https://github.com/pypa/pip/issues/5240
139+
- if [[ "$CI_DOC" == "TRUE" ]]; then export PATH="/usr/local/opt/bison/bin:$PATH"; LDFLAGS="-L/usr/local/opt/bison/lib" scripts/downloadAndBuildDoxygen.sh; fi
140+
- if [[ "$CI_BUILD" == "TRUE" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip3 install --upgrade pip==9.0.3 setuptools wheel pkgconfig scipy; fi
141+
- if [[ "$CI_BUILD" == "TRUE" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]]; then pip3 install --user --upgrade pip==9.0.3 setuptools wheel pkgconfig scipy; fi
142+
- if [[ "$CI_BUILD" == "TRUE" ]]; then ./scripts/buildSuiteSparse.sh; fi
143+
- if [[ "$CI_BUILD" == "TRUE" ]]; then ./scripts/buildSundials.sh; fi
144+
- if [[ "$CI_BUILD" == "TRUE" ]]; then ./scripts/buildCpputest.sh; fi
145+
- if [[ "$CI_PYTHON" == "TRUE" ]]; then ./scripts/buildBNGL.sh; fi
146+
- if [[ "$CI_BUILD" == "TRUE" ]]; then ./scripts/buildAmici.sh; fi
147+
- if [[ "$CI_ARCHIVE" == "TRUE" ]]; then ./scripts/installAmiciArchive.sh; fi
148+
- if [[ "$CI_PYTHON" == "TRUE" ]]; then ./scripts/installAmiciSource.sh; fi
112149

113150
script:
114151
- export -f travis_fold travis_nanoseconds travis_time_start travis_time_finish
115152
- export FOLD=$BASE_DIR/scripts/travis_wrap.sh
116153
- cd $BASE_DIR
117-
- if [[ "$CI_MODE" == "test" ]]; then $FOLD notebooks "cd $BASE_DIR && scripts/runNotebook.sh python/examples/example_*/"; fi
118-
- if [[ "$TRAVIS_OS_NAME" != "linux" ]] && [[ "$CI_MODE" == "test" ]]; then $FOLD cpputest ./scripts/run-cpputest.sh; fi
119-
- if [[ "$TRAVIS_OS_NAME" != "linux" ]] && [[ "$CI_MODE" == "test" ]]; then $FOLD python-tests ./scripts/run-python-tests.sh; fi
120-
- if [[ "$TRAVIS_OS_NAME" != "linux" ]] && [[ "$CI_MODE" == "test" ]]; then $FOLD cmake ./tests/testCMakeCompilation.sh; fi
121-
- if [[ "$CI_MODE" == "deploy" ]]; then $FOLD doxygen ./scripts/run-doxygen.sh; fi
122-
- if [[ "$TRAVIS_OS_NAME" != "linux" ]] && [[ "$CI_MODE" == "test" ]]; then $FOLD cppcheck ./scripts/run-cppcheck.sh; fi
123-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_MODE" == "test" ]]; then $FOLD valgrind ./scripts/run-valgrind.sh; fi
124-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_MODE" == "test" ]]; then $FOLD codecov ./scripts/run-codecov.sh; fi
154+
- if [[ "$CI_CPPCHECK" == "TRUE" ]]; then $FOLD cppcheck ./scripts/run-cppcheck.sh; fi
155+
- if [[ "$CI_NOTEBOOK" == "TRUE" ]]; then $FOLD notebooks "cd $BASE_DIR && scripts/runNotebook.sh python/examples/example_*/"; fi
156+
- if [[ "$CI_PYTHON" == "TRUE" ]] && [[ "$ENABLE_GCOV_COVERAGE" == "TRUE" ]]; then $FOLD codecov ./scripts/run-codecov.sh; fi
157+
- if [[ "$CI_PYTHON" == "TRUE" ]] && [[ "$ENABLE_GCOV_COVERAGE" != "TRUE" ]]; then $FOLD python-tests ./scripts/run-python-tests.sh; fi
158+
# needs to be run after python tests
159+
- if [[ "$CI_CMAKE" == "TRUE" ]]; then $FOLD cmake ./tests/testCMakeCompilation.sh; fi
160+
- if [[ "$CI_CPPUTEST" == "TRUE" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then $FOLD valgrind ./scripts/run-valgrind.sh; fi
161+
- if [[ "$CI_CPPUTEST" == "TRUE" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]]; then $FOLD cpputest ./scripts/run-cpputest.sh; fi
162+
- if [[ "$CI_DOC" == "TRUE" ]]; then $FOLD doxygen ./scripts/run-doxygen.sh; fi
125163

126164
after_failure:
127165
- $FOLD ls -alR

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ For Python-AMICI usage see
5858
To install development versions which have not been released to pypi yet,
5959
you can install AMICI with pip directly from GitHub using:
6060

61-
pip3 install -e https://github.com/icb-dcm/amici/archive/develop.zip#egg=amici\&subdirectory=python/sdist
61+
pip3 install -e git+https://github.com/icb-dcm/amici.git@develop#egg=amici\&subdirectory=python/sdist
6262

6363
Replace `develop` by the branch or commit you want to install.
6464

ThirdParty/sundials/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ reporting work done with SUNDIALS:
114114
* Alan C. Hindmarsh, Peter N. Brown, Keith E. Grant, Steven L. Lee, Radu
115115
Serban, Dan E. Shumaker, and Carol S. Woodward. 2005. SUNDIALS: Suite of
116116
nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw.
117-
31, 3 (September 2005), 363-396. DOI=http://dx.doi.org/10.1145/1089014.1089020
117+
31, 3 (September 2005), 363-396. DOI=https://doi.org/10.1145/1089014.1089020
118118

119119
## License ##
120120
SUNDIALS is released under the BSD 3-clause license. See the [LICENSE](./LICENSE)

documentation/CI.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ To run Python tests, run `../scripts/run-python-tests.sh` from anywhere
2626
(assumes build directory is `build/`) or run `make python-tests` in your build
2727
directory.
2828

29+
### SBML Test Suite
30+
31+
We test Python-AMICI SBML support using the test cases from the semantic
32+
[SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite/). When making
33+
changes to the model import functions, make sure to run these tests.
34+
35+
To run the SBML Test Suite test cases, the easiest way is:
36+
37+
1. Running `scripts/installAmiciSource.sh` which
38+
creates a virtual Python environment and performs a development installation
39+
of AMICI from the current repository. (This needs to be run only once or
40+
after AMICI model generation or C++ changes).
41+
42+
2. Running `scripts/run-SBMLTestsuite.sh`. This will download the test cases
43+
if necessary and run them all. A subset of test cases can be selected with
44+
an optional argument (e.g. `scripts/run-SBMLTestsuite.sh 1,3-6,8`, to run
45+
cases 1, 3, 4, 5, 6 and 8).
46+
47+
Once the test cases are available locally, for debugging it might be easier
48+
to directly use `pytest` with `tests/testSBMLSuite.py`.
49+
2950

3051
## Matlab tests (not included in CI pipeline)
3152

documentation/amici_refs.bib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ @article{LoosMoe2018
300300
Title = {A Hierarchical, Data-Driven Approach to Modeling Single-Cell Populations Predicts Latent Causes of Cell-To-Cell Variability},
301301
Volume = {6},
302302
Year = {2018},
303-
Bdsk-Url-1 = {http://dx.doi.org/10.1016/j.cels.2018.04.008}}
303+
Bdsk-Url-1 = {https://doi.org/10.1016/j.cels.2018.04.008}}
304304

305305
@article{MaierLoo2017,
306306
Author = {Maier, C. and Loos, C. and Hasenauer, J.},
@@ -457,7 +457,7 @@ @Article{SchmiesterSch2019
457457
year = {2019},
458458
month = {07},
459459
issn = {1367-4803},
460-
abstract = {{Mechanistic models of biochemical reaction networks facilitate the quantitative understanding of biological processes and the integration of heterogeneous datasets. However, some biological processes require the consideration of comprehensive reaction networks and therefore large-scale models. Parameter estimation for such models poses great challenges, in particular when the data are on a relative scale.Here, we propose a novel hierarchical approach combining (i) the efficient analytic evaluation of optimal scaling, offset, and error model parameters with (ii) the scalable evaluation of objective function gradients using adjoint sensitivity analysis. We evaluate the properties of the methods by parameterizing a pan-cancer ordinary differential equation model (\\&gt;1000 state variables, \\&gt;4000 parameters) using relative protein, phospho-protein and viability measurements. The hierarchical formulation improves optimizer performance considerably. Furthermore, we show that this approach allows estimating error model parameters with negligible computational overhead when no experimental estimates are available, providing an unbiased way to weight heterogeneous data. Overall, our hierarchical formulation is applicable to a wide range of models, and allows for the efficient parameterization of large-scale models based on heterogeneous relative measurements.Supplementary information are available at Bioinformatics online. Supplementary code and data are available online at http://doi.org/10.5281/zenodo.3254429 and http://doi.org/10.5281/zenodo.3254441.}},
460+
abstract = {{Mechanistic models of biochemical reaction networks facilitate the quantitative understanding of biological processes and the integration of heterogeneous datasets. However, some biological processes require the consideration of comprehensive reaction networks and therefore large-scale models. Parameter estimation for such models poses great challenges, in particular when the data are on a relative scale.Here, we propose a novel hierarchical approach combining (i) the efficient analytic evaluation of optimal scaling, offset, and error model parameters with (ii) the scalable evaluation of objective function gradients using adjoint sensitivity analysis. We evaluate the properties of the methods by parameterizing a pan-cancer ordinary differential equation model (\\&gt;1000 state variables, \\&gt;4000 parameters) using relative protein, phospho-protein and viability measurements. The hierarchical formulation improves optimizer performance considerably. Furthermore, we show that this approach allows estimating error model parameters with negligible computational overhead when no experimental estimates are available, providing an unbiased way to weight heterogeneous data. Overall, our hierarchical formulation is applicable to a wide range of models, and allows for the efficient parameterization of large-scale models based on heterogeneous relative measurements.Supplementary information are available at Bioinformatics online. Supplementary code and data are available online at https://doi.org/10.5281/zenodo.3254429 and https://doi.org/10.5281/zenodo.3254441.}},
461461
doi = {10.1093/bioinformatics/btz581},
462462
eprint = {http://oup.prod.sis.lan/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btz581/29004243/btz581.pdf},
463463
url = {https://doi.org/10.1093/bioinformatics/btz581},

documentation/development.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ described below:
6060
* Write meaningful commit messages
6161

6262
* Run all tests to ensure nothing was broken
63+
([more details](documentation/CI.md))
6364

6465
* Run `scripts/buildAll.sh && scripts/run-cpputest.sh`.
6566

-24.7 KB
Loading

documentation/gfx/amici_workflow.svg

Lines changed: 1 addition & 1 deletion
Loading

include/amici/solver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,8 @@ class Solver {
12531253
*
12541254
* @param which identifier of the backwards problem
12551255
* @param ami_mem pointer to the forward solver memory instance
1256+
* @return A (void *) pointer to the CVODES memory allocated for the
1257+
* backward problem.
12561258
*/
12571259
virtual void *getAdjBmem(void *ami_mem, int which) const = 0;
12581260

0 commit comments

Comments
 (0)