Skip to content

Releases: iris-hep/func_adl

Do not require func-adl.ast in client installs

06 Mar 11:29

Choose a tag to compare

I'd accidentally added a dependency!

Type Hint Support, MetaData, Syntactic Sugar

06 Mar 02:17
752bc91

Choose a tag to compare

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.

Add Python 3.10 Support

09 Dec 17:44

Choose a tag to compare

Python 3.10 is out. This has now been tested with func_adl.

Add type information to Where method

17 Oct 04:58

Choose a tag to compare

Pre-release
  • Object stream's Where gets proper type hinting

Typed Datasets

16 Oct 22:02

Choose a tag to compare

Typed Datasets Pre-release
Pre-release
  • 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!

Type info update

21 Sep 07:01
b9df64d

Choose a tag to compare

Type info update Pre-release
Pre-release

Slight change to the metadata type info

MetaData!

13 Sep 09:00

Choose a tag to compare

MetaData! Pre-release
Pre-release

This time for real

Titles and Dictionaries

12 Aug 22:59
0535266

Choose a tag to compare

  • It is now possible to pass the title metadata through the system. This isn't required, and is helpful for ServiceX - when you want a transform to have a title.
  • Support internal dictionaries. Much like tuples, these can be used to build an EDM and then unbuild them by referencing items in them.
  • Code to allow other libraries to find the event dataset deep in the hierarchy

MetaData!

13 Sep 08:35
0535266

Choose a tag to compare

MetaData! Pre-release
Pre-release
  • Adds the MetaData method to ObjectStream.
  • Adds a function to remove and return all MetaData from an ast.

Support recovering `EventDataset` from deep in hierarchy

06 Aug 02:00

Choose a tag to compare

  • After using the find_EventDataset function, you can look at the _eds_object attribute to recover the original EventDataset object that started the whole query.