Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Replace sphinx napoleon for numpydoc #195

wants to merge 6 commits into from

Conversation

santisoler
Copy link
Member

Add numpydoc to requirements for building the docs. Add numpydoc to Sphinx configuration file. Update Sphinx template for classes. Move admonitions in Ellipsoid and Sphere classes to the Notes section so numpydoc can render them properly.

Relevant issues/PRs:

Related to fatiando/community#149

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.
@santisoler
Copy link
Member Author

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.
@santisoler
Copy link
Member Author

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant