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

BUG: #414 remove user warning suppression #528

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Conversation

himkwtn
Copy link
Collaborator

@himkwtn himkwtn commented Jul 10, 2024

Fix #414, remove user warning suppression from pysindy.
The side effect of this PR is the number of warnings in the test files will increase from 139 to 533.
Most warnings are from StableLinearSR3 and TrappingSR3 optimizers throwing warnings if given default parameters.

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.05%. Comparing base (3503c15) to head (dd4e1ed).
Report is 12 commits behind head on master.

Files Patch % Lines
pysindy/__init__.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #528   +/-   ##
=======================================
  Coverage   94.05%   94.05%           
=======================================
  Files          38       38           
  Lines        4157     4157           
=======================================
  Hits         3910     3910           
  Misses        247      247           

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

Thanks for investigating! On a related note, can we clear the pysindy import warning:

>>> import pysindy
/home/jake/github/pysindy/pysindy/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

We should be able to get __version__ from the pysindy.version module that setuptools_scm makes.

@himkwtn
Copy link
Collaborator Author

himkwtn commented Jul 15, 2024

Thanks for investigating! On a related note, can we clear the pysindy import warning:

>>> import pysindy
/home/jake/github/pysindy/pysindy/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

We should be able to get __version__ from the pysindy.version module that setuptools_scm makes.

We can use python built-in importlib.metadata lib which is recommended by setuptools. Would that be better?

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.

We can use python built-in importlib.metadata lib which is recommended by setuptools. Would that be better?

LGTM! Yes, good point! If we swap out setuptools_scm, this code would have to change. Whereas using python's metadata record is more reliable.

Just fix the linting and I'll merge this

@Jacob-Stevens-Haas Jacob-Stevens-Haas merged commit b3d0b1a into master Jul 29, 2024
5 of 7 checks passed
@Jacob-Stevens-Haas Jacob-Stevens-Haas deleted the fix-414 branch July 29, 2024 02:03
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.

[BUG] importing pysindy adds "Ignore UserWarning" to the global warnings filter
2 participants