Skip to content

Commit

Permalink
Release 0.4.3
Browse files Browse the repository at this point in the history
Merge pull request #262 from ICB-DCM/develop

Library
* Update to current PEtab
* Save more metadata in simulator result file (#259)
* More informative output for hierarchical optimization (Closes #210) (#255)
* Update to AMICI v0.10.21 and petab 0.1.7 (#261)
* Fix: Handle paths with blanks in build scripts (Fixes #246)
* Remove old example models lucarelli and raia (Closes #215)
* Misc fixups
* Cleanup build system, e.g. replace redundant CMake option BUILD_TESTS by auto-provided BUILD_TESTING

Documentation
* Update documentation, now created with sphinx/breeze/exhale and available at https://readthedocs.org/projects/parpe/ (#249) (#251)

CI
* Use Github actions instead of shippable (#256)
* Set up sonarcloud for static code analysis (#254)
* Various fixes (#258) (#236)
* Better integration of google tests in ctest using gtest_discover_tests. Raise CMake requirement. (#253)
* Run PEtab test suite (#244)
* Run python package tests via CTest
* Tests with steadystate example to pytest
  • Loading branch information
dweindl authored Apr 4, 2020
2 parents 40432be + 47799b5 commit 142271c
Show file tree
Hide file tree
Showing 280 changed files with 16,619 additions and 15,753 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/benchmark_models.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
name: Test benchmark collection models
on: [push]
jobs:
container:
runs-on: ubuntu-latest
container: dweindl/parpeci:1511078
name: benchmark models
steps:
- uses: actions/checkout@master

- run: echo "::set-env name=PARPE_BASE::$(pwd)"
- run: echo "::set-env name=PARPE_BUILD::${PARPE_BASE}/build"
- run: echo "::set-env name=AMICI_PATH::${PARPE_BASE}/deps/AMICI/"

# Build dependencies

- name: Install AMICI deps
run: |
cd $AMICI_PATH \
&& scripts/buildSuiteSparse.sh \
&& scripts/buildSundials.sh
- name: Install AMICI
run: |
cmake \
-S ${AMICI_PATH} \
-B ${AMICI_PATH}/build \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
&& cmake --build "${AMICI_PATH}/build" --parallel -- VERBOSE=1
- name: Install parPE Python deps
run: |
pip install -r ${PARPE_BASE}/python/requirements.txt
- name: Configure parpe
run: |
CC=mpicc CXX=mpiCC \
cmake \
-S"${PARPE_BASE}" \
-B"${PARPE_BUILD}" \
-DIPOPT_INCLUDE_DIRS=/usr/include/coin/ \
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DCERES_LIBRARIES="/usr/lib/libceres.so;/usr/lib/x86_64-linux-gnu/libglog.so;/usr/lib/x86_64-linux-gnu/libgflags.so" \
-DCERES_INCLUDE_DIRS="/usr/include/;/usr/include/eigen3" \
-DMPI_INCLUDE_DIRS=/usr/include/openmpi-x86_64/ \
-DGCOVR_REPORT=TRUE \
-DBUILD_TESTING=FALSE
- name: Build parPE
run: |
cmake --build "${PARPE_BUILD}" --parallel -- VERBOSE=1
# Actual Benchmark model tests

- name: Benchmark models --- requirements
run: |
sudo apt install bc \
&& $PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv \
pip3 install shyaml
- name: Benchmark models --- repository
env:
BM_REPO_URL: https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git
run: |
cd $PARPE_BASE/benchmark_collection \
&& git clone --depth 1 $BM_REPO_URL
- name: Benchmark models --- tests
run: |
cd $PARPE_BASE/benchmark_collection \
&& AMICI_PARALLEL_COMPILE=4 \
BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
$PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv ./all.sh
1 change: 1 addition & 0 deletions .github/workflows/deploy_dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deploy to dockerhub
on: [push]
jobs:
build:
name: Deploy to dockerhub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/parpe_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
name: parPE tests
on: [push]
jobs:
container:
runs-on: ubuntu-latest
container: dweindl/parpeci:1511078
name: parPE tests
steps:
- uses: actions/checkout@master
with:
fetch-depth: 42


- run: echo "::set-env name=PARPE_BASE::$(pwd)"
- run: echo "::set-env name=PARPE_BUILD::${PARPE_BASE}/build"
- run: echo "::set-env name=AMICI_PATH::${PARPE_BASE}/deps/AMICI/"

# sonar cloud
- run: echo "::set-env name=SONAR_SCANNER_VERSION::4.2.0.1873"
- run: echo "::set-env name=SONAR_SCANNER_HOME::/root/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux"
- run: echo "::set-env name=SONAR_SCANNER_OPTS::-server"
- run: echo "::add-path::${SONAR_SCANNER_HOME}/bin"
- run: echo "::add-path::/root/.sonar/build-wrapper-linux-x86"

- name: Info
run: lsb_release -a && printenv

# Build dependencies

- name: Install AMICI deps
run: |
cd $AMICI_PATH \
&& scripts/buildSuiteSparse.sh \
&& scripts/buildSundials.sh \
&& scripts/buildCpputest.sh #&& scripts/buildAmici.sh
- name: Install AMICI
# with tests:
# CPPUTEST_BUILD_DIR=${AMICI_PATH}/ThirdParty/cpputest-master/build/
# -DCppUTest_DIR=${CPPUTEST_BUILD_DIR}
run: |
cmake \
-S ${AMICI_PATH} \
-B ${AMICI_PATH}/build \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
&& cmake --build "${AMICI_PATH}/build" --parallel -- VERBOSE=1
- name: Install google test
run: ThirdParty/installGoogleTest.sh

- name: Install parPE Python deps
run: |
pip install -r ${PARPE_BASE}/python/requirements.txt
- name: Configure parPE
run: |
CC=mpicc CXX=mpiCC \
cmake \
-S"${PARPE_BASE}" \
-B"${PARPE_BUILD}" \
-DIPOPT_INCLUDE_DIRS=/usr/include/coin/ \
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DCERES_LIBRARIES="/usr/lib/libceres.so;/usr/lib/x86_64-linux-gnu/libglog.so;/usr/lib/x86_64-linux-gnu/libgflags.so" \
-DCERES_INCLUDE_DIRS="/usr/include/;/usr/include/eigen3" \
-DMPI_INCLUDE_DIRS=/usr/include/openmpi-x86_64/ \
-DGCOV_REPORT=TRUE \
-DBUILD_TESTING=TRUE
- name: Build parPE
# with sonar build wrapper
run: |
build-wrapper-linux-x86-64 --out-dir bw-output \
cmake --build "${PARPE_BUILD}" --parallel -- VERBOSE=1
- name: Run parPE python unittests
run: |
$PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv \
pip install pytest-cov \
&& $PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv \
pytest \
--cov-report=xml:$PARPE_BUILD/coverage_py.xml \
--cov=./ \
$PARPE_BASE/python/tests/
# Redundant with parpe_coverage_cobertura
#- name: Run CTEST
# run: cd ${PARPE_BUILD} && CTEST_OUTPUT_ON_FAILURE=1 make test

- name: Create coverage report
run: |
cd ${PARPE_BUILD} \
&& CTEST_OUTPUT_ON_FAILURE=1 make parpe_coverage \
&& make ExperimentalCoverage
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sonar-scanner \
-Dsonar.cfamily.build-wrapper-output=bw-output \
-Dsonar.projectVersion="$(git describe --abbrev=4 --dirty=-dirty --always --tags | tr -d '\n')"
- name: Run valgrind
run: |
cd ${PARPE_BUILD} \
&& if (CTEST_OUTPUT_ON_FAILURE=1 make ExperimentalMemCheck); \
then cat Testing/Temporary/MemoryChecker.*.log; \
else cat Testing/Temporary/MemoryChecker.*.log; exit 1; fi
77 changes: 77 additions & 0 deletions .github/workflows/petab_testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables

name: PEtab test suite
on: [push]
jobs:
container:
runs-on: ubuntu-latest
container: dweindl/parpeci:1511078
name: PEtab test suite
steps:
- uses: actions/checkout@master

- run: echo "::set-env name=PARPE_BASE::$(pwd)"
- run: echo "::set-env name=PARPE_BUILD::${PARPE_BASE}/build"
- run: echo "::set-env name=AMICI_PATH::${PARPE_BASE}/deps/AMICI/"

# Build dependencies

- name: Install AMICI deps
run: |
cd $AMICI_PATH \
&& scripts/buildSuiteSparse.sh \
&& scripts/buildSundials.sh
- name: Install AMICI
run: |
cmake \
-S ${AMICI_PATH} \
-B ${AMICI_PATH}/build \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
&& cmake --build "${AMICI_PATH}/build" --parallel -- VERBOSE=1
- name: Install parPE Python deps
run: |
pip install -r ${PARPE_BASE}/python/requirements.txt
- name: Configure parpe
run: |
CC=mpicc CXX=mpiCC \
cmake \
-S"${PARPE_BASE}" \
-B"${PARPE_BUILD}" \
-DIPOPT_INCLUDE_DIRS=/usr/include/coin/ \
-DIPOPT_LIBRARIES=/usr/lib/libipopt.so \
-DCERES_LIBRARIES="/usr/lib/libceres.so;/usr/lib/x86_64-linux-gnu/libglog.so;/usr/lib/x86_64-linux-gnu/libgflags.so" \
-DCERES_INCLUDE_DIRS="/usr/include/;/usr/include/eigen3" \
-DMPI_INCLUDE_DIRS=/usr/include/openmpi-x86_64/ \
-DGCOVR_REPORT=TRUE \
-DBUILD_TESTING=FALSE
- name: Build parPE
run: |
cmake --build "${PARPE_BUILD}" --parallel -- VERBOSE=1
# Actual PEtab test suite

- name: PEtab test suite --- requirements
run: |
$PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv \
pip3 install pytest-xdist
- name: PEtab test suite --- repository
env:
PETAB_TEST_URL: https://github.com/PEtab-dev/petab_test_suite.git
run: |
cd $PARPE_BASE/ \
&& git clone --depth 1 $PETAB_TEST_URL \
&& $PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv \
pip3 install -e petab_test_suite
- name: PEtab test suite --- tests
run: |
$PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv \
pytest -v -n 2 $PARPE_BASE/tests/petab-test-suite
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CMakeLists.txt.user
/ThirdParty/*
/doc/Doxyfile
/doc/doxy/*
/doc/exhale_cpp_api/
.project
.pydevproject
.idea/*
Expand All @@ -18,6 +19,7 @@ __pycache__/
*/swig/*_wrap.cpp
/amici/examples/steadystate/model_steadystate_scaled
/amici/examples/lucarelli/lucarelli_12/lucarelli_12/
/activate

# snakemake
.snakemake/
Expand All @@ -38,3 +40,8 @@ python/test_*.png

/benchmark_collection/*_*[0-9][0-9][0-9][0-9]/
/benchmark_collection/parpe_*_*[0-9][0-9][0-9][0-9]/

# breathe-generatd files
doc/source/api/

test_*.png
29 changes: 29 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: doc/conf.py
# fail_on_warning: True

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
#formats:
# - pdf

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: doc/requirements_doc.txt

#build:
# image: latest
Loading

0 comments on commit 142271c

Please sign in to comment.