Func-adl

Latest version: v3.3.1

Safety actively analyzes 642295 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 10

3.0b3

Moved the wrong file

3.0b2

I'd accidentally added a dependency!

3.0b1

Lots of big features. This should be backwards compatible, but there are major upgrades. Hence the change in version number.

New Features:

* It is possible to properly type-hint so that a good editor will be able to understand typing in `func_adl` queries. This makes heavy use of python's `Generic` type as we are often working with streams of objects (like events or jets, etc.).
* Python list comprehensions and generator expressions inside `lambda`'s are now converted to `func_adl` automatically. Ifs and multiple generators are supported.
* Variables referenced inside lambda expressions are now properly captured. So you can parameterize a cut some external variables. Method and attribute and function calls on captured variables are not supported.

New Extensibility Points

* Parameterized method calls are supported. You can write something like `[j.getAttribute[cpp_float]('EMF') for j in jets]` and with the proper support it will generate a C++ template function. The `func_adl` library provides none of the support, but you can use the decorator `func_adl_parameterized_call`
* You can now use the `func_adl_callback` decorator to decorate a class or a method in your type hints file to invoke custom python code as the query is built. This allows extensions, default argument processing, etc. The C++ xAOD backend heavily uses this to implement things like calibration, etc.
* Query Metadata can be attached to an expression. It is stripped out before being sent down to ServiceX. This can be used to cache information that needs to be tracked in a query. The C++ xAOD type system uses this to track calibration configuration.
* MetaData can be sent down to the backend at arbitrary points in the query. This can be used, for example, to declare types to the C++ backend.

Technical Debt:

* Numerous clean ups to the type hinting in the library
* Test coverage improvements, which uncovered some python version incompatibilities (which were fixed).
* Using `black` as the formatted for the repo
* README documentation improvements
* Supporting 3.7 is getting to be work. Python 3.10 is supported.
* Added full support for the type `bool`.

2.4b6

* Object stream's `Where` gets proper type hinting

2.4b4

* `ObjectStream` is now a generic type that will track the type of the object it surrounds
* `EventDataset` is also typed, as a result, and should be declared as such by anyone sub-classing this

This should not break any existing code downstream.

Finally, after years, we are tracking here a typed monad in python!

2.4b3

Slight change to the metadata type info

Page 6 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.