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

Update docs with interactive examples #136

Merged
merged 6 commits into from
Dec 24, 2023
Merged

Update docs with interactive examples #136

merged 6 commits into from
Dec 24, 2023

Conversation

banesullivan
Copy link
Contributor

@banesullivan banesullivan commented Dec 23, 2023

I think this is all that is needed to resolve #133 -- at least its working locally for me. I suspect we might need to add other dependencies though? Let's see if CI is happy

I also changed the API docs so that that the long function names weren't appearing in the navbar

@banesullivan
Copy link
Contributor Author

@MatthewFlamm, one suggestion I have is to turn on edge visibility in the global theme for the docs here. I think it helps alot to show the cell edges and where the sampled points lie with respect to the cells and their resolution

doc/conf.py Outdated Show resolved Hide resolved
@MatthewFlamm
Copy link
Owner

Thanks! This still isn't working for me, at least on a codespaces container, but maybe there is some additional port forwarding I need to do. I won't have a local machine for testing for awhile. I did:

pip install -r requirements-doc.txt
cd doc
make html
make serve-html

doc/conf.py Outdated Show resolved Hide resolved
requirements-doc.txt Show resolved Hide resolved
Copy link

codecov bot commented Dec 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2cea6be) 99.13% compared to head (0bd8cfc) 99.13%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #136   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files           5        5           
  Lines         345      345           
=======================================
  Hits          342      342           
  Misses          3        3           

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

@MatthewFlamm
Copy link
Owner

I had tested that installing all the PyVista requirements for documentation worked. I tried uninstalling those and then added sphinx-toolbox back and it worked. But, there must be some sub-dependency that is also required as just adding sphinx-toolbox does not work for me.

I can confirm that serving the html from codespaces works as expected.

@MatthewFlamm
Copy link
Owner

Some dependency, or dependencies, of jupyterlab are required. I don't think jupyterlab itself is required as I had uninstalled it originally and it had worked. But it is probably easiest just to keep that top level dependency for now.

Copy link
Owner

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@MatthewFlamm MatthewFlamm merged commit e2db724 into MatthewFlamm:main Dec 24, 2023
11 checks passed
@MatthewFlamm
Copy link
Owner

Coming back to this, I pushed the changes to GitHub Pages, so this is now live. It looks great. Thanks for your help on this again! I also switched over to using sphinx-gallery for most of the heavy lifting as the ability to mix plots and code output with preserving state across blocks is really useful.

I had to revamp the examples to use glyphs for spheres as pv.add_points(mesh, render_points_as_spheres=True) leads to spheres that stay constant size with respect to the viewport rather than the mesh. The interactive plots didn't work well in that case.

@banesullivan
Copy link
Contributor Author

Thanks for pointing that out! I too have come back to this PR a few times to see how its done to repeat in work like bjlittle/geovista#632. We really ought to better document this in PyVista

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.

Use the new PyVista sphinx directives for interactive plots in the documentation?
2 participants