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

refactor: remove kind and order args to sorting protocols #2090

Merged
merged 2 commits into from
Jan 12, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jan 8, 2023

The sort and argsort internal Content protocols don't actually use the kind or order arguments. Awkward instead uses stable to determine the sorting algorithm used. This PR removes those unused arguments.

@agoose77 agoose77 requested a review from ianna January 8, 2023 00:57
@codecov
Copy link

codecov bot commented Jan 8, 2023

Codecov Report

Merging #2090 (524f1a4) into main (6efa287) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/contents/content.py 73.13% <ø> (ø)
src/awkward/_do.py 84.30% <100.00%> (ø)
src/awkward/contents/bitmaskedarray.py 68.02% <100.00%> (ø)
src/awkward/contents/bytemaskedarray.py 88.80% <100.00%> (ø)
src/awkward/contents/emptyarray.py 72.22% <100.00%> (ø)
src/awkward/contents/indexedarray.py 77.66% <100.00%> (ø)
src/awkward/contents/indexedoptionarray.py 88.67% <100.00%> (ø)
src/awkward/contents/listarray.py 90.08% <100.00%> (ø)
src/awkward/contents/listoffsetarray.py 80.11% <100.00%> (ø)
src/awkward/contents/numpyarray.py 91.19% <100.00%> (ø)
... and 4 more

@agoose77 agoose77 temporarily deployed to docs-preview January 8, 2023 01:15 — with GitHub Actions Inactive
@agoose77
Copy link
Collaborator Author

agoose77 commented Jan 9, 2023

I've requested from @jpivarski too, because his comments on #2089 suggest that we might want to redefine our sorting API arguments.

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.

This is related to, but independent of, #2112. This argument list is a relic of when ak.sort's arguments were more different from np.sort than they are now.

@jpivarski
Copy link
Member

I'll be merging it without an explicit approval from @ianna. We were talking about the sort arguments today, and this is a detail of what we had agreed to.

@jpivarski jpivarski enabled auto-merge (squash) January 12, 2023 19:23
@jpivarski jpivarski temporarily deployed to docs-preview January 12, 2023 19:36 — with GitHub Actions Inactive
@jpivarski jpivarski merged commit 7f5d40b into main Jan 12, 2023
@jpivarski jpivarski deleted the agoose77/refactor-remove-unused-args branch January 12, 2023 19:46
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