You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+88-3Lines changed: 88 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,96 @@ and returns them in a columnar format. It is currently used as a central part of
14
14
This is the base package that has the backend-agnostic code to query hierarchical data. In all likelihood you will want to install
15
15
one of the following packages:
16
16
17
-
- func_adl.xAOD: for running on an ATLAS experiment xAOD file hosted in ServiceX
17
+
- func_adl_xAOD: for running on an ATLAS & CMS experiment xAOD file hosted in ServiceX
18
+
- func_adl_uproot: for running on flat root files
18
19
- func_adl.xAOD.backend: for running on a local file using docker
19
20
20
-
See the documentation for more information.
21
+
See the documentation for more information on what expressions and capabilities are possible in each of these backends.
22
+
23
+
## Extensibility
24
+
25
+
There are two several extensibility points:
26
+
27
+
-`EventDataset` should be sub-classed to provide an executor.
28
+
-`EventDataset` can use Python's type system to allow for editors and other intelligent typing systems to type check expressions. The more type data present, the more the system can help.
29
+
- It is possible to insert a call back at a function or method call site that will allow for modification of the `ObjectStream` or the call site's `ast`.
- When the `.value()` method is invoked, the `execute_result_async` with a complete `ast` representing the query is called. This is the point that one would send it to the backend to actually be processed.
52
+
- Normally, the constructor of `events` would take in the name of the dataset to be processed, which could then be used in `execute_result_async`.
53
+
54
+
### Typing EventDataset
55
+
56
+
A minor change to the declaration above, and no change to the query:
- Editors that use types to give one a list of options/guesses will now light up as long as they have reasonable type-checking built in.
82
+
- If a required argument is missed, an error will be generated
83
+
- If a default argument is missed, it will be automatically filled in.
84
+
85
+
It should be noted that the type and expression follower is not very sophisticated! While it can follow method calls, it won't follow much else!
86
+
87
+
### Type-based callbacks
88
+
89
+
By adding a function and a reference in the type system, arbitrary code can be executed during the traversing of the `func_adl`. Keeping the query the same and the `events` definition the same, we can add the info directly to the python type declarations:
- When the `.Jets()` method is processed, the `add_md_for_type` is called with the current object stream and the ast.
104
+
-`add_md_for_type` here adds metadata and returns the updated stream and ast.
105
+
- Nothing prevents the function from parsing the AST, removing or adding arguments, adding more complex metadata, or doing any of this depending on the arguments in the call site.
21
106
22
107
## Development
23
108
24
-
After a new release has been built and passes the tests you can release it by creating a new release on `github`. An action that runs when a release is "created" will send it to `pypi`.
109
+
After a new release has been built and passes the tests you can release it by creating a new release on `github`. An action that runs when a release is "created" will send it to `pypi`.
0 commit comments