Skip to content

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

@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.58%. Comparing base (efd8be9) to head (9ea64e7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/sme_contrib/plot.py 90.32% 2 Missing and 4 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%   88.58%   +1.72%     
==========================================
  Files           3        4       +1     
  Lines         236      333      +97     
  Branches       36       54      +18     
==========================================
+ Hits          205      295      +90     
- Misses         22       24       +2     
- Partials        9       14       +5     

☔ 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)

@MaHaWo
Copy link
Author

MaHaWo commented Apr 4, 2025

ok, I added wrappers that make it easier to plot concentration images and added some (rudimentary) examples to the notebook along with some descriptive text. The wrapper code should make it clearer how to use the facetgrid functions. I'm currently still trying to get the docs to build on the pipeline...

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.

3 participants