-
Notifications
You must be signed in to change notification settings - Fork 441
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 OpenFOAM example to reuse Reader #2530
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2530 +/- ##
==========================================
- Coverage 93.72% 93.72% -0.01%
==========================================
Files 75 75
Lines 16116 16120 +4
==========================================
+ Hits 15105 15108 +3
- Misses 1011 1012 +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
One barely related thing I noticed: in the built example some names get intersphinx links:
filename
links to stdlib str
which is fair enough. But pyvista.OpenFOAMReader
links to abc.ABC
which is not very helpful. Do you think we should try to investigate this?
Other objects in the pyvista namespace are not linked in code blocks. This makes me suspect that the linking will look backwards into the inheritance until it finds a valid hit, in this case |
Is there a way to get the linking to work for PyVista classes? |
I have no idea what component is doing this, then again I don't really know sphinx or numpydoc. I tried an extension in #1845 but that didn't really go anywhere. |
I wonder what happens if we add |
🙃 . I can't find any of this linking in code blocks in the docstring examples. It seems to be contained in the examples section. I think that the examples are created before the package documentation, so this might be the root cause? |
Good point, that might be it. Out of curiosity I'll see what happens if I try to add the intersphinx mapping from dev.pyvista.org. I expect our regular links to break (be redirected to dev.pyvista.org). I think the feature we see is "global variable inspection" from |
There is also this section, but it is not explicitly configured here. https://sphinx-gallery.github.io/stable/configuration.html#add-intersphinx-links-to-your-examples |
I could only find this related issue/feature request, concerning interconnected libraries. One workaround mentions building HTML twice but that* doesn't seem to help for me. I don't know if something like sphinx-doc/sphinx#3426 (comment) could work. *I should clarify that I literally just tried |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. LGTM.
For the record I deleted all of |
Overview
#2485 fixed OpenFOAMReader to be able to reuse the reader object for time steps. This PR updates the example to take advantage of this.