Skip to content

Remove need for users to specify default public tools

Sascha Stahl requested to merge rework_public_tools into master

The MR introduces an extra property for the options object which allows to store the public tools to be configured.

The main point is that default public tools are defined, so that the same line is not needed in every script.

The usage is as follows:

from Moore import options
from PyConf.Tools import MyTool, MyTool2
my_pub_tool = MyTool(public=True)
my_pub_tool_2 = MyTool2(public=True)

options.public_tools =+ [my_pub_tool] # appends to default public tools
options.public_tools = [my_pub_tool, my_pub_tool_2] # overwrites default public tools and only configures these two

run_moore(options)

The old way of giving the tools to run_moore is kept for backwards compatibility with a deprecation warning.

TODO: Discuss if it is not better to simplify define default parameters for run_moore or run_reconstruction like

def run_moore(options,
              make_streams=None,
              custom_public_tools=get_default_public_tools(),
              allen_hlt1=False)
Edited by Sascha Stahl

Merge request reports