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.20.0 #2210

Merged
merged 24 commits into from
Nov 21, 2023
Merged

Release 0.20.0 #2210

merged 24 commits into from
Nov 21, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Nov 21, 2023

No description provided.

dweindl and others added 24 commits September 20, 2023 10:57
…2168)

This was ignored since switching to CMake-based builds.
Now it works again. The value of `compiler` is forwarded
to the `CXX` environment variable when CMake is invoked.

Fixes #2140
Relevant changes are only in .pre-commit-config.yaml

* run black on notebooks via pre-commit
* set proper line width (pyproject.toml is not used if we are running things from the repo root)
* compatible line width for black + isort
* fix json error in binder/overview.ipynb
* re-blacken everything
New title + some minor updates

Closes #1990

Mark notebook to always execute it under nbsphinx
Fixes
```
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
```
When preequilibration (or finding a steadystate in general) fails,
`SteadystateProblem::handleSteadyStateFailure` produced
`AMICI simulation failed: Steady state computation failed. First run of Newton solver failed. Simulation to steady state failed: No convergence was achieved. Second run of Newton solver failed.`,
even in cases where no Newton solve or no simulation was attempted.
This is confusing and is changed here, so that the message now reflects what has actually happened.

Closes #2178
…2152)

Adds functions `amici.numpy.evaluate` and `amici.plotting.plot_expressions` to evaluate or directly plot symbolic expressions of model quantities, respectively.

Demo: see end of this section https://amici--2152.org.readthedocs.build/en/2152/ExampleSteadystate.html#Plotting-trajectories
We had to require setuptools<64 because it change its temporary build directory from a known path to a randomly named temporary directory. However, setuptools<64 doesn't work with for Python3.12 (#2179). Therefore, this adds an option to change the setuptools temporary build directory via the `AMICI_BUILD_TEMP` environment variable, so we have those temp files in a known path for coverage analysis. Not meant to be used by users.
ExpDataView provides convenient access to measurements and the like as numpy
arrays. However, accessing the associated timepoints is currently only
possible via `ExpDataView(...)._swigptr.ts_` which returns an
amici.amici.DoubleVector. That's awkward.

Now:

```python
amici.ExpDataView(amici.ExpData(1, 2, 3, [4, 5, 6])).ts
Out[3]: array([4., 5., 6.])
```

Resolves #2191
Previously:

```
<ReturnDataView(<amici.amici.ReturnData; proxy of <Swig Object of type 'amici::ReturnData *' at 0x7f794a9ef8d0> >)>
```

Now:

```
<ReturnDataView(id='ctrl+basal_preeq', status=AMICI_SUCCESS)>
```
Wasn't automatically handled by swig for unclear reasons. Works now. Fixes #2190.
Fixes a bug in `SwigPtrView.__deepcopy__` which did not produce a deep copy.

Add `SwigPtrView.__eq__` to allow for comparison. The view objects are considered equal if the underlying viewed objects are equal.

Fixes #2189.
simulate_petab was mainly intended to simulate all conditions at once,
but the `simulation_conditions` argument provides also an easy way to
simulate only a subset of conditions. However, this currently fails,
because the full parameter mapping is used an then wrong conditions
are assigned.

This is fixed here. Also it saved a minuscule amount of time.
* GHA: Test composite actions

* ..

* sonar
Handle installation and dependencies in one single place.
* GHA: Cleanup custom swig usage

* Previously the newest swig was downloaded and built, but not used because of a wrong path. Fixed here.
* Make scripts/downloadAndBuildSwig.sh accept a version number argument
* Use composite action to make it more maintainable and avoid issues as fixed above

* ..

Replacing redundant sections and some reformatting.
Split current C++/Python/Notebook tests into three separate workflows: 
1. C++ + some Python
2. Slow pysb and spline tests
3. Notebooks

Closes #2195
Closes #2014
* HasenauerMer2023

* RaimundezFed2023

* Add Mendes2023

* HuckBal2023
* Ensure cmake can find OpenMP
* Assert that amici was compiled with OpenMP support
* Update installation guide

Fixes #2182
@dweindl dweindl requested a review from a team as a code owner November 21, 2023 13:46
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Merging #2210 (92c0530) into master (3c5e997) will increase coverage by 0.16%.
The diff coverage is 83.67%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2210      +/-   ##
==========================================
+ Coverage   76.62%   76.78%   +0.16%     
==========================================
  Files          82       82              
  Lines       14939    15012      +73     
==========================================
+ Hits        11447    11527      +80     
+ Misses       3492     3485       -7     
Flag Coverage Δ
cpp 73.41% <71.42%> (-0.07%) ⬇️
cpp_python 36.99% <0.00%> (?)
petab 53.80% <56.27%> (-0.44%) ⬇️
python 77.83% <80.34%> (+0.54%) ⬆️
sbmlsuite ∅ <ø> (∅)

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

Files Coverage Δ
include/amici/steadystateproblem.h 76.47% <ø> (ø)
python/sdist/amici/__init__.py 95.55% <100.00%> (ø)
...thon/sdist/amici/conserved_quantities_demartino.py 65.55% <100.00%> (ø)
python/sdist/amici/de_model.py 92.85% <100.00%> (ø)
python/sdist/amici/gradient_check.py 83.15% <100.00%> (ø)
python/sdist/amici/logging.py 84.61% <ø> (ø)
python/sdist/amici/pandas.py 98.25% <100.00%> (ø)
python/sdist/amici/parameter_mapping.py 84.21% <100.00%> (ø)
python/sdist/amici/petab_import.py 68.25% <100.00%> (+0.23%) ⬆️
python/sdist/amici/petab_simulate.py 100.00% <ø> (ø)
... and 21 more

... and 5 files with indirect coverage changes

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.8% 0.8% Duplication

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

@dweindl dweindl merged commit ffcbf66 into master Nov 21, 2023
40 of 44 checks passed
@dweindl dweindl deleted the release_0.20.0 branch November 21, 2023 19:04
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