ska_sdp_e2e_batch_continuum_imaging.pipelines.common module

ska_sdp_e2e_batch_continuum_imaging.pipelines.common.read_file(filepath)[source]

Reads the contents of a file and returns it as a string.

Parameters:

filepath (str or Path) -- The path to the file to be read.

Returns:

The contents of the file as a string.

Return type:

str

ska_sdp_e2e_batch_continuum_imaging.pipelines.common.write_file(content, filepath)[source]

Writes the given content to a file at the specified filepath.

Parameters:
  • content (str) -- The content to be written to the file.

  • filepath (str or Path) -- The path to the file where the content will be written.

ska_sdp_e2e_batch_continuum_imaging.pipelines.common.write_ini_config(config, filepath)[source]

Writes the given config to a ini file at the specified filepath.

Parameters:
  • config (Configparser) -- An Configparser object with config.

  • filepath (str or Path) -- The path to the file where the content will be written.

ska_sdp_e2e_batch_continuum_imaging.pipelines.common.create_directories(paths)[source]

Create directories for the given list of paths.

Parameters:

paths (list of Path or str) -- A list containing directory paths to create. Each element can be a string or a pathlib.Path object.