-
Notifications
You must be signed in to change notification settings - Fork 15
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 nwm_client documentation and minor subpackage level import changes #179
Conversation
…es by NWMDataService objects
…g like: from hydrotools import nwm_client; nwm_client.gcp.NWMDataService()
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.
Appreciate the updated docs! Seems non-controversial. Just need some clarification on __init__.py
imports (in terms of best practices/guiding philosophy/Pythonic-ness).
@@ -1,2 +1,13 @@ | |||
# removing __version__ import will cause build to fail. see: https://github.com/pypa/setuptools/issues/1724#issuecomment-627241822 | |||
from ._version import __version__ | |||
|
|||
from . import http |
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.
Is this a good idea?
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.
By which I mean, we're not "polluting the namespace", right?
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.
Right, it's a matter of opinion and style. Personally, given our audience, I would like to make the experience using hydrotools as intuitive as possible. Here, I am assuming it is more intuitive to a user to import nwm_client
and then tab complete to see the available submodules. Ex:
from hydrotools import nwm_client
# tab to see exposed subpackage level entities
nwm_client. # tab tab
nwm_client.html, nwm_client.gcp
To be fair, I am making a fair number of assumptions about how someone might use hydrotools. What do you think about my assumptions? To your point regarding clouding the namespace, im not sure im ready to answer that. I need to think about it more and consider what implications my assumptions might have.
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.
Assuming you've mulled over the implications, let's see how it works out. No need for the PR to go stale because of this minor concern.
Update / add too / fix issues with
nwm_client
readme and docstrings. Adds usage example forgcp
client to readme.Additions
nwm_client
submodule members,gcp
andhttp
can now be accessed from the subpackage level.Checklist