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

petab: Enable Importer passing verbose to create_model #1269

Merged
merged 4 commits into from
Jan 8, 2024

Conversation

Doresic
Copy link
Contributor

@Doresic Doresic commented Jan 5, 2024

Enable the create_objective and create_problem methods of the PetabImporter to pass verbose to create_model and sbml2amici. Coming from #1246

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (3801ef1) 84.59% compared to head (aeb4c36) 82.73%.

Files Patch % Lines
pypesto/petab/importer.py 33.33% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1269      +/-   ##
===========================================
- Coverage    84.59%   82.73%   -1.86%     
===========================================
  Files          148      148              
  Lines        12112    12112              
===========================================
- Hits         10246    10021     -225     
- Misses        1866     2091     +225     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Doresic Doresic marked this pull request as ready for review January 8, 2024 09:01
@Doresic Doresic self-assigned this Jan 8, 2024
@@ -428,7 +428,10 @@ def create_objective(

# create model
if model is None:
model = self.create_model(force_compile=force_compile)
verbose = kwargs.pop('verbose', True)
Copy link
Member

Choose a reason for hiding this comment

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

It's good to be able to pass verbose=False. However, it's potentially confusing to do that via kwargs (**kwargs: Additional arguments passed on to the objective.). I'd prefer adding (and documenting) it as a separate keyword argument to create_objective.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, will change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additionally, I extended the same thing to all methods of the PetabImporter (create_edatas, create_solver etc...). To be uniform in changes, but it might be too much?

Copy link
Member

Choose a reason for hiding this comment

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

To be uniform in changes, but it might be too much?

No strong opinion. I don't think it will be used frequently via those other functions, but I don't think it hurts having it there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same feeling

Added verbose as argument in all importer method which use `create_model` and passed it onto it.
Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

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

Thx

@Doresic Doresic merged commit 6366ecf into develop Jan 8, 2024
18 checks passed
This was referenced Jan 30, 2024
@Doresic Doresic deleted the create_model_verbose branch February 29, 2024 16:44
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.

3 participants