Skip to content

Release 0.16.0 - #1956

Merged
dweindl merged 24 commits into
masterfrom
release_0.16.0
Jan 25, 2023
Merged

Release 0.16.0#1956
dweindl merged 24 commits into
masterfrom
release_0.16.0

Conversation

@dweindl

@dweindl dweindl commented Jan 24, 2023

Copy link
Copy Markdown
Member

No description provided.

dweindl and others added 20 commits January 11, 2023 19:44
More informative `__repr__` for `CvodeSolver`, `IDASolver`, and `SolverPtr`.

Closes #1926

Output of `print(amici.CVodeSolver())`:

```
<Swig Object of type 'amici::CVodeSolver *' at 0x7f988f70f090
  reporting_mode: <RDataReporting.full: 0>
  sens_meth: <SensitivityMethod.forward: 1>
  sens_order: <SensitivityOrder.none: 0>
  sens_meth_preeq: <SensitivityMethod.forward: 1>
  maxsteps: 10000
  maxtime: 1.7976931348623157e+308s
  abs_tol: 1e-16
  rel_tol: 1e-08
  abs_tol_b: 1e-16
  rel_tol_b: 1e-08
  abs_tol_fsa: 1e-16
  rel_tol_fsa: 1e-08
  abs_tol_quad: 1e-12
  rel_tol_quad: 1e-08
  abs_tol_ss: 1e-14
  rel_tol_ss: 1e-06
  abs_tol_sss: 1e-14
  rel_tol_sss: 1e-06
  int_sens_meth: <InternalSensitivityMethod.simultaneous: 1>
  int_type: <InterpolationType.hermite: 1>
  linsol: <LinearSolver.KLU: 9>
  lmm: <LinearMultistepMethod.BDF: 2>
  newton_damp_mode: <NewtonDampingFactorMode.on: 1>
  newton_damp_lb: 1e-08
  newton_maxsteps: 0
  newton_ss_check: False
  sens_ss_check: True
  interpolation_type: <InterpolationType.hermite: 1>
  ism: <InternalSensitivityMethod.simultaneous: 1>
  nlsol_iter: <NonlinearSolverIteration.newton: 2>
  stability_limit: True
  state_ordering: 0
>
```
This makes it more convenient to create a new (unmodified) model instance, or to find out where the model files are located.

Also adds a snake_case version of `getModel`.
* Skip irrelevant frames in stacktraces

* Add optional startlevel for stacktrace
* Fix maxLevel, which should be interpreted relative to the startlevel

Co-authored-by: Fabian Fröhlich <fabian@schaluck.com>
Use apt, which wasn't possible back then...
* move .binder/ to binder/, as jupyter lab won't allow us accessing hidden directories by default
* add landing page for easier access of different notebooks [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/AMICI-dev/AMICI/binder_landing?labpath=binder%2Foverview.ipynb)
* binder link to readme / doc
* log all nested execution times as debug

* set logging for performance test to debug
after #1939, we can simply install it via rtd_requirements.txt
Fixes:
```
[~] /home/runner/work/AMICI/AMICI/include/amici/edata.h:118: warning: Member operator==(const ExpData &lhs, const ExpData &rhs) (friend) of class amici::ExpData is not documented.
[~] /home/runner/work/AMICI/AMICI/include/amici/forwardproblem.h:295: warning: amici::ForwardProblem::applyEventBolus has @PARAM documentation sections but no arguments
[~] /home/runner/work/AMICI/AMICI/include/amici/steadystateproblem.h:188: warning: argument 'newtonSolver' of command @PARAM is not found in the argument list of amici::SteadystateProblem::computeSteadyStateQuadrature(const Solver &solver, Model &model)
[~] /home/runner/work/AMICI/AMICI/include/amici/amici.h:47: warning: argument 'return_code' of command @PARAM is not found in the argument list of amici::simulation_status_to_str(int status)
[~] /home/runner/work/AMICI/AMICI/include/amici/amici.h:47: warning: The following parameter of amici::simulation_status_to_str(int status) is not documented:
[~]   parameter 'status'
```
- https://github.com/AMICI-dev/AMICI/actions/runs/3978146452/jobs/6819757866

+clang-format
Fixes `warning: comparison of integer expressions of different signedness`
* add edata __repr__ fixes #1941

* add test

* improve tests

* fix

* fix test

* added __repr__ to SwigPtrView

* fix counts

* add info from SimulationParameters

* fixup

* Update python/sdist/amici/numpy.py

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* GHA: Run tests on Python3.11
* Fixes related to Python3.11 changes to enums (https://docs.python.org/3/whatsnew/3.11.html#enum)
* Fix unreliable string `is` comparison
@codecov

codecov Bot commented Jan 24, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1956 (e03ff7d) into master (0859bde) will increase coverage by 0.01%.
The diff coverage is 74.19%.

❗ Current head e03ff7d differs from pull request most recent head 3aa4579. Consider uploading reports for the commit 3aa4579 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1956      +/-   ##
==========================================
+ Coverage   75.96%   75.98%   +0.01%     
==========================================
  Files          76       76              
  Lines       12967    12982      +15     
==========================================
+ Hits         9851     9864      +13     
- Misses       3116     3118       +2     
Flag Coverage Δ
cpp 73.15% <87.50%> (+0.07%) ⬆️
petab 59.69% <50.00%> (-0.05%) ⬇️
python 68.96% <45.45%> (-0.11%) ⬇️
sbmlsuite ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/amici/edata.h 0.00% <ø> (ø)
include/amici/steadystateproblem.h 100.00% <ø> (ø)
python/sdist/amici/__init__.py 95.55% <ø> (ø)
python/sdist/amici/ode_export.py 91.74% <ø> (ø)
python/sdist/amici/plotting.py 0.00% <0.00%> (ø)
python/sdist/amici/swig.py 31.14% <0.00%> (-1.06%) ⬇️
src/amici.cpp 75.80% <ø> (+4.03%) ⬆️
src/exception.cpp 74.28% <70.58%> (-1.39%) ⬇️
python/sdist/amici/numpy.py 81.72% <80.00%> (-0.31%) ⬇️
include/amici/forwardproblem.h 100.00% <100.00%> (ø)
... and 12 more

dweindl and others added 4 commits January 25, 2023 11:55
Initial states should always be checked for finite values, not only with `Model.setAlwaysCheckFinite(True)`. As this only happens once per simulation, the overhead is negligible.

Closes #1952
Notebook demonstrating common simulation failures and show how to analyze / fix them.

Co-authored-by: Fabian Fröhlich <fabian@schaluck.com>
@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@FFroehlich FFroehlich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 is this really a minor release? To me this primarily looks like fixes and documentation updates, no?

@dweindl

dweindl commented Jan 25, 2023

Copy link
Copy Markdown
Member Author

is this really a minor release? To me this primarily looks like fixes and documentation updates, no?

Define "fix", define "new functionality". 🤷‍♂️
There are a number of changes that are not bug fixes. (For example, I wouldn't consider the default swig-__repr__s a bug.)

@dweindl
dweindl merged commit ed36b2d into master Jan 25, 2023
@dweindl
dweindl deleted the release_0.16.0 branch January 25, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants