Skip to content
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

Expose DataSet docs #5702

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

user27182
Copy link
Contributor

Possiblly fix #5694

The method of adding the class to class.rst worked previously as part of #5029 to expose the abstract docs of Prop3D so it could be referenced for both Actor and AxesActor child classes.

Let's see what this does for DataSet.

@github-actions github-actions bot added the documentation Anything related to the documentation/website label Feb 28, 2024
@user27182
Copy link
Contributor Author

github-actions preview

@user27182
Copy link
Contributor Author

CC @MatthewFlamm

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.54%. Comparing base (bf1520b) to head (03aad4b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5702   +/-   ##
=======================================
  Coverage   96.54%   96.54%           
=======================================
  Files         137      137           
  Lines       23327    23327           
=======================================
  Hits        22521    22521           
  Misses        806      806           

Copy link
Contributor

@user27182
Copy link
Contributor Author

I don't think this worked. No new methods showing.

0.43
image

This PR
image

@MatthewFlamm
Copy link
Contributor

It worked for DataSet https://65deeb78a493a1ba242fe891--meek-duckanoo-d2f5ec.netlify.app/api/core/_autosummary/pyvista.dataset#pyvista.DataSet

Screenshot_20240228-065624

@MatthewFlamm
Copy link
Contributor

MatthewFlamm commented Feb 28, 2024

This is the method that the documentation used previously, it used all inherited methods in all DataSets, but it led to very long build times and messy documentation.

For example if you searched for threshold you would find UnstructuredGrid.threshold and PolyData.threshold and ...

I don't think this idea is possible in Sphinx, but maybe there is a great plugin. I'd prefer that the methods are all associated with their own class, but inherited methods were linked in sub classes.

Or a list of the inheritance to follow...

@user27182
Copy link
Contributor Author

I'd prefer that the methods are all associated with their own class, but inherited methods were linked in sub classes.

What about exposing :inherited-members: from autodoc ?
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html

621e6b0 tries to add this

@user27182
Copy link
Contributor Author

github-actions preview

@MatthewFlamm
Copy link
Contributor

MatthewFlamm commented Feb 28, 2024

Not sure what the solution here is, but another suggestion: https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html

Edit: A simpler suggestion is :show-inheritance:

@user27182
Copy link
Contributor Author

github-actions preview

@user27182 user27182 marked this pull request as draft February 28, 2024 21:06
@user27182
Copy link
Contributor Author

Marked as draft since it's a bit of a trial and error

Copy link
Contributor

@user27182
Copy link
Contributor Author

user27182 commented Feb 28, 2024

What about exposing :inherited-members: from autodoc ?
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html

621e6b0 tries to add this

Looks like this worked, many methods listed now
https://65dfb1b1016abe7c427345fb--meek-duckanoo-d2f5ec.netlify.app/api/core/_autosummary/pyvista.unstructuredgrid
image

This change impacts pretty much all docs though, not just DataSet.

@user27182
Copy link
Contributor Author

Also, build time was 1h4m, doesn't seem any longer than usual, so not really any impact there with this change

@user27182
Copy link
Contributor Author

Not sure what the solution here is, but another suggestion: https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html

Edit: A simpler suggestion is :show-inheritance:

We could try using this, and also give the inherited methods their own sections. Something like:

UnstructuredGrid
-Inheritance Diagram
-Methods
-Inherited Methods

@user27182
Copy link
Contributor Author

github-actions preview

Copy link
Contributor

@user27182
Copy link
Contributor Author

Edit: A simpler suggestion is :show-inheritance:

Example from Deployed on https://65dff7e140f26caa45a20e47--meek-duckanoo-d2f5ec.netlify.app
image

This is helpful, but will also show inheritance from undocumented classes and vtk classes, and I think only shows immediate parents (e.g. may not show DataSet explicitly for some classes)

I think maybe just separating class-specific methods and properties from inherited ones, e.g. with different sections headings, may be good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Anything related to the documentation/website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose all DataSet methods in documentation
2 participants