iris-hep/func_adl

Allow object and function extensability

Closed this issue · 0 comments

As a user, I'd like to write

     .Select(lambda event: event.Jets()

And:

  • Any definition code for jets will be downloaded
  • It will be possible to make a correction
  • A default jet type will be used (and in the qastle), and any default keyword arguments will also work.
  • Corrections could be applied (depending on arguments, etc.)

And further, this is part of a definition in the type system so type completion works.

I'd like to also be able to write

    .Select(lambda event: DoIt(event))

And have a way for anyone to inject something into the stream or modify things... the main target for this is being able to have an arbitrary C++ function for the backend, but it should be much more general at this level.

Progress

  • Type-based call back of function to modify ast
  • Type-based call back of function to modify the ObjectStream
  • Type-based call back of function inspects arguments and modifes the ast and what is downloaded depending.
  • Define a function like DoIt above, in some "easy" way (decorator?)
  • Default arguments handled in both cases
  • Keyword arguments handled in both cases
  • Documentation in the README
  • Documentation in the function headers