Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.11.11 #1363

Merged
merged 15 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test_sbml_semantic_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- .github/workflows/test_sbml_semantic_test_suite.yml
- python/amici/ode_export.py
- python/amici/sbml_import.py
- python/amici/import_utils.py
- scripts/run-SBMLTestsuite.sh
- tests/testSBMLSuite.py
check_suite:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Windows Tests
on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: Tests Windows

runs-on: windows-2019

env:
AMICI_SKIP_CMAKE_TESTS: "TRUE"
openBLAS_version: "0.3.12"

steps:
- uses: actions/checkout@master
- run: git fetch --prune --unshallow

- shell: bash
run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
- shell: bash
run: echo "C:\\BLAS\\bin" >> $GITHUB_PATH
- shell: bash
run: echo "BLAS_LIBS=/LIBPATH:C:/BLAS/lib openblas.lib" >> $GITHUB_ENV
- shell: bash
run: echo "BLAS_CFLAGS=-IC:/BLAS/OpenBLAS-${openBLAS_version}/OpenBLAS-${openBLAS_version}" >> $GITHUB_ENV

# Developer Command Prompt for Microsoft Visual C++
- uses: ilammy/msvc-dev-cmd@v1

- name: Install deps
shell: bash
run: |
python -m pip install --upgrade pip \
&& pip install pytest petab \
&& choco install -y ninja \
&& choco install -y swig --version=4.0.1

- name: Install OpenBLAS
shell: powershell
run: scripts/installOpenBLAS

- name: Create sdist
working-directory: python/sdist
run: python setup.py sdist

- name: Install sdist
working-directory: python/sdist
shell: bash
run: pip install -v $(ls -t dist/amici-*.tar.gz | head -1)

