Initialisation Module

pipeline.init.get_input(args, logger)

Get command-line inputs for specific project configuration

pipeline.init.get_proj_code(path: str, prefix='')

Determine project code from path (prefix removed), appropriate for CMIP6

pipeline.init.get_removals(logger)

Get attribute names to remove in final metadata

pipeline.init.get_updates(logger)

Get key-value pairs for updating in final metadata

pipeline.init.init_config(args, logger, fh=None, logid=None, **kwargs)

Main configuration script, load configurations from input sources, determine input file type and use appropriate functions to instantiate group and project directories.

Parameters:
  • args – (obj) Set of command line arguments supplied by argparse.

  • logger – (obj) Logging object for info/debug/error messages. Will create a new logger object if not given one.

  • fh – (str) Path to file for logger I/O when defining new logger.

  • logid – (str) If creating a new logger, will need an id to distinguish this logger from other single processes (typically n of N total processes.)

Returns:

None

pipeline.init.load_from_input_file(args, logger)

Configure project directory and base config from input file

pipeline.init.make_directories(args, logger)

Set up directory structure for working directory

pipeline.init.make_filelist(pattern: str, proj_dir: str, logger)

Create list of files associated with this project

pipeline.init.text_file_to_csv(args, logger, prefix=None)

Convert text file list of patterns to a csv for a set of projects