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

fix: support dict-likes in form.from_dict, convert fields to list #2548

Merged
merged 4 commits into from
Jun 27, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jun 27, 2023

ak.forms.RecordForm accepts an iterable for fields, but doesn't canonicalise it. This PR addresses that, and also relaxes the dict requirement in forms.from_dict. This just seems reasonable; it will be a bit slower than checking dict, but I'm hoping this isn't a performance critical path.

@agoose77 agoose77 requested a review from jpivarski June 27, 2023 17:45
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #2548 (3b944e7) into main (f2783ba) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/forms/form.py 82.48% <100.00%> (ø)
src/awkward/forms/recordform.py 89.44% <100.00%> (ø)

@agoose77 agoose77 temporarily deployed to docs-preview June 27, 2023 18:04 — with GitHub Actions Inactive
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.

Both are good, and this is pretty simple, so I'll merge it.

@jpivarski jpivarski merged commit 0901aa4 into main Jun 27, 2023
@jpivarski jpivarski deleted the agoose77/fix-form-fields-list branch June 27, 2023 20:24
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