Skip to content

Replace Sphinx napoleon for numpydoc #149

@santisoler

Description

@santisoler

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 to Variables, 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:

  • Start by opening Pull Requests on each repository listed above.
  • Optionally, we can open Issues on each repository if further discussion specific to that repository is needed.
  • Mention this Issue on every Issue or Pull Request opened on each opened: Related to fatiando/community#XX
  • Check-off the repository on the list above once the Pull Request is merged.
  • Close this issue when all items are checked-off.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceMaintenance tasks across the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions