configuration package

Submodules

configuration.settings module

Settings loader module.

This module contains the classes to read the different formats of the configuration files.

The configuration files are composed by paths to the files and properties. There are several common properties for all the building blocks.

Syntax:
  • property (dataType) - (Default value) Short description.

Available Workflow properties:
  • working_dir_path (str) - (Current working dir) Workflow output directory.

  • can_write_console_log (bool) - (True) Output log to console.

  • restart (bool) - (False) Do not execute steps if output files are already created.

  • remove_tmp (bool) - (True) Remove temporal files.

Available common step properties: (Each Biobb step also has their specific properties)
  • can_write_console_log (bool) - (True) Overwrite can_write_console_log workflow property on this step.

  • restart (bool) - (False) Overwrite restart workflow property on this step.

  • remove_tmp (bool) - (True) Overwrite remove_tmp workflow property on this step.

Available common step properties for containerized applications:
  • container_path (string) - (None) Path to the binary executable of your container.

  • container_image (string) - (None) Container Image identifier.

  • container_volume_path (string) - (None) Path to an internal directory in the container.

  • container_working_dir (string) - (None) Path to the internal CWD in the container.

  • container_user_id (string) - (None) User number id to be mapped inside the container.

  • container_shell_path (string) - (“/bin/bash”) Path to the binary executable of the container shell.

class configuration.settings.ConfReader(config: str | None = None, system: str | None = None)[source]

Bases: object

Configuration file loader for yaml format files.

Parameters:
  • config (str) – Path to the configuration [YAML|JSON] file or JSON string.

  • system (str) – System name from the systems section in the configuration file.

get_paths_dic(prefix: str | None = None) dict[source]

get_paths_dic() returns the paths dictionary where keys are the step names in the configuration YAML file and every value contains another nested dictionary containing the keys and values of each step paths section. All the paths starting with ‘dependency’ are resolved. If the path starts with the string ‘file:’ nothing is done, however if the path starts with any other string path is prefixed with the absolute step path.

Parameters:

prefix (str) – Prefix if provided.

Returns:

Dictionary of paths.

Return type:

dict

get_prop_dic(prefix: str | None = None, global_log: Logger | None = None) dict[source]

get_prop_dic() returns the properties dictionary where keys are the step names in the configuration YAML file and every value contains another nested dictionary containing the keys and values of each step properties section. All the paths in the system section are copied in each nested dictionary. For each nested dictionary the following keys are added:

path (str): Absolute path to the step working dir.
step (str): Name of the step.
prefix (str): Prefix if provided.
global_log (Logger object): Log from the main workflow.
restart (bool): Restart from previous execution.
remove_tmp (bool): Remove temporal files.
Parameters:
  • prefix (str) – Prefix if provided.

  • ( (global_log) – obj:Logger): Log from the main workflow.

Returns:

Dictionary of properties.

Return type:

dict

get_working_dir_path() str[source]
configuration.settings.trans_galaxy_charmap(input_str)[source]

Fixes escape characters introduced by Galaxy on Json inputs