oct.utilities package

Submodules

oct.utilities.configuration module

oct.utilities.configuration.cleanup_turret_config(config)[source]

Remove useless keys from turret configuration

Parameters:config (dict) – the configuration to cleanup
Returns:the cleaned configuration
Return type:dict
oct.utilities.configuration.configure(project_path, config_file=None)[source]

Get the configuration of the test and return it as a config object

Returns:the configured config object
Return type:Object
oct.utilities.configuration.configure_for_turret(project_name, config_file)[source]

Load the configuration file in python dict and check for keys that will be set to default value if not present

Parameters:
  • project_name (str) – the name of the project
  • config_file (str) – the path of the configuration file
Returns:

the loaded configuration

Return type:

dict

oct.utilities.configuration.get_db_uri(config, output_dir)[source]

Process results_database parameters in config to format them for set database function

Parameters:
  • config (dict) – project configuration dict
  • output_dir (str) – output directory for results
Returns:

string for db uri

oct.utilities.configuration.get_loader_class(config)[source]

Get results loader class from configuration

Parameters:config (dict) – project configuration dict
oct.utilities.configuration.get_store_class(config)[source]

Get results store backend class from configuration

Parameters:config (dict) – project configuration dict
oct.utilities.configuration.load_turret_config(project_path, config_file)[source]

oct.utilities.newproject module

oct.utilities.newproject.check_template(members, prefix=None)[source]
oct.utilities.newproject.create_project(args)[source]
oct.utilities.newproject.from_oct(args)[source]

Create a new oct project

Parameters:args (Namespace) – the command line arguments
oct.utilities.newproject.from_template(args)[source]

Create a new oct project from existing template

Parameters:args (Namespace) – command line arguments
oct.utilities.newproject.get_members(tar, prefix)[source]
oct.utilities.newproject.new_project(sp)[source]

oct.utilities.pack module

oct.utilities.pack.cleanup_temp_files(turret, files)[source]
oct.utilities.pack.get_files_and_content(turret, is_python=False)[source]
oct.utilities.pack.pack(args)[source]
oct.utilities.pack.pack_turret(turret, temp_files, base_config_path, path=None)[source]

pack a turret into a tar file based on the turret configuration

Parameters:
  • turret_config (dict) – the turret configuration to pack
  • tmp_config_file (str) – the path of the temp config file
  • base_config_path (str) – the base directory of the main configuration file
oct.utilities.pack.pack_turrets(sp)[source]
oct.utilities.pack.write_temp_files(turret, files)[source]

oct.utilities.run module

oct.utilities.run.copy_config(project_path, output_dir)[source]

Copy current config file to output directory

oct.utilities.run.generate_output_path(args, project_path)[source]

Generate default output directory

oct.utilities.run.init_output(output_dir, config)[source]

Init output directory

Parameters:
  • output_dir (str) – the output directory for the results
  • config (dict) – the project configuration
oct.utilities.run.process_results(output_dir, config)[source]

Process results and output them

oct.utilities.run.run(args)[source]

Start an oct project

Parameters:args (Namespace) – the commande-line arguments
oct.utilities.run.run_command(sp)[source]

Main function to run oct tests.

oct.utilities.run.start_hq(output_dir, config, topic, is_master=True, **kwargs)[source]

Start a HQ

Module contents