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.19.0 #2164

Merged
merged 26 commits into from
Aug 26, 2023
Merged

Release 0.19.0 #2164

merged 26 commits into from
Aug 26, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Aug 24, 2023

dweindl and others added 20 commits June 26, 2023 15:12
Adds support for SBML's `rateOf(.)` for most not-so-exotic cases.

We currently can't check for functions with `<csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/rateOf">`, and only check for functions named `rateOf`. This should be safe as long as we use the `SBMLFunctionDefinitionConverter` before. 

Tested in the following SBML semantic test suite cases: 01248,01249,01250,01251,01252,01253,01254,01255,01256,01257,01258,01259,01260,01261,01262,01263,01264,01265,01266,01267,01268,01269,01270,01293,01294,01295,01296,01297,01298,01299,01321,01322,01400,01401,01402,01403,01405,01406,01408,01409,01455,01456,01457,01458,01459,01460,01461,01462,01463,01482,01483,01525,01526,01527,01528,01529,01540,01541,01542,01543

Closes #769
Required for tellurium (via roadrunner)
Fixes `Jupyter command \`jupyter-nbconvert\` not found.`
* add SteadyStateComputationMode

* fix namig

* add steadystate_computation_mode_ to model

* fix steadystate_sensitivity_mode default

* fix

* correct processPreEquilibration comment

* correct x_ss and sx_ss description

* clangformat

* Update model settings

* enum

* serialization

* ..

* update docstrings in test_preequilibration

* add SteadyStateComputationMode test

* test that results with different steady-state computation modes are close

* add compatibility check for SteadyStateComputationMode

* split assertions and use numpy.testing.assert_allclose

* change 'assert np.isclose' to 'assert_allclose' in all test_preequilibration tests

* fix default values in test_swig_interface

* nbconvert

* fix example_errors notebook

* nbconvert

* --

---------

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
Co-authored-by: Daniel Weindl <daniel.weindl@helmholtz-muenchen.de>
Allows selecting parameters whose values are to be hard-coded (#1192).

So far, restricted to parameters that aren't targets of rule or initial assignments. 
This can be extended later: lifting those restrictions on parameters, allow hard-coding Species with constant=True, ...
* Wrapper for importing antimony models, this will allow for more concise test cases in the future
* Remove tellurium dependency, use libantimony directly (so we don't need ncurses and other deps)
* Add antimony example
…ters that are initial assignment targets (#2145)

I.e. given the current way of processing initial assignments, events have to be processed first. Otherwise model compilation fails with `use of undeclared identifier`, because the respective parameter was replaced by its initial assignment value.
Add AMICI_TRY_ENABLE_HDF5 environment variable to disable trying to build with HDF5 support if HDF5 is found.

Related to #2144
`/LIBPATH` doesn't seem to be compatible with ninja. See #2151.
Remove unused includes. Leftovers from the early beginnings, it seems ...

In particular, don't use unistd.h for Windows-compatibility #2151
…assignments (#2156)

Currently it is incorrectly assumed that the initial value of an event-assigned parameter
is (convertible to) a float. Therefore, SBML import fails if the initial assignment
contains a symbolic expression that can't be floatified.

Fixes #2149.
* Use NEW version for any policy introduced up until 3.27. (Closes #2158)
* Error on CMake dev warnings on GHA
We are unnecessarily building the complex / complex long versions of KLU.
This PR removes them to speed up AMICI installation.

We are still building both the int32_t and int64_t version of SuiteSparse,
which leaves room for further optimization...
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #2164 (8c80329) into master (a12d173) will increase coverage by 22.25%.
The diff coverage is 95.68%.

❗ Current head 8c80329 differs from pull request most recent head 0bf6216. Consider uploading reports for the commit 0bf6216 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2164       +/-   ##
===========================================
+ Coverage   54.38%   76.64%   +22.25%     
===========================================
  Files          33       82       +49     
  Lines        5518    14939     +9421     
===========================================
+ Hits         3001    11450     +8449     
- Misses       2517     3489      +972     
Flag Coverage Δ
cpp 73.51% <80.95%> (?)
petab 54.23% <58.94%> (-0.16%) ⬇️
python 77.29% <97.89%> (?)
sbmlsuite ∅ <ø> (∅)

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

Files Changed Coverage Δ
include/amici/model.h 61.11% <ø> (ø)
include/amici/rdata.h 95.23% <ø> (ø)
src/rdata.cpp 94.23% <ø> (ø)
src/hdf5.cpp 89.68% <33.33%> (ø)
src/steadystateproblem.cpp 86.34% <81.81%> (ø)
python/sdist/amici/antimony_import.py 94.11% <94.11%> (ø)
include/amici/misc.h 64.00% <100.00%> (ø)
python/sdist/amici/de_export.py 91.74% <100.00%> (+12.11%) ⬆️
python/sdist/amici/import_utils.py 87.95% <100.00%> (+33.73%) ⬆️
python/sdist/amici/petab_util.py 89.65% <100.00%> (ø)
... and 3 more

... and 54 files with indirect coverage changes

Previously, the sundials cmake configuration wasn't found on systems that use lib64/ instead of lib/

Closes #2143
@dweindl dweindl force-pushed the release_0.19.0 branch 2 times, most recently from 262c6a8 to 3ba4ad9 Compare August 24, 2023 16:29
* CMake: fix scope for -DHAS_BOOST_CHRONO (private -> public)
  
  Fixes the issue of potentially mixing boost and non-boost versions of CpuTimer.

* CpuTimer unit test

* simplify CpuTimer

* document issues with compile definitions from dependencies

* Add `amici.CpuTimer.uses_thread_clock` to check at runtime whether we are using `thread_clock`
Combine code for sparse model functions and their index files, i.e. generate only a single file instead of 3 individual files for content, rowvals, and colptrs, respectively.

Advantage: Faster import of smaller models and fewer files. For a toy model, this reduced the build steps from 44 to 28, and reduced build time by >20% on my computer.

Disadvantage: None found, so I don't think it worth adding an option for (not) combining those files. For larger models, there shouldn't be any impact. The extra time for compiling the index arrays should be negligible compared to computing the contents.

Related to #2119


Here a test for a large model (N=1):

| File         | Size    | Compilation time (s) |
|--------------|--------:|---------------------:|
| dwdx         | 22.4MiB |              3413.64 |
| dwdx_colptrs |  2.0KiB |                 2.79 |
| dwdx_rowvals | 65.6KiB |                 2.66 |
| *combined*   |         |              3416.79 |

I'd consider this time increase negligible.
@dweindl dweindl marked this pull request as ready for review August 25, 2023 07:53
@dweindl dweindl requested a review from a team as a code owner August 25, 2023 07:53
@dweindl
Copy link
Member Author

dweindl commented Aug 25, 2023

Valgrind failures come from a libsbml issue. Not going to add a suppression, as it was fixed upstream already, just waiting for the next release.

@socket-security
Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Issue Package Version Note Source
Potential typo squat pysb

Next steps

What is a potential typo squat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore pysb@*

* CI: Update sonar-scanner

* Fix: `The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.`

* Remove sonar cache config and GHA cache action

By now, cache is stored on the server by default

see https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-cache

* Sonar token to secrets
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@dweindl dweindl merged commit 7d161a6 into master Aug 26, 2023
@dweindl dweindl deleted the release_0.19.0 branch August 26, 2023 06:02
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