-
Notifications
You must be signed in to change notification settings - Fork 13
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
Pyvista #463
Conversation
WalkthroughThis update introduces a new feature for 3D visualization using the PyVista library. It adds Changes
Uplevel your code reviews with CodeRabbit ProCodeRabbit ProIf you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects. |
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.
Files selected (8)
- dev/pyvista.ipynb (1)
- discretisedfield/field.py (2)
- discretisedfield/mesh.py (1)
- discretisedfield/plotting/init.py (1)
- discretisedfield/plotting/pyvista_field.py (1)
- discretisedfield/plotting/pyvista_mesh.py (1)
- discretisedfield/plotting/pyvista_region.py (1)
- discretisedfield/region.py (1)
Files not summarized due to errors (1)
- dev/pyvista.ipynb (diff tokens exceeds limit)
Files not reviewed due to errors (3)
- discretisedfield/plotting/pyvista_field.py (no response)
- dev/pyvista.ipynb (no response)
- discretisedfield/plotting/init.py (no response)
Review comments generated (14)
- Review: 12
- LGTM: 2
Tips
Chat with CodeRabbit Bot (@coderabbitai
)
- Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
- Invite the bot into a review comment chain by tagging
@coderabbitai
in a reply.
Code suggestions
- The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
- You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.
Pausing incremental reviews
- Add
@coderabbitai: ignore
anywhere in the PR description to pause further reviews from the bot.
if self.mesh.region.ndim != 3: | ||
raise ValueError( | ||
"Only meshes with 3 spatial dimensions can be plotted not" | ||
f" {self.data.mesh.region.ndim=}." | ||
) |
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.
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.
I would agree with the automated check. Why do we need to repeat this check? It should have already been performed when initialising the class.
if self.region.ndim != 3: | ||
raise RuntimeError("Only 3-dimensional regions can be plotted.") |
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.
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.
It seems good to me, no specific typos as well, as per my vague notion of pyvista, code is very well written.
@swapneelap Could you maybe review this so that we can move on. I can have a look at some later point (after merge) as I won't be able to (thoroughly) do this anytime soon. |
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.
Looks OK to me.
@samjrholt Please resolve the issues pointed out by @kzqureshi . Afterwards you can merge unless you think we have to discuss any remaining issues (a few items in the list in the description are not yet ticked). |
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.
Here is a very quick review. General remarks:
- Looks like we use the default pyvista colormaps? I think that is a good decision.
- We should have a (short) documentation notebook. Maybe the dev notebook could be modified for that purpose?
if self.mesh.region.ndim != 3: | ||
raise ValueError( | ||
"Only meshes with 3 spatial dimensions can be plotted not" | ||
f" {self.data.mesh.region.ndim=}." | ||
) |
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.
I would agree with the automated check. Why do we need to repeat this check? It should have already been performed when initialising the class.
Co-authored-by: Martin Lang <[email protected]>
To-do
Client/server renderingpreimage