fatiando / boule

Reference ellipsoids for geodesy and geophysics
https://www.fatiando.org/boule
BSD 3-Clause "New" or "Revised" License
37 stars 16 forks source link

Replace sphinx napoleon for numpydoc #195

Open santisoler opened 2 months ago

santisoler commented 2 months ago

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

santisoler commented 2 months ago

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.

santisoler commented 2 months ago

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.

leouieda commented 1 month ago

I'll have a look at the built docs locally as soon as I can. Thanks for this @santisoler!

santisoler commented 1 month ago

No worries! And also remember you can download the built docs from the Actions' artifact: https://github.com/fatiando/boule/actions/runs/9421670139