pylab_ml.misc.project_info.Project_Info

class Project_Info(filename, logger, path='harness/project_info.yaml')[source]

Bases: object

Class to get project infos from the harness/project_info.yaml file and set the environment variable.

__init__(filename, logger, path='harness/project_info.yaml')[source]

Get project infos from the harness/project_info.yaml file and set the environment variable.

Parameters:
  • filename (str) – The filename of the project_info.yaml file.

  • logger (Logger) – The logger to log messages.

  • path (str, optional) – The path to the project_info.yaml file, by default “harness/project_info.yaml”.

Methods

__init__(filename, logger[, path])

Get project infos from the harness/project_info.yaml file and set the environment variable.

replace_variables(value)

Check if valuestr has environment-variables starts with $, or valuestr has path-value like './'.

replace_variables(value)[source]

Check if valuestr has environment-variables starts with $, or valuestr has path-value like ‘./’. If yes than replace environment-variables with its value.

eg. if value is ‘$HOME/dir’, then it will replace $HOME with the value of the HOME environment variable and return the resulting string.

Parameters:

value (str) – The value to check for environment variables and path values.

Returns:

valuestr – The value with environment variables and path values replaced.

Return type:

str