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

Make model module accessible from model instance #1932

Merged
merged 3 commits into from
Jan 16, 2023
Merged

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Jan 13, 2023

This makes it more convenient to create a new (unmodified) model instance, or to find out where the model files are located.

Also adds a snake_case version of getModel.

This makes it more convenient to create a new (unmodified) model instance, or to find out where the model files are located.

Also adds a snake_case version of `getModel`.
@dweindl dweindl requested a review from FFroehlich January 13, 2023 22:25
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #1932 (09decac) into develop (7f1eee3) will increase coverage by 0.09%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1932      +/-   ##
===========================================
+ Coverage    75.90%   75.99%   +0.09%     
===========================================
  Files           76       76              
  Lines        12970    12970              
===========================================
+ Hits          9845     9857      +12     
+ Misses        3125     3113      -12     
Flag Coverage Δ
cpp 73.13% <ø> (+0.02%) ⬆️
petab 59.72% <ø> (ø)
python 69.02% <ø> (+0.22%) ⬆️
sbmlsuite ?

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

Impacted Files Coverage Δ
python/sdist/amici/__init__.py 95.55% <ø> (ø)
src/sundials_matrix_wrapper.cpp 80.61% <0.00%> (+0.40%) ⬆️
...thon/sdist/amici/conserved_quantities_demartino.py 65.55% <0.00%> (+1.95%) ⬆️

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.

👍 neat, check path (test) for one of the test models?

@dweindl
Copy link
Member Author

dweindl commented Jan 16, 2023

Added a test.

Ideally, this whole thing would be handled by returning an instance of the ModelXXXX Python class by ModelModule.getModel, that would already have the module available. But due to the virtual class hierarchy, this didn't seem to work out of the box. Can be improved later on...

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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.0% 0.0% Duplication

@dweindl dweindl merged commit 6e44a70 into develop Jan 16, 2023
@dweindl dweindl deleted the model_module branch January 16, 2023 10:55
dweindl added a commit that referenced this pull request Jan 31, 2023
Fixup for #1932

This fixes importing the swig wrapper for a model directly (not via the package).
dweindl added a commit that referenced this pull request Jan 31, 2023
Fixup for #1932

This fixes importing the swig wrapper for a model directly (not via the package).
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