-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support initialAssignments with the DefaultImporter #132
Conversation
Codecov Report
@@ Coverage Diff @@
## main #132 +/- ##
==========================================
+ Coverage 93.94% 94.24% +0.29%
==========================================
Files 7 7
Lines 347 365 +18
==========================================
+ Hits 326 344 +18
Misses 21 21
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI-Maintainer Review for PR - Pl/initial assignments
Title and Description 👍
Scope of Changes 👍
Documentation 👎
Testing 👎
Suggested Changes
- Add a more descriptive title for the pull request that better conveys the purpose of the changes.
- Add docstrings to the
create_symbol
function in bothsrc/utils.jl
andtest/utils.jl
that describe the behavior, arguments, and return values of the function. - Include information in the description about how the changes were tested. This could include specific test cases used or additional steps taken to ensure the correctness and functionality of the modifications.
Reviewed with AI Maintainer
src/systems.jl
Outdated
for (k, v) in model.initial_assignments | ||
var = create_symbol(k, model) | ||
val = model.initial_assignments[k] | ||
push!(initial_assignment_map, var => interpret_as_num(val, model)) # Todo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the todo here about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already done, but I forgot to delete the comment.🙈
src/systems.jl
Outdated
|
||
for (k, v) in model.initial_assignments | ||
var = create_symbol(k, model) | ||
val = model.initial_assignments[k] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between v
and val
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None. Well spotted. Changed that.
This is to support initialAssignments for users who do not want to flatten them during libSBML conversion (i.e. with the
import_simplify_math
) converter from SBML.jl. As theDefaultImporter
no longer uses this converter, it is needed for correct default imports.Documentation: I did not add a docstring to the new function
create_symbol
as it is not exported.Testing: I wanted to add a test function for
create_symbol
but this requires SciML/ModelingToolkit.jl#2228.