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

handle all future warnings #230

Merged
merged 2 commits into from
Nov 27, 2024
Merged

handle all future warnings #230

merged 2 commits into from
Nov 27, 2024

Conversation

aerispaha
Copy link
Member

@aerispaha aerispaha commented Nov 27, 2024

Minor refactoring to address all of the current FutureWarnings and PytestUnknownMarkWarning raised by the tests. This wrangles a few references to delim_whitespace that slipped through the cracks in addition to many instances of the follow warnings:

  • FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated.
  • FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version.
  • FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas.
  • PytestUnknownMarkWarning: Unknown pytest.mark.uses_geopandas

After these changes, warnings raised when running tests should reduce from 107 to 15.

Note

The remaining 15 warnings are raised by swmmio itself, in situations where the dataframe_from_inp function attempts to extract a section of the INP that is not found. For example:

UserWarning: ORIFICES section not found in /swmmio/swmmio/tests/data/model_full_features_network_xy.inp

I'm tired of seeing these warnings too. But in some cases these may be important. Maybe we can provide a user config that optionally silences these? I'm open to ideas. But we can tackle that separately

@bemcdonnell
Copy link
Member

@aerispaha

image

@aerispaha aerispaha merged commit 6b2df99 into master Nov 27, 2024
17 checks passed
@aerispaha aerispaha deleted the handle-warnings branch November 27, 2024 19:49
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