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

Fix petab import: initial assignment targets as constant parameters #2345

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Mar 4, 2024

During PEtab import, parameters that are targets of initial assignments have so far not been turned into constant parameters, because they didn't exist in the amici model (see #2304).
Now that those parameters remain in the model, they should be turned into constant parameters, unless specified otherwise.

Requires PEtab-dev/libpetab-python#248, otherwise PEtab parameter mapping will provide potentially incorrect values for those parameters.

@dweindl dweindl requested a review from a team as a code owner March 4, 2024 20:07
@dweindl dweindl self-assigned this Mar 4, 2024
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 77.64%. Comparing base (19f7baf) to head (c0092c7).
Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2345      +/-   ##
===========================================
+ Coverage    77.63%   77.64%   +0.01%     
===========================================
  Files          324      324              
  Lines        20769    20786      +17     
  Branches      1449     1449              
===========================================
+ Hits         16124    16140      +16     
- Misses        4642     4643       +1     
  Partials         3        3              
Flag Coverage Δ
cpp 73.40% <23.07%> (-0.03%) ⬇️
cpp_python 34.27% <46.15%> (+<0.01%) ⬆️
petab 36.90% <95.23%> (+0.15%) ⬆️
python 72.21% <46.15%> (-0.02%) ⬇️
sbmlsuite ∅ <ø> (∅)

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

Files Coverage Δ
python/sdist/amici/sbml_import.py 78.63% <100.00%> (+0.04%) ⬆️
python/tests/test_petab_import.py 100.00% <100.00%> (ø)
python/sdist/amici/petab/sbml_import.py 54.92% <90.00%> (+4.92%) ⬆️

During PEtab import, parameters that are targets of initial assignments
have so far not been turned into constant parameters, because they didn't
exist in the amici model (see AMICI-dev#2304).
Now that those parameters remain in the model, they should be turned into
constant parameters, unless specified otherwise.
@FFroehlich
Copy link
Member

FFroehlich commented Mar 6, 2024

On second thought, maybe add the libsbml parser settings as module variable and import rather than duplicating?

@dweindl
Copy link
Member Author

dweindl commented Mar 6, 2024

On second thought, maybe add the libsbml parser settings as module variable and import rather than duplicating?

Would like to, but it takes a specific model as first argument. The best thing I could do, would be adding a function that creates a parser, I think, to not duplicate the settings.

@dweindl dweindl merged commit 2316f2a into AMICI-dev:develop Mar 6, 2024
26 checks passed
@dweindl dweindl deleted the fix_petab_constants_ia branch March 6, 2024 22:01
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