GClunies / noaa_coops

A Python wrapper for the NOAA CO-OPS Tides & Currents Data and Metadata APIs.
Apache License 2.0
80 stars 28 forks source link

without change, deprecation warning is called a lot #60

Closed kthyng closed 2 months ago

kthyng commented 2 months ago

and it is very annoying

kthyng commented 2 months ago

@GClunies Mind taking a look at this? Also addresses my recent comment https://github.com/GClunies/noaa_coops/issues/51#issuecomment-2181607372

GClunies commented 2 months ago

@kthyng

and it is very annoying

I agree deprecation warnings are annoying. But next time, can you include example code that demonstrates the issue instead of just calling it out as annoying? This is free, open-source software. This is not my job. The last time I worked with NOAA data was over 5 years ago, so any updates I make are to help others - the original motivation behind this project.

Can you remove the version dependency changes and open a separate PR for that so I can assess in isolation - the poetry caret notation should be similar to what you are proposing.

kthyng commented 2 months ago

Sorry, I had imagined us on the same side against it being annoying, not me calling your code annoying. Plus, I fixed it! But yes, I can do these things next week.

kthyng commented 2 months ago

Here is an example from your tests:

import noaa_coops as nc
seattle = nc.Station(id="9447130")
df = seattle.get_data(
         begin_date="20150101",
         end_date="20150131",
         product="water_level",
         datum="MLLW",
)

will return

/Users/kthyng/projects/noaa_coops/noaa_coops/station.py:742: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_numeric without passing `errors` and catch exceptions explicitly instead
  df[col] = pd.to_numeric(df[col], errors="ignore")

without these changes.

kthyng commented 2 months ago

And the version dependency PR is here: https://github.com/GClunies/noaa_coops/pull/61

GClunies commented 2 months ago

Thanks @kthyng, approved. Taking at look at #61 next.