Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

DOC: Include special members in documentation #262

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

jhlegarreta
Copy link
Collaborator

Include the __call__ and __len__ special members when generating the documentation.

Include the `__call__` and `__len__` special members when generating the
documentation.
@jhlegarreta
Copy link
Collaborator Author

jhlegarreta commented Dec 8, 2024

@effigies I have been unsuccessful at adding the __init__ documentation to the class documentation, e.g.
https://scikit-learn.org/1.5/modules/generated/sklearn.gaussian_process.kernels.RBF.html#rbf

The autoclass_content both option:
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content

does only part of the job that I'm trying to replicate here: the __init__ contents are added to the class documentation,

eddymotion_init_vs_class_documentation

but as shown above, the arguments are not being added to the class signature (*args: Any, **kwargs: Any exist in the online documentation, and I have not found a way to remove them). Moving the parameters to the class documentation from the __init__ method and trying all three possibilities with autoclass_content or the autoclass class-doc-from does not do the trick.

Any suggestion ?

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.24%. Comparing base (f78bb19) to head (0d60c27).
Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #262   +/-   ##
=======================================
  Coverage   66.24%   66.24%           
=======================================
  Files          19       19           
  Lines         942      942           
  Branches      119      119           
=======================================
  Hits          624      624           
  Misses        274      274           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhlegarreta
Copy link
Collaborator Author

Re: #262 (comment) PR #263 should do the trick.

@oesteban oesteban merged commit 43fdd91 into nipreps:main Dec 19, 2024
8 checks passed
@jhlegarreta jhlegarreta deleted the IncludeSpecialMembersInDoc branch December 19, 2024 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants