Skip to content

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Dec 15, 2025

Refactor name and ID handling as preparation for #3107.

  • Store IDs/names in const string_view array and only pass around spans to avoid always constructing new vectors
  • Store solver state IDs/names arrays instead of creating them dynamically, to be compatible with the previous point
  • Update tests accordingly
  • Add the respective typemaps
  • Regenerate test models

@dweindl dweindl self-assigned this Dec 15, 2025
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 81.17647% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.52%. Comparing base (aa85fb9) to head (0d6f26a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/model.cpp 18.36% 40 Missing ⚠️
models/model_calvetti_py/model_calvetti_py.h 96.00% 1 Missing ⚠️
models/model_dirac_py/model_dirac_py.h 96.00% 1 Missing ⚠️
models/model_events_py/model_events_py.h 96.00% 1 Missing ⚠️
...odel_jakstat_adjoint_py/model_jakstat_adjoint_py.h 96.00% 1 Missing ⚠️
...ls/model_nested_events_py/model_nested_events_py.h 96.00% 1 Missing ⚠️
models/model_neuron_py/model_neuron_py.h 96.00% 1 Missing ⚠️
models/model_robertson_py/model_robertson_py.h 96.00% 1 Missing ⚠️
models/model_steadystate_py/model_steadystate_py.h 96.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3110      +/-   ##
==========================================
- Coverage   78.29%   77.52%   -0.77%     
==========================================
  Files         315      315              
  Lines       20524    20480      -44     
  Branches     1500     1485      -15     
==========================================
- Hits        16069    15877     -192     
- Misses       4446     4595     +149     
+ Partials        9        8       -1     
Flag Coverage Δ
cpp 71.64% <81.17%> (-0.13%) ⬇️
cpp_python 37.82% <3.52%> (+0.11%) ⬆️
petab 46.53% <14.81%> (-0.02%) ⬇️
petab_sciml 13.93% <0.00%> (-0.02%) ⬇️
python 70.30% <80.39%> (-0.13%) ⬇️
sbmlsuite-jax ?

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

Files with missing lines Coverage Δ
include/amici/model.h 78.04% <ø> (ø)
python/sdist/amici/_installation/swig.py 0.00% <ø> (ø)
python/sdist/amici/exporters/sundials/de_export.py 96.44% <100.00%> (+0.05%) ⬆️
python/sdist/amici/testing/models.py 98.38% <ø> (ø)
models/model_calvetti_py/model_calvetti_py.h 55.55% <96.00%> (-2.21%) ⬇️
models/model_dirac_py/model_dirac_py.h 55.86% <96.00%> (-2.31%) ⬇️
models/model_events_py/model_events_py.h 64.02% <96.00%> (-1.68%) ⬇️
...odel_jakstat_adjoint_py/model_jakstat_adjoint_py.h 68.24% <96.00%> (-1.63%) ⬇️
...ls/model_nested_events_py/model_nested_events_py.h 60.66% <96.00%> (-2.00%) ⬇️
models/model_neuron_py/model_neuron_py.h 70.44% <96.00%> (-1.42%) ⬇️
... and 3 more

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweindl dweindl marked this pull request as ready for review December 15, 2025 19:30
@dweindl dweindl requested a review from a team as a code owner December 15, 2025 19:30
Refactor name and ID handling as preparation for AMICI-dev#3107.

* Store IDs/names in const string_view array and only pass around spans to avoid always constructing new vectors
* Store solver state IDs/names arrays instead of creating them dynamically, to be compatible with the previous point
* Update tests accordingly
* Add the respective typemaps
* Regenerate test models
Copy link
Member

@FFroehlich FFroehlich left a comment

Choose a reason for hiding this comment

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

👍

@dweindl dweindl added this pull request to the merge queue Dec 16, 2025
Merged via the queue into AMICI-dev:main with commit fc1a045 Dec 16, 2025
31 of 32 checks passed
@dweindl dweindl deleted the stringview_ids branch December 16, 2025 13:40
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