-
Notifications
You must be signed in to change notification settings - Fork 71
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
Adding a AwkwardForth based ROOT reader to uproot4 #610
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…to aryan-forth-reader
for more information, see https://pre-commit.ci
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'm not going to merge this now; it involves a lot of changes to the read
methods. There are a lot of read
methods in the Uproot codebase—adding all of this to each one of them would add a lot of complexity.
There should be a way to generalize what you've done with these two read
methods (on AsVector
and AsString
) so that it's less invasive. Somehow, the code that performs this logic should be mostly outside of read
, maybe something that's just called.
src/uproot/_awkward_forth.py
Outdated
""" | ||
|
||
|
||
class forth_obj: |
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.
PEP8 class names: forth_obj
→ ForthObj
.
src/uproot/_awkward_forth.py
Outdated
|
||
class forth_obj: | ||
""" | ||
Util class for holding information related to Forth code generation. |
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.
Util class for holding information related to Forth code generation. | |
This class is passed through the Forth code generation, collecting Forth snippets and concatenating them at the end. |
src/uproot/_awkward_forth.py
Outdated
|
||
|
||
class _PreReadDoneError(Exception): | ||
pass |
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.
class _PreReadDoneError(Exception): | |
pass |
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.
Because it's no longer used.
src/uproot/containers.py
Outdated
@@ -11,10 +11,12 @@ | |||
import struct | |||
import types | |||
from collections.abc import KeysView, Mapping, Sequence, Set, ValuesView | |||
from re import L # noqa : F401 |
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.
from re import L # noqa : F401 |
Not used.
src/uproot/containers.py
Outdated
|
||
import numpy | ||
|
||
import uproot | ||
from uproot.deserialization import DeserializationError # noqa : F401 |
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.
from uproot.deserialization import DeserializationError # noqa : F401 |
src/uproot/containers.py
Outdated
# def descent(self, context): | ||
|
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.
# def descent(self, context): |
Don't leave in commented-out code.
src/uproot/containers.py
Outdated
isinstance( | ||
forth_obj.aform, | ||
(awkward.layout.NumpyArray,), | ||
) |
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.
This code doesn't do anything.
Also, if aform
is really a Form, it can never have type NumpyArray
.
…to aryan-forth-reader
for more information, see https://pre-commit.ci
…to aryan-forth-reader
for more information, see https://pre-commit.ci
@all-contributors please add @aryan26roy for code |
I've put up a pull request to add @aryan26roy! 🎉 |
Is this superseded by #644? If so, let's close the old ones so that I don't get confused about which one to look at. |
No description provided.