-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add generic NWM client tool with HTTP client tool #120
Conversation
@aaraney may be interested in this added functionality |
@jarq6c thanks for tagging me here. In general, I think the api looks good and provides a worthy alternative to I have a few design suggestions that might be worth mulling over (mainly, with the future in mind). Both the On approach could be to implement and abstract base class that captures the common interface between the I think a more durable solution might be to rethink the role of the gcp_service = GCPDataService("nwm-bucket", "analysis_and_assimilation")
service = NWMDataService(gcp_service)
data = service.get(...) So, instead the First thoughts to implementing something like this:
I think this design pattern is "more maintainable" and extendable. I think the extendable part is why it (could be) worth the labor. I am thinking in the future, there might be a slew of data sources/output specifications for different data coming from NGEN. The aforementioned design would reduce the labor required to add new data sources which might be desirable in the future. There are likely other reasons to spend the labor, but that is all I can think of at the moment. As always, this is just a suggestion. This may be over engineering a solution to a problem that we will never have, but I thought I would mention it for the records sake and to spur some conversation. |
I agree in so far as the need to reduce code duplication (see the Notes section in the original PR comment). In the shorter term, I may implement a minimal Abstract class, but I'm not entirely familiar with all the design patterns you suggested and I'm concerned it may be too large a maintainability burden for me. For example, while trying to diagnosis #107 I found that Edit: Also, you're a prophet. The unified interface was partially motivated to start positioning the package for better integration with NGEN. |
The
nwm_client
subsumes thegcp_client
and includes an additional interface to access NWM data served from generic web pages. This includes NOMADS, apache server directory listings, and python simple HTTP servers.Additions
nwm_client
subpackagehydrotools.nwm_client.http
module for accessing NWM NetCDF files from generic web serversRemovals
gcp_client
tests. The functionality of this package is still tested undernwm_client
Changes
gcp_client
. The same functionality is now available underhydrotools.nwm_client.gcp
Testing
nwm_client.http
Notes
http
. Usepip install hydrotools.nwm_client[gcp]
to install dependencies for Google Cloud PlatformTodos
gcp
andhttp
in terms of parsing NetCDF files. Will want to thin out the codebase later.Checklist