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
NWMClientDefaults.ROUTELINK_URL specifies the location of the NWM RouteLink HDF5 file.
Removals
data directory and all RouteLink CSVs have been removed.
Changes
NWMClientDefaults.CROSSWALK is now a property that downloads and caches remote RouteLink data when called.
Testing
Passes all existing tests.
No new tests. Enhancement uses existing components.
Notes
HydroShare seems quick enough for this small amount of data.
Bandwidth limited users that cannot retrieve the crosswalk are unlikely to have success retrieving NWM data.
Requesting review from @aaraney
Closes #145
Todos
None
Checklist
[x] PR has an informative and human-readable title
[x] PR is well outlined and documented. See #12 for an example
[x] Changes are limited to a single goal (no scope creep)
[x] Code can be automatically merged (no conflicts)
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 theNWMClient
objects means the file is only downloaded and processed if aNWMClient
is initialized without a user-specifiedlocation_metadata_mapping
. The file is then downloaded via theFileDownloader
and cached in the defaultParquetCache
like any other dataframe associated with the client.Additions
NWMClientDefaults.ROUTELINK_URL
specifies the location of the NWM RouteLink HDF5 file.Removals
data
directory and all RouteLink CSVs have been removed.Changes
NWMClientDefaults.CROSSWALK
is now a property that downloads and caches remote RouteLink data when called.Testing
Notes
Todos
Checklist