-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update NWM Client New interfaces and bring up to feature parity with old client #202
Conversation
Ping @aaraney |
@jarq6c, thanks for pinging me. Im excited to start reviewing this tomorrow! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing this, @jarq6c! I got about halfway through the review and I need to step away to do some other tasks. Ill be back to finish this up either this weekend or sometime next week. Have a nice weekend!
python/nwm_client_new/src/hydrotools/nwm_client_new/NWMClientDefaults.py
Show resolved
Hide resolved
python/nwm_client_new/src/hydrotools/nwm_client_new/NWMClientDefaults.py
Show resolved
Hide resolved
python/nwm_client_new/src/hydrotools/nwm_client_new/NWMClientDefaults.py
Show resolved
Hide resolved
fixes: RuntimeError: There is no current event loop in thread'MainThread'.
Pin importlib-metadata version in nwm_client_new
Add pytest-aiohttp development dep to svi_client
…inplace-future-warning-issue Resolve nwis service raising pandas FutureWarning
* echo dependency versions in runners
…-new-units Conflicts: python/nwm_client_new/setup.cfg
@jarq6c, it looks like newer commits got rebased on top of this PR yesterday. I think you can do an interactive rebase ( |
Started a new PR from a new branch over on #227 |
This turned out to be a bit bigger than I had intended, but it is the result of months of experimentation as well as feedback from frequent users of National Water Model output. I'll summarize changes for each component.
FileDownloader.py
Added an
overwrite
boolean parameter that will warn and skip similarly named files.NWMFileProcessor.py
Updated
get_dataset
to accept thexarray.open_mfdataset
paths
argument. Essential coordinates (reference_time
,time
, andfeature_id
) are always returned.NWMClient.py
Updated abstract interface to accept an
nwm_feature_ids
parameter to facilitate retrieval of smaller amounts of data. Unfortunately, retrieving data is still relatively slow, but this new interface accommodates the most common use-case (retrieval of time series data from a few sites).NWMFileClient.py
Added
unit_system
parameter to match oldernwm_client
unit handling. Replacedget_dataset
method withget_files
that just downloads files and returns their local paths.get
method works with severalconfigurations
andreference_times
by default. Implementsnwm_feature_ids
parameter.ParquetStore.py
Formerly
ParquetCache.py
, I decided to rename this module and reimplement as aMutableMapping
similar topandas.HDFStore
. It can still be used as a context manager, but now it also includes key-access and inherits useful methods likeget
andpop
fromMutableMapping
. As a consequence, the oldget
method was removed. This could live somewhere else, eventually.NWMClientDefaults.py
Added defaults for handling units, variables, and the new
ParquetStore
.UnitHandler.py
Taken verbatim from the older
nwm_client
. This could potentially live somewhere else (eventually)._version.py
bumped to 7.0.0 due to breaking interface changes
Checklist