- name: Run Python tests
run: python -m pytest --ignore-glob=*petab* --ignore-glob=*special* python/tests
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ python/examples/example_presimulation/model_presimulation/*
python/examples/example_presimulation/model_presimulation_re/*
python/examples/example_constant_species/model_constant_species_reduced/*
python/examples/example_constant_species/model_constant_species/*
python/tests/sbml_test_models/*

python/sdist/amici.egg-info/*
python/sdist/amici/version.txt
Expand Down Expand Up @@ -191,3 +192,4 @@ tests/performance/CS_Signalling_ERBB_RAS_AKT_petab/*
coverage_SBMLSuite.xml
Benchmark-Models-PEtab/


50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions ThirdParty/sundials/src/cvodes/cvodea.c
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,9 @@ static int CVAdataStore(CVodeMem cv_mem, CkpntMem ck_mem)
/* Run CVode to set following structures in dt_mem[i] */
i = 1;
do {
// Modified for AMICI
// (dt_mem has dimension ca_mem->ca_nsteps)
if (i > ca_mem->ca_nsteps) return(CV_FWD_FAIL);

flag = CVode(cv_mem, ck_mem->ck_t1, ca_mem->ca_ytmp, &t, CV_ONE_STEP);
if (flag < 0) return(CV_FWD_FAIL);
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:19.10
FROM ubuntu:20.04

RUN apt update \
&& apt-get install -y \
Expand Down
3 changes: 1 addition & 2 deletions documentation/python_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ AMICI can import :term:`SBML` models via the
Status of SBML support in Python-AMICI
++++++++++++++++++++++++++++++++++++++

Python-AMICI currently **passes 850 out of the 1780 (~48%) test cases** from
Python-AMICI currently **passes 862 out of the 1780 (~48%) test cases** from
the semantic
`SBML Test Suite <https://github.com/sbmlteam/sbml-test-suite/>`_
(`current status <https://github.com/AMICI-dev/AMICI/actions>`_).
Expand All @@ -35,7 +35,6 @@ In addition, we currently plan to add support for the following features

- Events (currently Matlab-only)
- Algebraic rules
- Models without species

contributions are welcome.

Expand Down
1 change: 1 addition & 0 deletions documentation/python_modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ AMICI Python API
amici.petab_import
amici.petab_import_pysb
amici.petab_objective
amici.import_utils
amici.ode_export
amici.plotting
amici.pandas
Expand Down
2 changes: 1 addition & 1 deletion documentation/rtd_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sphinx-autodoc-typehints>=1.10.3
git+https://github.com/readthedocs/sphinx-hoverxref@master
prompt-toolkit<=3.0.0
ipython>=7.17.0
breathe>=4.20.0
breathe==4.24.1
#exhale>=0.2.3
git+https://github.com/dweindl/exhale@ea77a313777c1382a7830ce9ee6c405ce47f5f3b#egg=exhale
# Newer versions cause trouble with including notebooks:
Expand Down
6 changes: 3 additions & 3 deletions include/amici/abstract_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ class AbstractModel {
virtual void fdJydy(realtype *dJydy, int iy, const realtype *p,
const realtype *k, const realtype *y,
const realtype *sigmay, const realtype *my);

/**
* @brief Model-specific implementation of fdJydy colptrs
* @param dJydy sparse matrix to which colptrs will be written
Expand Down Expand Up @@ -800,15 +800,15 @@ class AbstractModel {
* @param dwdx sparse matrix to which rowvals will be written
*/
virtual void fdwdx_rowvals(SUNMatrixWrapper &dwdx);

/**
* @brief Model specific implementation of fdwdw, no w chainrule (Py)
* @param dwdw partial derivative w wrt w
* @param t timepoint
* @param x Vector with the states
* @param p parameter vector
* @param k constants vector
* @param h heavyside vector
* @param h Heaviside vector
* @param w vector with helper variables
* @param tcl Total abundances for conservation laws
*/
Expand Down
2 changes: 1 addition & 1 deletion include/amici/edata.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class ExpData {
* @brief set function that copies observed data for specific observable
*
* @param observedData observed data (dimension: nt)
* @param iy oberved data index
* @param iy observed data index
*/
void setObservedData(const std::vector<realtype> &observedData, int iy);

Expand Down
2 changes: 1 addition & 1 deletion include/amici/hdf5.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void createAndWriteDouble3DDataset(H5::H5File const &file,
/**
* @brief Read scalar native double attribute from HDF5 object.
* @param file HDF5 file
* @param optionsObject Object to read attribute frin
* @param optionsObject Object to read attribute from
* @param attributeName Name of attribute to read
* @return Attribute value
*/
Expand Down
24 changes: 12 additions & 12 deletions include/amici/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Model : public AbstractModel {
using AbstractModel::fx0_fixedParameters;
using AbstractModel::fy;
using AbstractModel::fz;

/**
* @brief Initialize model properties.
* @param x Reference to state variables
Expand Down Expand Up @@ -597,7 +597,7 @@ class Model : public AbstractModel {
* @return Observable IDs
*/
virtual std::vector<std::string> getObservableIds() const;

/**
* @brief Checks whether the defined noise model is gaussian, i.e., the nllh is quadratic
* @return boolean flag
Expand Down Expand Up @@ -1298,13 +1298,13 @@ class Model : public AbstractModel {

/** Flag indicating Matlab- or Python-based model generation */
bool pythonGenerated;

/**
* @brief getter for dxdotdp (matlab generated)
* @return dxdotdp
*/
const AmiVectorArray &get_dxdotdp() const;

/**
* @brief getter for dxdotdp (python generated)
* @return dxdotdp
Expand Down Expand Up @@ -1642,7 +1642,7 @@ class Model : public AbstractModel {
* @param x Array with the states
*/
void fdwdx(realtype t, const realtype *x);

/**
* @brief Compute self derivative for recurring terms in xdot.
* @param t Timepoint
Expand Down Expand Up @@ -1736,7 +1736,7 @@ class Model : public AbstractModel {
* @return State vector with negative values replaced by `0` according to
* stateIsNonNegative
*/
N_Vector computeX_pos(const_N_Vector x);
const_N_Vector computeX_pos(const_N_Vector x);

/** All variables necessary for function evaluation */
ModelState state_;
Expand All @@ -1752,13 +1752,13 @@ class Model : public AbstractModel {

/** Sparse dwdx temporary storage (dimension: `ndwdx`) */
mutable SUNMatrixWrapper dwdx_;

/** Sparse dwdp temporary storage (dimension: `ndwdp`) */
mutable SUNMatrixWrapper dwdp_;

/** Dense Mass matrix (dimension: `nx_solver` x `nx_solver`) */
mutable SUNMatrixWrapper M_;

/**
* Temporary storage of `dxdotdp_full` data across functions (Python only)
* (dimension: `nplist` x `nx_solver`, nnz: dynamic,
Expand All @@ -1780,7 +1780,7 @@ class Model : public AbstractModel {
* type `CSC_MAT`)
*/
mutable SUNMatrixWrapper dxdotdp_implicit;

/**
* Temporary storage of `dxdotdx_explicit` data across functions (Python only)
* (dimension: `nplist` x `nx_solver`, nnz: 'nxdotdotdx_explicit',
Expand Down Expand Up @@ -2005,10 +2005,10 @@ class Model : public AbstractModel {

/** Sparse dwdw temporary storage (dimension: `ndwdw`) */
mutable SUNMatrixWrapper dwdw_;

/** Sparse dwdx implicit temporary storage (dimension: `ndwdx`) */
mutable std::vector<SUNMatrixWrapper> dwdx_hierarchical_;

/** Recursion */
int w_recursion_depth_ {0};
};
Expand Down
Loading