Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add recursive argument to expected_from_buffers #2724

Merged
merged 5 commits into from
Oct 3, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Sep 26, 2023

In the work to support buffer-shape touching in dask-awkward, I found it useful to be able to disable recursion in expected_from_buffers in order to identify the buffers associated directly with each form node. I think this has merit, so I've created this PR.

@agoose77 agoose77 temporarily deployed to docs-preview September 26, 2023 20:46 — with GitHub Actions Inactive
@agoose77 agoose77 force-pushed the agoose77/feat-expected-from-buffers-recursive branch from 56c1a1c to 98ab307 Compare September 26, 2023 21:22
@agoose77 agoose77 temporarily deployed to docs-preview September 26, 2023 21:38 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #2724 (5eb02cd) into main (6dc52cc) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is 87.50%.

❗ Current head 5eb02cd differs from pull request most recent head 26f8931. Consider uploading reports for the commit 26f8931 to get more accurate results

Additional details and impacted files
Files Coverage Δ
src/awkward/forms/bitmaskedform.py 83.92% <100.00%> (+0.14%) ⬆️
src/awkward/forms/bytemaskedform.py 85.84% <100.00%> (+0.13%) ⬆️
src/awkward/forms/emptyform.py 86.86% <ø> (ø)
src/awkward/forms/form.py 82.12% <100.00%> (ø)
src/awkward/forms/indexedform.py 80.17% <100.00%> (+0.17%) ⬆️
src/awkward/forms/indexedoptionform.py 89.71% <100.00%> (+0.09%) ⬆️
src/awkward/forms/listform.py 79.13% <100.00%> (+0.18%) ⬆️
src/awkward/forms/listoffsetform.py 94.33% <100.00%> (+0.05%) ⬆️
src/awkward/forms/numpyform.py 83.72% <ø> (ø)
src/awkward/forms/recordform.py 90.55% <100.00%> (+0.05%) ⬆️
... and 3 more

@agoose77 agoose77 temporarily deployed to docs-preview September 27, 2023 20:36 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview September 27, 2023 21:34 — with GitHub Actions Inactive
@agoose77 agoose77 force-pushed the agoose77/feat-expected-from-buffers-recursive branch from 814ea10 to 5eb02cd Compare September 29, 2023 10:49
@agoose77 agoose77 temporarily deployed to docs-preview September 29, 2023 11:03 — with GitHub Actions Inactive
@agoose77 agoose77 marked this pull request as ready for review October 3, 2023 14:25
@agoose77 agoose77 requested a review from jpivarski October 3, 2023 14:25
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any examples in this PR in which the new recursive argument gets used, but in principle it could be useful to have.

The default should be recursive=True, as you have it here, since its primary use-case is to find out what the containers needs to have, and that's a question for a whole tree, not a single node.

@agoose77
Copy link
Collaborator Author

agoose77 commented Oct 3, 2023

I don't see any examples in this PR in which the new recursive argument gets used, but in principle it could be useful to have.

The test file uses both variations :)

@agoose77 agoose77 enabled auto-merge (squash) October 3, 2023 15:20
@agoose77 agoose77 temporarily deployed to docs-preview October 3, 2023 15:32 — with GitHub Actions Inactive
@agoose77 agoose77 merged commit 5130158 into main Oct 3, 2023
35 checks passed
@agoose77 agoose77 deleted the agoose77/feat-expected-from-buffers-recursive branch October 3, 2023 15:33
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.

2 participants