Skip to content

Commit

Permalink
Nwm client transition (#265)
Browse files Browse the repository at this point in the history
* raise warning on import

* bump nwm-client version to 5.1.5

* warn on import of caches

* bump caches to 0.1.5

* remove references to deprecated packages

* remove caches from docs and add nwm-client-new

* remove tests for caches and old nwm client
  • Loading branch information
jarq6c authored Nov 21, 2024
1 parent 3b7d9b0 commit 8e0e374
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 83 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 -m pip install ./python/_restclient[develop]
python3 -m pip install ./python/nwis_client[develop]
python3 -m pip install ./python/caches[develop]
python3 -m pip install ./python/nwm_client[develop]
python3 -m pip install ./python/nwm_client_new[develop]
python3 -m pip install ./python/events[develop]
python3 -m pip install ./python/metrics[develop]
- name: Build Sphinx documentation
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/run_caches.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/run_nwm_client.yml

This file was deleted.

5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
![hydrotools.caches testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_caches.yml/badge.svg)
![hydrotools.events testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_events.yml/badge.svg)
![hydrotools.metrics testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_metrics.yml/badge.svg)
![hydrotools.nwis_client testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_nwis_client.yml/badge.svg)
![hydrotools.nwm_client testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_nwm_client.yml/badge.svg)
![hydrotools.nwm_client_new testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_nwm_client_new.yml/badge.svg)
![hydrotools._restclient testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_rest_client.yml/badge.svg)
![hydrotools.svi_client testing status](https://github.com/noaa-owp/hydrotools/actions/workflows/run_svi_client.yml/badge.svg)
Expand All @@ -29,13 +27,12 @@ It should be noted, we commonly refer to individual tools in OWPHydroTools as a
Currently the repository has the following subpackages:

- `events`: Variety of methods used to perform event-based evaluations of hydrometric time series
- `nwm_client`: Provides methods for retrieving National Water Model data from various sources including [Google Cloud Platform](https://console.cloud.google.com/marketplace/details/noaa-public/national-water-model) and [NOMADS](https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/)
- `nwm_client_new`: Provides methods for retrieving National Water Model data from various sources including [Google Cloud Platform](https://console.cloud.google.com/marketplace/details/noaa-public/national-water-model) and [NOMADS](https://nomads.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/)
- `metrics`: Variety of methods used to compute common evaluation metrics
- `nwis_client`: Provides easy to use methods for retrieving data from the [USGS NWIS Instantaneous Values (IV) Web Service](https://waterservices.usgs.gov/rest/IV-Service.html)
- `svi_client`: Provides programmatic access to the Center for Disease Control's (CDC) [Social Vulnerability Index (SVI)](https://www.atsdr.cdc.gov/placeandhealth/svi/index.html)

- `_restclient`: A generic REST client with built in cache that make the construction and retrieval of GET requests painless
- `caches`: Provides a variety of object caching utilities

## UTC Time

Expand Down
7 changes: 7 additions & 0 deletions python/caches/src/hydrotools/caches/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# removing __version__ import will cause build to fail. see: https://github.com/pypa/setuptools/issues/1724#issuecomment-627241822
from ._version import __version__

import warnings

warnings.warn(
"hydrotools.caches is no longer supported. Use hydrotools.nwm_client_new.ParquetStore. https://pypi.org/project/hydrotools.nwm-client-new/",
FutureWarning
)
2 changes: 1 addition & 1 deletion python/caches/src/hydrotools/caches/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.4"
__version__ = "0.1.5"
7 changes: 7 additions & 0 deletions python/nwm_client/src/hydrotools/nwm_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@
pass
else:
raise e

import warnings

warnings.warn(
"nwm_client is no longer supported. Use https://pypi.org/project/hydrotools.nwm-client-new/",
FutureWarning
)
2 changes: 1 addition & 1 deletion python/nwm_client/src/hydrotools/nwm_client/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.1.4"
__version__ = "5.1.5"

0 comments on commit 8e0e374

Please sign in to comment.