-
Notifications
You must be signed in to change notification settings - Fork 16
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
DOC: add docstrings to units #172
Conversation
Quick comment here - docstrings are usually fed into tools like Sphinx for producing auto-generated documentation (under the covers they use reStrcuturedText). You should make sure that the docstrings will produce good output with these tools. In particular, I think the way that you have indented your lists will not parse correctly with Sphinx. |
Hi Corran, Mark: Could you give me an example of how to structure the docstring of this type, I cannot find sth of similar type? |
OK, I seem to figure it out from the top of other files... Have it updated |
The best thing to do here would be to run a Sphinx build with warnings turned on and look at (a) the warnings output, and (b) the generated docs. If we don't already have autodoc-based mechanisms to build the docs, the the first step might be to put those in place. |
Looks like there is a |
It would also make sense to have a GitHub Actions workflow that runs the documentation build on each PR, so that we can detect regressions quickly. |
Here is the output of the
|
Got it, just changed |
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.
LGTM
As mentioned in issue #119 , it can help the users a great bit if we add doc string to the unit api. (Just realized there are so many different metric systems we have around the world...)