Skip to content

Conversation

jhlegarreta
Copy link

@jhlegarreta jhlegarreta commented Aug 27, 2025

Fix non-standard napoleon custom section mapping:

  • Map Inputs and Outputs to params_style and returns_style, respectively, instead of mapping them to Parameters.
  • Map Mandatory Inputs and Optional Inputs to params_style, instead of mapping them to Parameters.
  • Add the numpydoc extension and set the numpy_doc_show_class_members and autodoc_typehints flags so that the Attributes docstrings are shown.
  • Map the Attributes section to the Attributes string in order to show that value instead of Variables in the corresponding documentation section.

Documentation:
https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_custom_sections https://stackoverflow.com/questions/72220924/sphinx-how-to-show-attributes-as-in-scipy

Copy link

welcome bot commented Aug 27, 2025

Thanks for opening this pull request! We have detected this is the first time for you to contribute to dMRIPrep. Please check out our contributing guidelines.
We invite you to list yourself as a dMRIPrep contributor, so if your name is not already mentioned, please modify the .zenodo.json file and insert your data last in the contributors list. Example:

{
   "name": "Contributor, New dMRIPrep",
   "affiliation": "Department of dMRI prep'ing, Open Science Made-Up University",
   "orcid": "<your id>",
   "type": "Researcher"
}

Of course, if you want to opt-out this time there is no problem at all with adding your name later. You will be always welcome to add it in the future whenever you feel it should be listed.

@jhlegarreta jhlegarreta force-pushed the doc/fix-napoleon_custom-sec branch from e17f451 to 396b0de Compare August 27, 2025 22:58
@jhlegarreta
Copy link
Author

jhlegarreta commented Aug 27, 2025

Comments:

Fix non-standard `napoleon` custom section mapping:
- Map `Inputs` and `Outputs` to `params_style` and `returns_style`,
  respectively, instead of mapping them to `Parameters`.
- Map `Mandatory Inputs` and `Optional Inputs` to `params_style`,
  instead of mapping them to `Parameters`.
- Add the `numpydoc` extension and set the
  `numpy_doc_show_class_members` and `autodoc_typehints` flags so that
  the `Attributes` docstrings are shown.
- Map the `Attributes` section to the `Attributes` string in order to
  show that value instead of `Variables` in the corresponding
  documentation section.

Documentation:
https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_custom_sections
https://stackoverflow.com/questions/72220924/sphinx-how-to-show-attributes-as-in-scipy
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.

1 participant