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.27.0 #2554

Merged
merged 28 commits into from
Oct 21, 2024
Merged

Release 0.27.0 #2554

merged 28 commits into from
Oct 21, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Oct 19, 2024

No description provided.

dweindl and others added 21 commits October 7, 2024 11:35
We've been lagging behind SUNDIALS development. This updates the SUNDIALS library from v5.8.0 to [v7.1.1](https://sundials.readthedocs.io/en/latest/Changelog_link.html#changes-to-sundials-in-release-7-1-1).

Note:
* This includes the post-7.1.1 changes to `cmake/tpl/FindKLU.cmake` from LLNL/sundials#582
* This includes the post-7.1.1 changes to [`sundials/src/sunmatrix/sparse/sunmatrix_sparse.c:SUNMatScaleAddI_Sparse`](https://github.com/LLNL/sundials/blob/736369d543cb80956b1ba87377ffc0c8cf6b342b/src/sunmatrix/sparse/sunmatrix_sparse.c#L625C1-L694C2) from  LLNL/sundials#584, fixing LLNL/sundials#581

The majority of changes inside amici are related to the introduction of [SUNContext](https://sundials.readthedocs.io/en/latest/sundials/SUNContext_link.html#the-suncontext-type), which is required for the construction of all SUNDIALS objects. Other trivial changes are related to renamed types and macros.

Furthermore, the error handling strategy has changed. As a consequence, simulation error messages will look slightly different.

Closes AMICI-dev#1565
…v#2530)

pscale was set on moved-from object simulation_parameters instead of simulation_parameters_
Some dependency lifted there sphinx<8 requirement, but this leads to a number of issues with other dependencies. Therefore, require sphinx<8 for now.

Anyways fix some upcoming issue with sphinx 8 when doc2path will return something path-like (see ICB-DCM/pyPESTO#1482).
* We still need to create an NVector, even if it's empty.
* Don't pass nullptr as sunctx

Issue introduced in AMICI-dev#2513. 

Closes AMICI-dev#2534.
Make sure the printed test IDs correspond to actual test IDs, so they can be copy/pasted to rerun.
Previously this was not the case when running with pytest-xdist.
…ck output (AMICI-dev#2524)

* Make the result more informative and more readable.
* Re-enable some test problems, use stricter tolerances for some at least (AMICI-dev#2511) 
* More problem-specific settings
Extract some neutral changes from AMICI-dev#1539 to reduce the diff there and avoid conflicts.
…dev#2533)

Move `Model::state_` initalization to `ModelState` ctor where it belongs.

Closes AMICI-dev#2531.
... and remove some unnecessary stuff.
We need to remove the default error handler, otherwise sundials error message will be printed twice.
* Remove unnecessary includes
* Reduce public linking interface
* We don't need to find SuiteSparse - sundials takes care of that
* Fixes some issues when consuming the amici-exported CMake config 
* Set CMAKE_PREFIX_PATH when configuring models
* Install system-wide libsuitesparse-dev to make sure it doesn't interfere with our vendored version
Previous branch no longer exists. Now on master (pysb/pysb@8be8263).
Since AMICI-dev@b7a3e91, if dxdt was a sympy.Heaviside, it wasn't correctly processed, because only its arguments were checked. That means, root-finding would not be enabled for this discontinuity.

This would happen if a Rule or KineticLaw is a plain Piecewise function (not embedded inside a more complex expression).

Fixes AMICI-dev#2545.

The bug was exposed only after the previous release, this did not affect any former amici releases.
Disable SUNDIALS's warning-handling through `SUNLogger`. Instead pipe everything both errors and warnings through the provided`SUNErrHandlerFn`.

For details, see AMICI-dev#2550.

Fixes AMICI-dev#2550.

This also corrects the error message formatting - file path and line numbers for debug builds, but omitted in release builds - which was inverted before.
* update jax notebook

* Apply suggestions from code review

Co-authored-by: Daniel Weindl <[email protected]>

---------

Co-authored-by: Daniel Weindl <[email protected]>
Copy link

socket-security bot commented Oct 19, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
pypi/[email protected] environment, eval, filesystem, network, shell, unsafe +46 69.5 MB AA-Turner, tk0miya

🚮 Removed packages: pypi/[email protected]

View full report↗︎

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 77.93%. Comparing base (e89a1de) to head (8e9f93a).
Report is 29 commits behind head on master.

Files with missing lines Patch % Lines
...rty/sundials/include/sundials/sundials_context.hpp 61.53% 4 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2554      +/-   ##
==========================================
+ Coverage   77.75%   77.93%   +0.18%     
==========================================
  Files         323      325       +2     
  Lines       20915    21858     +943     
  Branches     1446     1473      +27     
==========================================
+ Hits        16262    17035     +773     
- Misses       4650     4796     +146     
- Partials        3       27      +24     
Flag Coverage Δ
cpp 76.35% <64.28%> (+2.86%) ⬆️
cpp_python 34.20% <64.28%> (+0.06%) ⬆️
petab 37.07% <75.00%> (+0.41%) ⬆️
python 72.59% <75.00%> (+0.27%) ⬆️

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

Files with missing lines Coverage Δ
...ndials/include/sundials/sundials_convertibleto.hpp 100.00% <100.00%> (ø)
include/amici/abstract_model.h 100.00% <ø> (ø)
include/amici/forwardproblem.h 100.00% <ø> (ø)
include/amici/logging.h 83.33% <ø> (ø)
include/amici/misc.h 80.00% <ø> (+0.40%) ⬆️
include/amici/model_dae.h 75.00% <ø> (+2.27%) ⬆️
include/amici/model_ode.h 100.00% <ø> (ø)
include/amici/model_state.h 78.44% <ø> (-21.56%) ⬇️
include/amici/rdata.h 100.00% <ø> (ø)
include/amici/serialization.h 96.83% <ø> (+0.02%) ⬆️
... and 25 more

... and 63 files with indirect coverage changes

* add 3.13 to test matrix

* remove py3.9 leftover
dweindl and others added 4 commits October 19, 2024 21:34
Until all dependencies work with Python3.13. pyarrow wheels are still missing.
…#2556)

Fixes a dangling pointer issue in SolverTest.SettersGettersWithSetup.
The SUNContext was destroyed before the associated AmiVectors which resulted in invalid reads.
Fixes a bug that lead to program termination if a root-after-reinitialization error (potentially also others) occurred at an output timepoint, because an non-existing/invalid SimulationState for that timepoint was accessed. See AMICI-dev#2491 for further details.

Fixes AMICI-dev#2491.

Also avoid some unnecessary copying (during which previously the segfault occurred if this bug triggered in non-debug builds).
@dweindl dweindl marked this pull request as ready for review October 20, 2024 10:17
@dweindl dweindl requested a review from a team as a code owner October 20, 2024 10:17
* BarthelKun2024

* ArmisteadHoe2024
@dweindl dweindl merged commit 638c3ee into AMICI-dev:master Oct 21, 2024
32 of 34 checks passed
@dweindl dweindl deleted the release_0.27.0 branch October 21, 2024 09:51
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.

3 participants