Skip to content

Supplement Unit Tests with Property-Based Tests for Grid Utilities and Regridding - #18

Merged
bbakernoaa merged 1 commit into
mainfrom
feature/property-based-tests-regridding-8021962879963081823
Jul 13, 2026
Merged

Supplement Unit Tests with Property-Based Tests for Grid Utilities and Regridding#18
bbakernoaa merged 1 commit into
mainfrom
feature/property-based-tests-regridding-8021962879963081823

Conversation

@bbakernoaa

Copy link
Copy Markdown
Owner

This pull request supplements the unit test suite with high-quality property-based tests under tests/test_property_based.py using Hypothesis.

We test:

  1. create_grid_from_crs properties (shapes, coordinate limits, eager/lazy parity).
  2. create_grid_like properties (eager/lazy template mirroring, coordinate boundaries, bounds).
  3. Regridder self-identity properties across bilinear, nearest_s2d, conservative, and patch methods (by regridding a constant field and ensuring it is perfectly preserved).
  4. Regridder conservative global integral conservation properties (by regridding a random positive field using the conservative method and verifying that the spherical area-weighted global integral is conserved).

All tests utilize actual objects and are verified without mocking esmpy in a real micromamba environment.


PR created automatically by Jules for task 8021962879963081823 started by @bbakernoaa

… regridding properties

- Create property-based tests using Hypothesis for create_grid_from_crs and create_grid_like to check coordinates, monotonicity, boundaries, and eager/lazy parity.
- Add property-based tests to check regridding self-identity (constant value preservation) for all ESMF methods (bilinear, nearest, conservative, patch).
- Add property-based tests to check global integral conservation for conservative regridding, using spherical cell areas under a real ESMF environment.
- Avoid mocking esmpy for any new tests.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@bbakernoaa
bbakernoaa marked this pull request as ready for review July 13, 2026 05:23
@bbakernoaa
bbakernoaa merged commit fbe6170 into main Jul 13, 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