blaylockbk / Herbie

Download numerical weather prediction datasets (HRRR, RAP, GFS, IFS, etc.) from NOMADS, NODD partners (Amazon, Google, Microsoft), ECMWF open data, and the University of Utah Pando Archive System.
https://herbie.readthedocs.io/
MIT License
480 stars 72 forks source link

Rename `searchString` argument to `search` #305

Closed blaylockbk closed 5 months ago

blaylockbk commented 5 months ago

I renamed the searchString argument to search, since this isn't a simple exact match search, but a regex search. Plus, search is shorter and just as descriptive. (I really would have liked to have named it filter, but that is a python built-in)

Breaking Change

Instead of

H = Herbie('2024-01-01')
H.inventory(searchString='TMP:2 m')
H.xarray(searchString='TMP:2 m')

do this

H = Herbie('2024-01-01')
H.inventory(search='TMP:2 m')
H.xarray(search='TMP:2 m')

# or 
H.inventory('TMP:2 m')
H.xarray('TMP:2 m')

I included a warning to notify users who are still using searchString, but I'll probably remove it completely in the release after this one.