-
Notifications
You must be signed in to change notification settings - Fork 17
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
Replace sphinx napoleon for numpydoc #195
Conversation
Remove the list of methods and attributes from the template since numpydoc builds its own lists for them.
Put the admonitions in the Notes section to make numpydoc to render it properly.
I'm noticing that the attributes section only show a shorten description, without the mathematical definitions. I think we should fix that before merging this PR. |
Include the attributes to the class template so we can still show detailed descriptions for them, including math and their units. The attribute list that numpydoc generate has links to the corresponding description of the attributes.
I restored the attributes list in the class template, so we can have both the attribute list generated by numpydoc (with just a single line description) and the extended descriptions below. The attributes in the list generated by numpydoc link to their corresponding extended description, making the navigation process easy. I think I like this @leouieda, let me know what do you think. |
Configure numpydoc to show the list of attributes as the parameters section.
I'll have a look at the built docs locally as soon as I can. Thanks for this @santisoler! |
No worries! And also remember you can download the built docs from the Actions' artifact: https://github.com/fatiando/boule/actions/runs/9421670139 |
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.
👍🏾 merge away!
Add
numpydoc
to requirements for building the docs. Addnumpydoc
to Sphinx configuration file. Update Sphinx template for classes. Move admonitions inEllipsoid
andSphere
classes to the Notes section sonumpydoc
can render them properly.Relevant issues/PRs:
Related to fatiando/community#149