exopy.tasks.utils.building module¶
This module implements command handler related to building tasks.
-
exopy.tasks.utils.building.
create_task
(event)[source]¶ Open a dialog to include a task in a task hierarchy.
This function is meant to be used as a Command handler. Parameters are passed through the parameters attributes of the event object.
- Parameters
parent_ui (optional) – Optional parent widget for the dialog.
future_parent (
BaseTask
) – Future parent of the taskReturns –
------- –
task (
BaseTask
) – Task selected by the user to be added to a hierarchy.
-
exopy.tasks.utils.building.
build_task_from_config
(config, build_dep, as_root=False)[source]¶ Rebuild a task hierarchy from a dictionary.
- Parameters
- Returns
task – Newly built task.
- Return type
BaseTask
- Raises
RuntimeError : – Raised if a dependency cannot be collected.
-
exopy.tasks.utils.building.
build_root
(event)[source]¶ Create a new RootTask.
This function is meant to be used as a Command handler. Parameters are passed through the parameters attributes of the event object.
- Parameters
mode (
{'from config', 'from template'}
) – Whether to use the given config, or look for one in templates or a file.config (
configobj.Section
) – Object holding the informations necessary to build the root task.widget (optional) – Optional parent widget for the dialog (‘from template’ mode only).
build_dep (optional) – Optionnal dict containing the build dependencies.
Returns –
------- –
task (
RootTask
) –