Backend-Agnostic Computation Refactor - #15
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Replace unused cubed import with importlib.util.find_spec in tests - Apply project-wide ruff formatting and lint fixes - Ensure compliance with Aero Protocol validation standards
- Added _compute_lazy_aware to src/xregrid/utils.py to handle Dask/Cubed/NumPy - Refactored create_grid_like to use the new utility - Refactored Regridder._detect_periodicity to use the new utility - Updated is_cubed to handle containers and __array_namespace__ - Added tests/test_aero_compute_agnostic.py for verification - Fixed linting and formatting issues project-wide
|
@jules micromamba run -n xregrid-env pre-commit run --all-files
1 file reformatted, 42 files left unchanged generate-requirements....................................................Passed |
This PR introduces a centralized utility
_compute_lazy_awareinsrc/xregrid/utils.pyto handle backend-agnostic computation for Dask and Cubed objects. This refactor removes hardcodeddask.computecalls increate_grid_likeandRegridder._detect_periodicity, improving flexibility and adherence to the Aero Protocol. A new test suitetests/test_aero_compute_agnostic.pyverifies the implementation across multiple backends.PR created automatically by Jules for task 1329148488613575660 started by @bbakernoaa