-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: return proxy of attrs, behavior; dak.from_awkward correctly sets attrs #448
Conversation
So I can only add attrs to an awkward array and then make a dask-awkward array from that? This probably breaks nanoevents? |
yep:
|
You can still override attrs of a dask_awkward array, but it's harder to do. You just copy the |
Ah, indeed I can see a few work arounds. I'll confirm one in an hour or so. |
Yep - all good - simple work around found. |
based on conversation this morning it seemed that this is good to go? |
(test coverage would be nice) |
@douglasdavis yes this is fine from my end |
cfd9289
to
c2d5c43
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #448 +/- ##
==========================================
+ Coverage 93.10% 93.17% +0.07%
==========================================
Files 23 23
Lines 3293 3298 +5
==========================================
+ Hits 3066 3073 +7
+ Misses 227 225 -2 ☔ View full report in Codecov by Sentry. |
@martindurant let me know if this is sufficient for tests, otherwise I think this one is good to go. Thanks in advance for the review. |
@martindurant fixing a few things has led to scope creep of this PR... 🤷 Anyway it's ready for another look. |
Closes #447 by making
.attrs
and.behavior
read-only. This addresses a confusing part of the API: currently these are writeable, but the underlying compute does not share the results of mutating attrs or behavior.If we need to, we can add a
dask_awkward.with_attrs
to add a mechanism of mutating these objects. I'm not sure what the ramifications of this PR will be — we may internally be expecting to pass around the true attrs dicts, which would be broken by this change.