-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix various warnings revealed by pytest #273
Merged
Merged
Conversation
This file contains 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
Change to lowercase "s" for seconds frequency in the sample time pandas date range generation in test_get_onc_ferry unit test. This change resolves: FutureWarning: 'S' is deprecated and will be removed in a future version, please use 's' instead.
The delimiter for the pandas.read_csv() function has been changed from `delim_whitespace=True` to `sep="\s+"`. This change resolves: FutureWarning: The 'delim_whitespace' keyword in pd.read_csv is deprecated and will be removed in a future version. Use ``sep='\s+'`` instead.
Changed the assertions to use 'sizes' instead of 'dims'. This change resolves: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
Updated the test_daily_river_flows.TestReadRiverCSV.test_one_long_line() test to assert the expected ParserWarning. This warning is raised when there are differences in the lengths of the lines being parsed in the CSV data. Now, the test checks the warning's content to confirm its origin from mismatched length.
Modified how Theodosia "Secondary River Flow" data is filled in case of null values in the 'daily_river_flows' and 'make_v202111_runoff_file' workers. Instead of using inplace=True method, a more explicit assignment operation has been used to ensure compatibility with pandas 3.0. This change resolves: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #273 +/- ##
=======================================
Coverage 77.64% 77.64%
=======================================
Files 133 133
Lines 18695 18698 +3
Branches 1910 1911 +1
=======================================
+ Hits 14515 14518 +3
Misses 4113 4113
Partials 67 67
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Most are
FutureWarning
messages frompandas
andxarray
. One is an expectedPArserWarning
frompandas
that we now capture and inspect.