Skip to content

Enhance mesh generation laziness and improve CI configuration - #93

Merged
bbakernoaa merged 3 commits into
NOAA-EMC:mainfrom
bbakernoaa:aero-mesh-laziness-opt-14265353388921652757
May 9, 2026
Merged

Enhance mesh generation laziness and improve CI configuration#93
bbakernoaa merged 3 commits into
NOAA-EMC:mainfrom
bbakernoaa:aero-mesh-laziness-opt-14265353388921652757

Conversation

@bbakernoaa

Copy link
Copy Markdown
Collaborator

This pull request introduces improvements to mesh generation and testing for laziness in the xregrid utilities, as well as updates to CI workflow triggers. The most significant changes include enhancements to how chunking is handled in create_mesh_from_coords, new tests for mesh laziness and backend consistency, and expanded CI coverage.

Mesh generation and chunking improvements:

  • Improved the handling of chunking in create_mesh_from_coords by ensuring that both integer and dictionary chunk specifications are correctly mapped to the n_pts dimension, and by using a lazy arange for the n_pts coordinate when chunks are provided. [1] [2]

Testing enhancements:

  • Added new tests test_mesh_laziness_backend_consistency and test_mesh_laziness_dict_chunks to verify that mesh generation is consistent between eager and lazy backends, and that chunking (including dict-based chunks) works as expected.
  • Updated imports in tests/test_aero_grid_gen.py to include create_mesh_from_coords and numpy.

CI workflow improvements:

  • Updated .github/workflows/ci.yml to trigger CI on all branches for both push and pull request events, and to support manual workflow dispatch.
  • Set persist-credentials: false for the actions/checkout@v4 step to improve security.

bbakernoaa added 3 commits May 9, 2026 02:53
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`.
@bbakernoaa
bbakernoaa merged commit c872d8c into NOAA-EMC:main May 9, 2026
3 checks passed
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.

1 participant