Add functionality to convert exodus files to dictionaries#143
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a small Exodus (netCDF) inspection utility to convert .exo meshes into a Python dictionary so tests can compare Exodus-based meshes structurally (rather than relying on binary .exo equivalence). It also refactors shared Exodus metadata parsing (get_exo_info) into the new utility module and updates the test suite to incorporate this comparison approach.
Changes:
- Added
src/cubitpy/exodus_utility.pywithconvert_exodus_to_dict()and movedget_exo_info()there for reuse. - Updated YAML comparison in tests to inline converted Exodus mesh data into the
STRUCTURE GEOMETRYsection whenmesh_in_exo=True. - Added a new unit test validating exodus-to-dict conversion for a minimal brick mesh.
Reviewed changes
Copilot reviewed 3 out of 8 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
tests/test_cubitpy.py |
Uses exodus-to-dict conversion during YAML comparisons for mesh_in_exo outputs and adds a dedicated test for the conversion. |
src/cubitpy/exodus_utility.py |
New utility module for extracting key Exodus mesh data into a dict for comparisons/tests. |
src/cubitpy/cubit_to_fourc_input.py |
Refactors to import get_exo_info from the new utility module instead of defining it inline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fac4416 to
cf85404
Compare
cf85404 to
62be50b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.