Enhance mesh generation laziness and improve CI configuration - #93
Merged
bbakernoaa merged 3 commits intoMay 9, 2026
Merged
Conversation
Refactored create_mesh_from_coords to use _lazy_arange for the n_pts coordinate, preventing driver-side memory allocation for large meshes. Updated provenance tracking to record backend and extent. Added double-check tests to verify laziness and numerical identity.
…ning - Refactor `create_mesh_from_coords` to use `_lazy_arange` for `n_pts`. - Integrate double-check tests into `tests/test_aero_grid_gen.py`. - Harden CI by updating `ci.yml` with explicit PR types and secure checkout. - Enforce formatting with `ruff`.
- Updated `.github/workflows/ci.yml` to trigger on pushes and PRs for all branches (`*`). - Added `workflow_dispatch` for manual triggering. - Maintained core mesh laziness optimizations and tests in `tests/test_aero_grid_gen.py`.
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.
This pull request introduces improvements to mesh generation and testing for laziness in the
xregridutilities, as well as updates to CI workflow triggers. The most significant changes include enhancements to how chunking is handled increate_mesh_from_coords, new tests for mesh laziness and backend consistency, and expanded CI coverage.Mesh generation and chunking improvements:
create_mesh_from_coordsby ensuring that both integer and dictionary chunk specifications are correctly mapped to then_ptsdimension, and by using a lazy arange for then_ptscoordinate when chunks are provided. [1] [2]Testing enhancements:
test_mesh_laziness_backend_consistencyandtest_mesh_laziness_dict_chunksto verify that mesh generation is consistent between eager and lazy backends, and that chunking (including dict-based chunks) works as expected.tests/test_aero_grid_gen.pyto includecreate_mesh_from_coordsandnumpy.CI workflow improvements:
.github/workflows/ci.ymlto trigger CI on all branches for both push and pull request events, and to support manual workflow dispatch.persist-credentials: falsefor theactions/checkout@v4step to improve security.