-
Notifications
You must be signed in to change notification settings - Fork 89
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
C++ refactoring: reducers #1099
Conversation
@jpivarski - please, have a look. I've added a few |
|
…-> int64 are not done.
for more information, see https://pre-commit.ci
…t-hep/awkward-1.0 into ianna/refactoring-reducers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recognize this is a lot of work, and what's here looks great! I made a few "cleanup" changes to the branch, including a replacement of reducer strings with reducer singleton objects, since you create the objects anyway to give them different apply
methods. (The singletons are implemented as class objects with @classmethods
, so that we can use inheritance, but there's no need to create instances of these classes just to use a stateless function.)
Some of the implementations were missing, and that's surely due to underwhelming test coverage in the original v1 (my fault). I've added the implementations where it was easy and NotImplementedError with the commented-out C++ code where it wasn't. UnionArray can't be done without simplify_uniontype
, so that will have to wait for after this PR, but the others could be done (with added tests, to improve the test coverage).
Instead of commenting out failing tests, I added pytest marks to them, so that they show up in the report. That makes it harder to overlook the fact that they're not done.
The missing implementations are indicated with FIXMEs after their NotImplementedErrors. As stated above, UnionArray should wait until after this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpivarski - I think, most of the comments are addressed. More tests are needed, I'm working on these. I need some guidance on introducing a dimension_optiontype
and an initial
for min
and max
reducers.
@jpivarski - as discussed: coverage for Note, the missing, not covered code in this case is for Windows. Here is the rest: Coverage report: 81%
|
No complaints about the 96%! (I don't think 100% is a goal because of things like the Windows cases. Twisting them to count as covered, for instance with one-line I'm curious about the coverage for the whole |
@jpivarski - apologies, I did not mean to delete your comment I just added a tick mark... |
|
@jpivarski - pre-commit complains about B904: Within an |
This seems to be a new rule, and it pops up in many places. We probably need to just ignore it globally ( |
@jpivarski - I think, I've addressed all issues. Please, have a look. Thanks |
I agree. Looks great, thanks! |
address https://github.com/scikit-hep/awkward-1.0/projects/4#card-68315181