||Package with modules for specification and execution of analysis tasks and complex analysis workflows.|
||Module defining basic data structures used by workflows.|
||Package with drivers for analyses and workflows.|
||Module with base classes for workflow drivers.|
||Module used to help with driving the execution of omsi-based analyses.|
||Module used to help with driving the execution of analysis workflows|
||Package with executors of analysis workflows.|
||Module containing base classes for workflow executors.|
||Module used to help with the execution of complex analyses workflows|
Package with modules for specification and execution of analysis tasks and complex analysis workflows.
Module defining basic data structures used by workflows.
RawDescriptionDefaultHelpArgParseFormatter(prog, indent_increment=2, max_help_position=24, width=None)¶
Simple derived formatter class for use with argparse used by the cl_analysis_driver class. This formatter combines the default argparse.ArgumentDefaultsHelpFormatter and argparse.RawDescriptionHelpFormatter for formatting arguments and help descriptions.
Define a python list of analyses to be executed as a workflow. The list allows only for storage of analysis_base objects and ensures uniqueness of elements in the list.
Initialize the set of analysis tasks to be performed as part of the workflow
Parameters: analysis_objects – Set or list of unique analysis objects to be added. Duplicates will be removed.
Same as append
Add all known analyses to the workflow list
Returns: The updated analysis_task_list with all analyses added
Add the dependencies of all analyses to the workflow list in case they are missing.
This function is recursive, step-by-step adding all dependencies of the workflow to the list of tasks to be executed, until no more dependencies are found.
Usually this function is called by the workflow executor itself before running the analysis and should not need to be called by the user.
Returns: Integer indicating the number of dependencies added to the list of tasks
Get an analysis_task_list of all current analysis_base objects
Returns: New analysis_task_list of all current analysis objects
Check whether all identifiers of the analyses in the this list are unique. :return: bool
Add a given analysis to the set of object to be executed by the workflow
This is the same as set.add() but we ensure that only analysis_base objects are added.
Parameters: analysis_object (omsi.analysis.base.analysis_base) – Analysis object to be added to the execution. All dependencies of the analysis will also be executed as part of the execution. Raises: ValueError is raised if the given analysis_object is invalid
Remove all elements from the list
Enable or disable line-by-line profiling of memory usage of execute_analysis.
Parameters: enable_memory (bool) – Enable (True) or disable (False) line-by-line profiling of memory usage Raises: ImportError is raised if a required package for profiling is not available.
Enable or disable profiling of time and usage of code parts of execute_analysis for all analyses.
Parameters: enable (bool) – Enable (True) or disable (False) profiling Raises: ImportError is raised if a required package for profiling is not available.
Same as from_script, but the script is read from the given files.
Parameters: script_files – List of strings with the paths to the script files. If only a single script is used, then a single string may be used as well. Returns: An instance of workflow_base with the specification of the workflow to be executed
Evaluate the workflow script to extract all analyses to be run.
NOTE: This function executes using eval(..), i.e., there are NO safeguards against malicious codes.
Parameters: scripts – The script with the setup of the workflow. This should only include the definition of analyses and their inputs. Returns: An instance of workflow_base with the specification of the workflow to be executed
Compute a list of all dependencies of the current list of analyses (excluding analyses that are already in the the list of tasks.
Returns: analysis_task_list of all analysis dependencies
Get a list of all output data objects for all analysis
Returns: List of omsi.analysis.analysis_data.analysis_data objects, one for each analysis
Get a list of all analysis identifiers
Returns: List of strings with the analysis identifier of each analysis
Get the complete list of all direct and indirect dependencies of all analysis tasks.
NOTE: These are only the direct dependencies as specified by the analysis itself. Use get_all_dependency_data_recursive(..) to also get the indirect dependencies of the analysis due to dependencies of the dependencies themselves.
Returns: List of parameter_data objects that define dependencies.
Get the complete list of all parameters
Parameters: exclude_dependencies – Boolean indicating whether we should exclude parameters that define dependencies from the list Returns: List of omsi.analysis.analysis_data.parameter_data objects with the description of the parameters
Get a list of dict with the complete info about the last run of each of the analysis analysis
Returns: List of run_info_dict objects, one for each analysis
Insert a given analysis object at the given location
- index – Location where the obejct should be inserted
- analysis_object – The analysis object to be inserted
Update analysis identifiers to be unique.
Side effects: This function updates the analysis tasks stored in the set
Returns: self, i.e., the modified object with identifiers updated
Check that all analysis descriptors are set to a value different than “undefined” and set the descriptor based on their index in the list if necessary.
Return the set with elements added from the given set of analysis_objects.
This is the same as set.update() but we ensure that only analysis_base objects are added.
Parameters: analysis_objects – List or set of analysis_base objects to be added to workflow set Raise: ValueError is raised in case that objects that are not instances of analysis_base are to be added. Returns: self with elements added to self.