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

ENH: #448 print flush #527

Merged
merged 9 commits into from
Aug 6, 2024
Merged

ENH: #448 print flush #527

merged 9 commits into from
Aug 6, 2024

Conversation

himkwtn
Copy link
Collaborator

@himkwtn himkwtn commented Jul 9, 2024

#448 add flush options to model.print

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.31%. Comparing base (3503c15) to head (cdb09ab).
Report is 116 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #527      +/-   ##
==========================================
+ Coverage   94.05%   94.31%   +0.25%     
==========================================
  Files          38       37       -1     
  Lines        4157     4099      -58     
==========================================
- Hits         3910     3866      -44     
+ Misses        247      233      -14     

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

Copy link
Collaborator

@Jacob-Stevens-Haas Jacob-Stevens-Haas left a comment

Choose a reason for hiding this comment

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

Good job improving the tests and the conditional! In the issue, I recommended to lookup what other kwargs print might accept, too. Do you think sep, end, or file are useful?

IDK if they are, but it it wouldn't be hard to implement them all. Are there any reasons not to use **kwargs?

def print(self, lhs=None, precision=3, **kwargs):

And just passing the kwargs to the builtin print with

print(f"{names} = {eqn}", **kwargs)

pysindy/pysindy.py Outdated Show resolved Hide resolved
pysindy/pysindy.py Outdated Show resolved Hide resolved
test/test_pysindy.py Outdated Show resolved Hide resolved
test/test_pysindy.py Outdated Show resolved Hide resolved
test/test_pysindy.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Jacob-Stevens-Haas Jacob-Stevens-Haas left a comment

Choose a reason for hiding this comment

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

Thanks, Watcharin, just a few deletions and we're good to go

pysindy/pysindy.py Outdated Show resolved Hide resolved
test/test_pysindy.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Jacob-Stevens-Haas Jacob-Stevens-Haas left a comment

Choose a reason for hiding this comment

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

Hey, BTW, I meant delete the whole test test_print_discrete_time_multiple_trajectories, rather than just a single line. Could you do that please?

test/test_pysindy.py Outdated Show resolved Hide resolved
@Jacob-Stevens-Haas Jacob-Stevens-Haas merged commit 3e8a445 into master Aug 6, 2024
7 checks passed
@Jacob-Stevens-Haas Jacob-Stevens-Haas deleted the feature-448 branch August 6, 2024 17:08
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