-
Notifications
You must be signed in to change notification settings - Fork 184
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
Documentation Samples #308
Comments
Thanks for the suggestion. We use doctest throughout the documentation RST files to include code samples and to ensure the code samples are tested. However, we have tried to limit the use of additional comments in the code blocks and rely on the surrounding text to describe the class/method/function. This seems to match the style of other python package user guides. The API documentation includes additional detail, but there is always room for improvement (for example, see https://wntr.readthedocs.io/en/latest/apidoc/wntr.network.model.html#wntr.network.model.WaterNetworkModel.add_pipe). Units could be added to the descriptions. We try to link the documentation to the API class/method/function when it's first introduced. |
All right, so I won't add any examples to the class/method/function documentation but will look out to improve the guides instead and try to link the class/method/function with each other. Thanks! Should I just create PR's for each change or bundle them? |
Those additions look great. Feel free to bundle minor updates together. We can always add review comments by line if we need to iterate on wording. |
I am very new to WNTR and EPANET simulations (or water networks in general) and was wondering if it might be possible to add code examples to the documentation (meaning some of the functions).
As I have a computer science background I came across this library which should integrate nicely with the documentation system already in place and insure that the examples will work: https://docs.python.org/3/library/doctest.html
For example:
or
My goal with this issue would be to make it easier for users to understand which unit format they have to use (it's clear that everything is in SI, but still getting a feeling for the right scale is nice).
The text was updated successfully, but these errors were encountered: