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

SBML import: Allow hardcoding of numerical values #2134

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Jun 28, 2023

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, ...

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #2134 (00bc9f6) into develop (b8edbcd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2134   +/-   ##
========================================
  Coverage    76.66%   76.67%           
========================================
  Files           81       81           
  Lines        14920    14926    +6     
========================================
+ Hits         11439    11445    +6     
  Misses        3481     3481           
Flag Coverage Δ
cpp 73.60% <ø> (-0.02%) ⬇️
petab 54.42% <75.00%> (-0.01%) ⬇️
python 77.24% <100.00%> (+0.04%) ⬆️
sbmlsuite ∅ <ø> (∅)

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

Impacted Files Coverage Δ
python/sdist/amici/sbml_import.py 77.83% <100.00%> (+0.16%) ⬆️

... and 2 files with indirect coverage changes

@dweindl dweindl marked this pull request as ready for review June 29, 2023 09:29
@dweindl dweindl requested a review from a team as a code owner June 29, 2023 09:29
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.

👍

raise ValueError(
f"Cannot hardcode symbol `{c.getId()}` that is a rule target."
)
if self.sbml.getInitialAssignment(c.getId()):
Copy link
Member

Choose a reason for hiding this comment

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

add event assignements. What about assignment rules?

Copy link
Member Author

Choose a reason for hiding this comment

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

Event assignments were missing, true. Assignment rules were handled by getRuleByVariable. Now changed to checking for the constant attribute which covers both.

@dweindl dweindl added this pull request to the merge queue Jul 4, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 4, 2023
@dweindl dweindl merged commit 752b0e5 into develop Jul 4, 2023
@dweindl dweindl deleted the feature_1192_hardcode branch July 4, 2023 09:57
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