Skip to content

Add functionality to convert exodus files to dictionaries#143

Merged
isteinbrecher merged 1 commit into
imcs-compsim:mainfrom
isteinbrecher:exo-to-dict
Jun 19, 2026
Merged

Add functionality to convert exodus files to dictionaries#143
isteinbrecher merged 1 commit into
imcs-compsim:mainfrom
isteinbrecher:exo-to-dict

Conversation

@isteinbrecher

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.py with convert_exodus_to_dict() and moved get_exo_info() there for reuse.
  • Updated YAML comparison in tests to inline converted Exodus mesh data into the STRUCTURE GEOMETRY section when mesh_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.

Comment thread tests/test_cubitpy.py
Comment thread tests/test_cubitpy.py Outdated
Comment thread tests/test_cubitpy.py Outdated
Comment thread src/cubitpy/exodus_utility.py Outdated
Comment thread src/cubitpy/exodus_utility.py Outdated
@isteinbrecher isteinbrecher temporarily deployed to cubit_secrets_trusted June 19, 2026 09:27 — with GitHub Actions Inactive
@isteinbrecher isteinbrecher merged commit 4d0bd8d into imcs-compsim:main Jun 19, 2026
2 checks passed
@isteinbrecher isteinbrecher deleted the exo-to-dict branch June 19, 2026 09:40
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