ExecuteWorkflowRunner#
ExecuteWorkflowRunner with inherited methods#
- class pydidas.apps.ExecuteWorkflowRunner(**kwargs: dict)#
Bases:
QObject
Class to run pydidas workflows from the command line with parallelization.
The WorkflowRunner can be run from the command line and creates and handles a Qt EventLoop for processing.
Parameters are all handled as kwargs to allow argument parsing and arbitrary orders, but an output directory as well as all three of Workflow, Scan, and DiffractionExperiment must be supplied, either through parsed command line arguments or as keyword arguments.
Keyword arguments will override given command line inputs.
- Parameters:
**kwargs (dict) –
Supported keyword arguments are:
- workflowUnion[Path, str, ProcessingTree]
The filename to the workflow or a ProcessingTree instance.
- scanUnion[Path, str, Scan]
The filename to the stored Scan or a Scan instance.
- diffraction_expUnion[Path, str, DiffractionExperiment]
The filename to the stored DiffractionExperiment or a DiffractionExperiment instance. Note that ‘diffraction_experiment’ is also available as alias.
- output_directoryUnion[Path, str]
The directory to write results to.
- verbosebool, optional
Flag to enable printed output message. Do not use this setting for remote processing. The default is False.
- overwritebool, optional
Flag to enable writing of results to existing directories, possibly overwriting existing results. The default is False.
- check_all_args_okay()#
Check that all required (keyword) arguments have been set.
- Raises:
UserConfigError – If the configuration is incomplete or problematic.
- execute_workflow_in_apprunner()#
Execute the given workflow in an AppRunner with a QEventLoop.
- parse_args_for_pydidas_workflow()#
Parse the command line arguments for the run_pydidas_workflow script.
- process_scan(**kwargs: dict)#
Process a scan.
This method will check if new metadata has been provided in the given keywords and will update the stored arguments respectively.
- Parameters:
**kwargs (dict) – The updated keyword arguments. For the full list of supported keyword arguments, please refer to the global class docstring.
- update_contexts_from_stored_args()#
Update the global contexts from the stored arguments.
- update_parsed_args_from_kwargs(**kwargs: dict)#
Update the parsed arguments with the given keyword arguments.
For the specific supported keyword arguments, please check the class definition.
- Parameters:
kwargs (dict) – The dictionary with the user-provided keyword-arguments
- Raises:
UserConfigError – If both the ‘diffraction_experiment’ and ‘diffraction_exp’ keywords are provided.