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 |
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...)