Skip to content

Prototype for a renewed Python Configurables implementation

Marco Clemencic requested to merge clemenci/Gaudi:new-config into master

The goal of this MR is to try to clean up the implementation of Python Configurables, at the same time improving and making more flexible the implementation of properties semantics. In particular I introduced:

  • strict and configurable validation of property values
  • possibility of implementing custom semantics
    • as an example I have a semantics equivalent to that of ToolHandles using only Property<string>, but that can check for the interfaces that an AlgTool must implement (the idea is to change the way ToolHandle maps to Python so that it can use directly the new semantics)
    • just changing the Property initialization arguments, I managed to git to ApplicationMgr.TopAlg a semantics equivalent to an array of algorithms (without the need of implementing AlgHandleArray)
  • support for Python 3 (the code is fully tested with Python 2.7 and 3.7)
  • when explicitly enabled named singletons are still allowed and used, but not by default (you need to give an algorithm a name to have it configured, but it must be named explicitly)
  • when the named singletons are not enabled (default), one can invoke gaudirun.py passing the id of a function or a callable (in the form of package.module:function) returning a list or dictionary of Configurable instanceses

The new configurables can be used at the same time as the old ones, as long as there are no conflict in the settings.

Edited by Marco Clemencic

Merge request reports

Loading