-
Notifications
You must be signed in to change notification settings - Fork 4
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 #149
Comments
santisoler
added a commit
to fatiando/verde
that referenced
this issue
Apr 24, 2024
Replace the builtin Sphinx plugin `napoleon` for `numpydoc`. This solves the issue of attributes with trailing underscore not rendering properly in docs. Add `numpydoc` as requirement for building the docs and add it to the Sphinx configuration file. Remove `napoleon` from Sphinx configuration. Remove the "Methods Summary" section in the Sphinx class template since `numpydoc` builds its own list of all methods. Related to fatiando/community#149
This was referenced Apr 24, 2024
Probably we don't need |
Agreed 👍🏾 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
In fatiando/harmonica#490 I noticed that some attributes that have a trailing underscore (like
coefs_
in equivalent sources) are not properly shown in the API reference of the docs.The issue is coming from the Sphinx plugin we are currently using across the projects to render the docstrings of functions and classes as rst: napoleon. Moreover, it renames
Attributes
toVariables
, which is not ideal.One way to solve this issue is to move from napoleon to numpydoc. Since we are already making use of the numpydoc style in our docstrings, this replacement seems natural.
I was already experimenting with this, and noticed that the classes would get a duplicated Methods list section. @leouieda suggested that the duplicated one might be coming from the template we have set up for classes. If numpydoc is generating the methods list, we should get rid of it in the template.
Apply to:
Further instructions:
Related to fatiando/community#XX
We want your help!
We know that maintenance tasks are very demanding, so we don't expect a single person to tackle this issue by themselves. Any help is very welcomed, so please comment below that you want to take care of the changes on any repository and we will assign it to you.
The text was updated successfully, but these errors were encountered: