Skip to content

Commit

Permalink
Update AMICI to v0.20.0 (#378)
Browse files Browse the repository at this point in the history
* Update AMICI to v0.20.0

git subrepo clone (merge) --branch=v0.20.0 --force [email protected]:AMICI-dev/AMICI.git deps/AMICI

subrepo:
  subdir:   "deps/AMICI"
  merged:   "ffcbf665"
upstream:
  origin:   "[email protected]:AMICI-dev/AMICI.git"
  branch:   "v0.20.0"
  commit:   "ffcbf665"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"


* Update AMICI to v0.20.0

  * Fixes some amici setuptools incompatibility
  * Adapt to changes in logging

* Handle git permission issues
* Fix RTD issues
* Update valgrind suppressions
* Update sonar tools

Requires:

* CMake >= 3.22
  • Loading branch information
dweindl authored Dec 11, 2023
1 parent 540e2f4 commit 2803ff3
Show file tree
Hide file tree
Showing 1,007 changed files with 65,862 additions and 61,378 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/benchmark_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
name: benchmark models
steps:
- uses: actions/checkout@master
- name: chown checkout directory
# https://github.com/actions/runner/issues/2033
run: chown -R $(id -u):$(id -g) $PWD

- run: echo "PARPE_BASE=$(pwd)" >> $GITHUB_ENV
- run: echo "PARPE_BUILD=${PARPE_BASE}/build" >> $GITHUB_ENV
Expand Down Expand Up @@ -68,6 +71,6 @@ jobs:
- name: Benchmark models --- tests
run: |
cd $PARPE_BASE/benchmark_collection \
&& AMICI_PARALLEL_COMPILE=4 \
&& AMICI_PARALLEL_COMPILE="" \
BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
$PARPE_BASE/misc/run_in_venv.sh $PARPE_BASE/build/venv ./all.sh
16 changes: 12 additions & 4 deletions .github/workflows/parpe_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ jobs:

steps:
- uses: actions/checkout@master
- name: chown checkout directory
# https://github.com/actions/runner/issues/2033
run: chown -R $(id -u):$(id -g) $PWD
- run: git fetch --prune --unshallow

- run: echo "PARPE_BASE=$(pwd)" >> $GITHUB_ENV
- run: echo "PARPE_BUILD=${PARPE_BASE}/build" >> $GITHUB_ENV
- run: echo "AMICI_PATH=${PARPE_BASE}/deps/AMICI/" >> $GITHUB_ENV

# sonar cloud
- run: echo "SONAR_SCANNER_VERSION=4.6.1.2450" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_HOME=/root/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -57,7 +60,8 @@ jobs:
- name: Install parPE Python deps
run: |
pip install -r ${PARPE_BASE}/python/requirements.txt
pip install -r ${PARPE_BASE}/python/requirements.txt \
&& sudo apt install lcov
- name: "Install parPE deps: fides"
run: |
Expand Down Expand Up @@ -103,22 +107,26 @@ jobs:
- name: Cache sonar files
id: cache-sonar
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: sonar_cache
key: ${{ runner.os }}-sonar_cache

- name: Run sonar-scanner
if: ${{ env.SONAR_TOKEN != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_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 example notebooks
run: |
misc/run_notebook.sh examples/parpeamici/steadystate/parpeExampleSteadystateBasic.ipynb examples/parpeamici/steadystate/parpeExampleSteadystateHierarchical.ipynb
misc/run_notebook.sh \
examples/parpeamici/steadystate/parpeExampleSteadystateBasic.ipynb \
examples/parpeamici/steadystate/parpeExampleSteadystateHierarchical.ipynb
- name: Run valgrind
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/petab_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
name: PEtab test suite
steps:
- uses: actions/checkout@master
- name: chown checkout directory
# https://github.com/actions/runner/issues/2033
run: chown -R $(id -u):$(id -g) $PWD

- run: echo "PARPE_BASE=$(pwd)" >> $GITHUB_ENV
- run: echo "PARPE_BUILD=${PARPE_BASE}/build" >> $GITHUB_ENV
Expand Down
9 changes: 6 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ sphinx:
# - pdf

python:
version: 3.8
install:
- requirements: doc/requirements_doc.txt

build:
image: latest
os: "ubuntu-22.04"
# apt_packages:
# - libatlas-base-dev
# - swig
tools:
python: "3.11"
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.13) # pkg_search_module GLOBAL
cmake_policy(VERSION 3.13)
cmake_minimum_required(VERSION 3.15) # pkg_search_module GLOBAL
cmake_policy(VERSION 3.15...3.28)

if(POLICY CMP0074)
# Use package_ROOT environment variables
Expand Down
1 change: 1 addition & 0 deletions container/charliecloud/parpe_base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ apt-get install -q -y \
libomp-dev \
nano \
python3-dev \
python3-numpy \
python3-pip \
python3-venv \
libspdlog-dev \
Expand Down
4 changes: 2 additions & 2 deletions container/charliecloud/parpe_base/install_parpe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_PYTHON=ON \
-DBUILD_TESTS=OFF \
.. && make -j12
.. && make -j

# install fides optimizer
cd "$PARPE_BASE/ThirdParty" && ./installFides.sh
Expand Down Expand Up @@ -55,7 +55,7 @@ CC=mpicc CXX=mpiCC cmake \
-DTESTS_MPIEXEC_COMMAND="$mpi_cmd" \
..

make -j12 VERBOSE=1
make -j VERBOSE=1

# MPI settings for python tests
export PARPE_TESTS_MPIEXEC="mpiexec -n 5 --oversubscribe --allow-run-as-root --mca btl_vader_single_copy_mechanism none --mca btl ^openib --mca oob_tcp_if_include lo --mca btl_tcp_if_include lo --mca orte_base_help_aggregate 0"
Expand Down
105 changes: 11 additions & 94 deletions deps/AMICI/.clang-format
Original file line number Diff line number Diff line change
@@ -1,96 +1,13 @@
---
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
...

AlignAfterOpenBracket: BlockIndent
BreakBeforeBinaryOperators: All
BreakConstructorInitializers: BeforeComma
ColumnLimit: 80
PointerAlignment: Left
QualifierAlignment: Custom
QualifierOrder: ['inline', 'static', 'type', 'const']
ReferenceAlignment: Left
1 change: 0 additions & 1 deletion deps/AMICI/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ exclude_lines =
raise
except:
import

4 changes: 4 additions & 0 deletions deps/AMICI/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# default owners
* @AMICI-dev/amici-maintainers
16 changes: 16 additions & 0 deletions deps/AMICI/.github/actions/install-apt-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Install apt dependencies
description: Install apt dependencies for the AMICI Python package
runs:
using: "composite"
steps:
- run: |
sudo apt-get update \
&& sudo apt-get install -y \
g++ \
libatlas-base-dev \
libboost-chrono-dev \
libboost-math-dev \
libboost-serialization-dev \
libhdf5-serial-dev \
swig
shell: bash
44 changes: 44 additions & 0 deletions deps/AMICI/.github/actions/setup-amici-cpp/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Set up AMICI C++
description: |
Build the AMICI C++ interface and set things for for coverage analysis.
(Currently ubuntu-only).
runs:
using: "composite"
steps:
# BioNetGen Path
- run: echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
shell: bash

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

# enable coverage
- run: echo "ENABLE_GCOV_COVERAGE=TRUE" >> $GITHUB_ENV
shell: bash

- name: Set up Sonar tools
uses: ./.github/actions/setup-sonar-tools

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

- name: Install additional apt dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y \
cmake \
python3-venv \
lcov
shell: bash

- name: Build AMICI dependencies
run: scripts/buildDependencies.sh
shell: bash

- name: Build AMICI
run: scripts/buildAmici.sh
shell: bash
env:
CI_SONARCLOUD: "TRUE"
20 changes: 20 additions & 0 deletions deps/AMICI/.github/actions/setup-doxygen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set up doxygen
description: |
Download, build, and install doxygen.
runs:
using: "composite"
steps:
- name: Install apt dependencies for doxygen
run: |
sudo apt-get update \
&& sudo apt-get install -y \
bison \
ragel \
graphviz \
texlive-latex-extra
shell: bash

- name: Download and build doxygen
run: sudo scripts/downloadAndBuildDoxygen.sh
shell: bash
26 changes: 26 additions & 0 deletions deps/AMICI/.github/actions/setup-sonar-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Set up Sonar tools
description: Download and install sonar-scanner and build-wrapper
runs:
using: "composite"
steps:
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
shell: bash
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
shell: bash
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
shell: bash
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
shell: bash
- run: echo "${HOME}/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
shell: bash

- name: Install sonarcloud tools
run: |
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/ \
&& curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \
https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip \
&& unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ \
shell: bash
20 changes: 20 additions & 0 deletions deps/AMICI/.github/actions/setup-swig/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set up SWIG
description: |
Download and build SWIG and set the SWIG environment variable to the path of
the SWIG executable.
inputs:
swig_version:
description: 'Swig version to build'
required: false
default: '4.1.1'

runs:
using: "composite"
steps:
- name: Download and build SWIG
run: scripts/downloadAndBuildSwig.sh
shell: bash

- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-${{ inputs.swig_version }}/install/bin/swig" >> $GITHUB_ENV
shell: bash
Loading

0 comments on commit 2803ff3

Please sign in to comment.