-
Notifications
You must be signed in to change notification settings - Fork 0
Get DS file structure with serviceX tool #4
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
Conversation
This is my first attempt at building this feature, and initially, I didn't expect to reconstruct For eg, should I use Should I write a simpler |
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.
Ok - nice! I like this and this is going to be very useful. I agree with your comment about simplifying things. Here is what I think should be done:
- Use
json
(with the built injson
module) to generate the output on ServiceX - Use the
json
module to parse it up on the client.
This should significantly simplify the code - the json
builtin parser is basically bullet proof. Once that is done, then how the downstream things work can probably be significantly simplified.
Ready to be merged, please add other comments if you have some. |
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.
Looks great!
New function:
get_structure
ak.array
an str encoding the file structureservicex.deliver
callsamples-structure.txt
ak.array
from the encoded str and returns the type constructorThe function can be called from the terminal:
servicex-get-structure
Options are added to save to .txt, load a single or multiple DS, write all DS in a .json to be loaded by the command.
Many helpers were added for this feature,
run_query
,build_deliver_spec
,print_structure_from_str
,parse_jagged_depth_and_dtype
,str_to_array
,run_from_command