-
Notifications
You must be signed in to change notification settings - Fork 48
Configure specific warnings #401
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9e3af3b
configure specific warnings
ssolson 6d39f6d
np.trapz => np.trapezoid
ssolson fe4312e
FutureWarning: ChainedAssignmentError: :
ssolson 1be55a6
FutureWarning: The behavior of 'to_datetime' with 'unit' when parsing…
ssolson b898817
PendingDeprecationWarning: vert: bool will be deprecate
ssolson 421ed38
FutureWarning: Passing literal html to 'read_html' is deprecated
ssolson b74df78
FutureWarning: Support for nested sequences for 'parse_dates' in pd.r…
ssolson 732d7eb
FutureWarning: errors='ignore' is deprecated and will raise in a fut…
ssolson ff0b731
FutureWarning: Support for nested sequences for 'parse_dates' in pd.…
ssolson 5b91d90
FutureWarning: Downcasting behavior in `replace` is deprecated and wi…
ssolson 7ee2c99
test_cdip.py only--DeprecationWarning: datetime.datetime.utcfromtimes…
akeeste d974c5c
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
akeeste ec312f1
Dolfyn.time--DeprecationWarning: datetime.datetime.utcfromtimestamp()…
akeeste fc2ca67
pd.to_datetime - fix edge case when string is already datetime format…
akeeste 2293b93
parse NDBC date times from csv with separate headers
akeeste f722dff
fix a couple warnings in TRTS example
akeeste c04d121
increase TRTS example time
akeeste af8d858
Revert "increase TRTS example time"
akeeste File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import warnings | ||
|
|
||
| # Only suppress specific, reviewed warnings here. | ||
| # Example: Suppress a known FutureWarning from a specific dependency | ||
| # warnings.filterwarnings( | ||
| # "ignore", | ||
| # category=FutureWarning, | ||
| # module=r"^some_dependency\.module$", | ||
| # message=r"This is a known harmless future warning." | ||
| # ) | ||
|
|
||
| # Add more targeted filters as needed, after review. | ||
|
|
||
|
|
||
| def configure_warnings(): | ||
| """ | ||
| Call this function at package import to apply MHKiT's targeted warning filters. | ||
| """ | ||
| # Example: Uncomment and edit below to suppress a specific warning | ||
| # warnings.filterwarnings( | ||
| # "ignore", | ||
| # category=FutureWarning, | ||
| # module=r"^some_dependency\.module$", | ||
| # message=r"This is a known harmless future warning." | ||
| # ) | ||
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@jmcvey3 can you review this solution to using
datetime.utcfromtimestamp()? I don't know the timeline on deprecation but we'll have to move away from this eventuallyThere 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.
@akeeste Yeah we discovered a long time ago that using the "fromtimestamp" function returns a different result depending on what timezone your local machine is running in. Using "utcfromtimestamp" was the only way to guarantee that the epoch time in seconds (what those return) is always the same value.
I think your solution here will work
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.
Got it, thanks @jmcvey3. I saw the same behavior when
fromtimestampis used without a timezone argument. Using it withtimezone.utchowever gives an identical datetime asutcfromtimestampbut with timezone metadata. I scrubtzinfofrom the output to match exactly whatutcfromtimestampreturns.