-
blockPrint
()[source] Disable printing to stdout
-
check_valid_dimension
(dim, prev_list)[source] Check the dimension is within the correct range
-
convert_multi_params
(param_name, value)[source] Check if value is a multi parameter and check if each item is valid. Change from the input multi parameter string to a list
- Parameters
param_name – Name of the parameter
value – Parameter value
- Returns
List or unchanged value
-
create_dir
(file_path)[source] Check if directories provided exist at this file path. If they don’t create the directories.
-
dawn_compatible
(plugin_output_type=2)[source]
-
enablePrint
()[source] Enable printing to stdout
-
get_plugin
(plugin_name, params, exp, check=False)[source] Get an instance of the plugin class and populate default parameters.
- Parameters
plugin_name (str.) – Name of the plugin to import
- Returns
An instance of the class described by the named plugin.
-
get_plugins_paths
(examples=True)[source] This gets the plugin paths, but also adds any that are not on the pythonpath to it.
-
get_tools_class
(plugin_tools_id, cls=None)[source] Load the plugin tools class
- Parameters
plugin_tools_id – plugin tools module name
cls – Class to initialise
- Returns
-
indent
(text, indent_level=1)[source]
-
indent_multi_line_str
(text, indent_level=1, justify=False)[source]
-
is_slice_notation
(value)[source] Return True if the value is made up of multiple
-
is_template_param
(param)[source] Identifies if the parameter should be included in an input template and returns the default value of the parameter if it exists.
-
load_class
(name, cls_name=None)[source] Returns an instance of the class associated with the module name.
- Parameters
name – Module name or path to a module file
- Returns
An instance of the class associated with module.
-
param_to_str
(param_name, keys)[source] Check the parameter is within the provided list and return the string name.
-
parse_array_index_as_string
(string)[source]
-
parse_config_string
(string)[source]
-
plugin_loader
(exp, plugin_dict, check=False)[source]
-
register_plugin
(clazz)[source] decorator to add plugins to a central register
-
set_order_by_visibility
(parameters, level=False)[source] Return an ordered list of parameters depending on the visibility level
- Parameters
parameters – The dictionary of parameters
level – The visibility level
- Returns
An ordered list of parameters
-
sort_alphanum
(_list)[source] Sort list numerically and alphabetically While maintaining original list value types
- Parameters
_list – Input list to be sorted
- Returns
List sorted by number and letter alphabetically