NOAA-OWP / hydrotools

Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.
Other
54 stars 13 forks source link

Switch NWM Crosswalk Source from CSV to URL #156

Closed jarq6c closed 2 years ago

jarq6c commented 2 years ago

This PR changes the source of default National Water Model crosswalk information from packaged CSVs to an HDF5 file hosted on HydroShare.

https://www.hydroshare.org/resource/d154f19f762c4ee9b74be55f504325d3/

The crosswalk is no longer built on import. I implemented the crosswalk as a property of NWMClientDefaults. The interaction of this property with the NWMClient objects means the file is only downloaded and processed if a NWMClient is initialized without a user-specified location_metadata_mapping. The file is then downloaded via the FileDownloader and cached in the default ParquetCache like any other dataframe associated with the client.

Additions

Removals

Changes

Testing

  1. Passes all existing tests.
  2. No new tests. Enhancement uses existing components.

Notes

Todos

Checklist

jarq6c commented 2 years ago

Resolved all comments. Passes all tests. Thanks for the review @aaraney !