Add experimental XarraySource#1751
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1751 +/- ##
==========================================
+ Coverage 67.43% 67.94% +0.51%
==========================================
Files 168 170 +2
Lines 27947 28498 +551
==========================================
+ Hits 18845 19364 +519
- Misses 9102 9134 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ahuang11
left a comment
There was a problem hiding this comment.
I think to make this work with Lumen (AI part), we'll probably need to base it off BaseSQLSource and https://github.com/alxmrs/xarray-sql, so that AI can write the transforms.
Separately, I think there's a lot of AI things that are undesired, e.g.
This first draft is intentionally conservative:
- accepts an in-memory xarray.Dataset
- exposes Dataset.data_vars as logical tables
- supports coordinate-based filtering via .sel(...)
- returns pandas DataFrames for downstream compatibility
This should be part of your PR description, not docstring.
|
Thanks for the detailed feedback! That makes sense, aligning this with Also noted on keeping the AI behavior minimal and predictable , I’ll avoid adding unnecessary complexity there. And thanks for pointing out the docstring vs PR description , I’ll move that explanation to the PR description and keep the docstrings focused on code-level details. Appreciate the guidance! |
|
Superseded by #1741 |
Summary
This draft PR adds an experimental native
XarraySourcefor xarray-backed datasets.Current MVP scope:
lumen.sources.xarray.XarraySourceDataset.data_varsas logical tablesThis is intended for early design feedback rather than final review.
later improvements
Validation
python -m pytest lumen/tests/sources/test_xarray.py -qRefs #1748