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

Add pyvista 3 d visualization #48

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

MaHaWo
Copy link

@MaHaWo MaHaWo commented Mar 12, 2025

  • adds the pyvista plotting utilities used in the toy-models notebooks in a generalized way.
    • adds 2 functions: facet_grid_3D and facet_grid_animate_3D which work much like seaborn facetgrid, but as a function instead of a class.
    • add some utilities to make sme output work well with pyvista and for plot layouting
    • add tests
  • encountered problems with Python3.7, and everything below 3.9 is beyond its end of life anyway, therefore I updated the python version tags in the pyproject.toml and the test gh workflow to support python3.9 to 3.13

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 96.05263% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.06%. Comparing base (efd8be9) to head (efee1f6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/sme_contrib/plot.py 95.00% 0 Missing and 2 partials ⚠️
src/sme_contrib/pyvista_utils.py 97.14% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   86.86%   89.06%   +2.20%     
==========================================
  Files           3        4       +1     
  Lines         236      311      +75     
  Branches       36       51      +15     
==========================================
+ Hits          205      277      +72     
  Misses         22       22              
- Partials        9       12       +3     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaHaWo MaHaWo requested a review from lkeegan March 12, 2025 13:02
Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

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

thanks, looks very nice!

it would be great if you could also add an example of using this functionality with sme to the plot notebook (which currently shows how to plot results from a 2d model, it would be nice to have the same for a 3d model with your new plotting functions):

and a related point: it's not immediately clear to me as a user how I should use these functions to plot the simulation results - would it be possible to adjust the API to take a sme.SimulationResult similar to the existing 2d plotting functions? (see e.g.
https://sme-contrib.readthedocs.io/en/latest/_autosummary/sme_contrib.plot.concentration_heatmap.html)

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.

2 participants