-
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: ak.with_name #1233
Conversation
@jpivarski Since I believe we changed the printing layout, should the following two test also be updated?:
E assert "<Record {x: 1, y: [1.1]} type='P'>" == '<1 [1.1]>'
E assert '3 * var * var * string' == '3 * var * All["x": float64]' |
Codecov Report
|
In the first one, the custom behavior is supposed to override the The fact that the Point class has a Maybe just skip this one and we'll get back to it in the final clean-up phase. |
As for this one, it looks like something is going terribly wrong. We know that record names are being used in type strings already: >>> ak._v2.highlevel.Array(
... ak._v2.contents.RecordArray([
... ak._v2.contents.NumpyArray([1, 2, 3])],
... ["field"],
... parameters={"__record__": "SeeThisName"},
... )
... )
<Array [{field: 1}, {field: 2}, {field: 3}] type='3 * SeeThisName[field: in...'> and that's what But you're getting a type string that says |
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.
As described above, the tests/v2/test_0049-distinguish-record-and-recordarray-behaviors.py test can be skipped with a note to come back later and implement overridden __repr__
in _prettyprint.valuestr
.
Something wrong is happening in tests/v2/test_0788-indexedarray-carrying-recordarray-parameters.py that will require more investigation.
tests/v2/test_1233-ak-with_name.py should be a clear-cut case. I'm assuming that none of the test failures are due to that one, but I haven't checked.
Thank you for the clarifications! |
That makes sense, actually. Now that you've reminded me of that issue, is one that we should check when something like this happens. (Arrays containing strings may be an easy way to catch "parameters not being passed" bugs.) |
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.
Great! This is all set, so I'll merge it now and it can get included in 1.8.0rc2.
No description provided.