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

Remove documentation for widget helper #2570

Merged
merged 2 commits into from
May 25, 2022
Merged

Conversation

akaszynski
Copy link
Member

Address @adeak's note in #2569 to remove documentation for the widget helper.

@github-actions github-actions bot added the documentation Anything related to the documentation/website label May 6, 2022
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #2570 (adf4175) into main (e37b5b4) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2570      +/-   ##
==========================================
- Coverage   93.72%   93.70%   -0.02%     
==========================================
  Files          75       75              
  Lines       16153    16180      +27     
==========================================
+ Hits        15139    15162      +23     
- Misses       1014     1018       +4     

Comment on lines 44 to 56
Widget API
----------
The :class:`pyvista.Plotter` class inherits all of the widget methods in
:class:`pyvista.WidgetHelper`, so all of the following methods
are available from any PyVista plotter.

.. currentmodule:: pyvista

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst

WidgetHelper
Copy link
Member

@adeak adeak May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, I think we could still leave a note here mentioning widgets, pointing users to the Widgets section of the examples.

Secondly, there are a bunch of examples that reference WidgetHelper.* methods:

$ git grep WidgetHelper examples/
examples/03-widgets/box-widget.py::func:`pyvista.WidgetHelper.add_box_widget` and
examples/03-widgets/box-widget.py::func:`pyvista.WidgetHelper.clear_box_widgets` methods respectively.
examples/03-widgets/box-widget.py::func:`pyvista.WidgetHelper.add_mesh_clip_box` method.
examples/03-widgets/checkbox-widget.py:See :func:`pyvista.WidgetHelper.add_checkbox_button_widget` for more details.
examples/03-widgets/line-widget.py::func:`pyvista.WidgetHelper.add_line_widget` and
examples/03-widgets/line-widget.py::func:`pyvista.WidgetHelper.clear_line_widgets` methods respectively.
examples/03-widgets/plane-widget.py::func:`pyvista.WidgetHelper.add_plane_widget` and
examples/03-widgets/plane-widget.py::func:`pyvista.WidgetHelper.clear_plane_widgets` methods respectively.
examples/03-widgets/slider-bar-widget.py::func:`pyvista.WidgetHelper.add_slider_widget` and
examples/03-widgets/slider-bar-widget.py::func:`pyvista.WidgetHelper.clear_slider_widgets` methods respectively.
examples/03-widgets/slider-bar-widget.py:# :func:`pyvista.WidgetHelper.add_mesh_threshold` method which leverages the
examples/03-widgets/sphere-widget.py::func:`pyvista.WidgetHelper.add_sphere_widget` and
examples/03-widgets/sphere-widget.py::func:`pyvista.WidgetHelper.clear_sphere_widgets` methods respectively.
examples/03-widgets/spline-widget.py::func:`pyvista.WidgetHelper.add_spline_widget` and
examples/03-widgets/spline-widget.py::func:`pyvista.WidgetHelper.clear_spline_widgets` methods respectively.
examples/03-widgets/spline-widget.py::func:`pyvista.WidgetHelper.add_mesh_slice_spline`.

These should point to the corresponding Plotter methods.

Thirdly, there's something weird with the build docs. When I click the main "Plotting" index in the sidebar, this is what the sidebar looks like:
Screenshot from 2022-05-07 12-09-18
"Charts" followed by "Convenience functions" as it should be.

But when I then click on the "Plotting" or "Pyvista and PyQt" submenu, I see this:
Screenshot from 2022-05-07 12-10-32
Note that pyvista.WidgetHelper reappeared.

I can't see what's causing this and it smells like a bug. git grep WidgetHelper doesn't show anything weird. Any chance that some cache (partial clean) is somehow interfering from an earlier build? It might just be a side-effect from my second point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First and second points fixed in adf4175.

Third point can't be reproduced on my end after running a full clean build locally.

Copy link
Member

@adeak adeak May 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot to specify that I see that weird behaviour using the CI build artifact.

Might just be fixed with the new changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot to specify that I see that weird behaviour using the CI build artifact.

I don't think it will. The issue is that our cache will only update pages that have changed, and while the links themselves will have changed on the pages that have been updated, the links on the pages that have not been updated won't.

We can reset the cache or just accept that it's fine as-as for the moment.

@akaszynski akaszynski merged commit c78438f into main May 25, 2022
@akaszynski akaszynski deleted the docs/remove_widgethelper_docs branch May 25, 2022 16:29
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.

None yet

2 participants