pysiral.scripts.config

Attributes

__author__

Classes

ConfigActions

Enum where members are also (and must be) strings

ConfigScriptArguments

Functions

config(→ None)

Main entry point for the config script. Can either initialize the pysiral configuration

config_init(→ None)

Initial pysiral configuration in the default configuration directory.

config_set(→ None)

local_machine_def_copy_template(→ None)

Copy the local machine definition template to the target filepath.

copy_config_files(→ None)

Copy the configuration files to the target directory.

set_pysiral_cfg_loc(target)

Write the location of the pysiral configuration for the current package

Module Contents

pysiral.scripts.config.__author__ = 'Stefan Hendricks <stefan.hendricks@awi.de>'
class pysiral.scripts.config.ConfigActions

Bases: enum.StrEnum

Enum where members are also (and must be) strings

INIT = 'init'
SET = 'set'
pysiral.scripts.config.config(action: ConfigActions = ConfigActions.INIT, target_or_directory: pathlib.Path | str | None = None, yes: bool = False) None

Main entry point for the config script. Can either initialize the pysiral configuration in the default configuration directory or set/update the configuration to a specific directory.

Parameters:
  • action

  • target_or_directory

  • yes

Returns:

None

pysiral.scripts.config.config_init() None

Initial pysiral configuration in the default configuration directory.

Returns:

None

pysiral.scripts.config.config_set(target: pathlib.Path | str, yes: bool) None
Parameters:
  • target

  • yes

Returns:

None

pysiral.scripts.config.local_machine_def_copy_template(target_filepath: pathlib.Path) None

Copy the local machine definition template to the target filepath.

Parameters:

target_filepath

Returns:

None

pysiral.scripts.config.copy_config_files(target_directory: pathlib.Path, yes: bool) None

Copy the configuration files to the target directory.

Parameters:
  • target_directory – The

  • yes

Returns:

pysiral.scripts.config.set_pysiral_cfg_loc(target)

Write the location of the pysiral configuration for the current package NOTE: If you don’t know what this means: Please Don’t! An incorrect setting can break your pysiral installation!

Parameters:

target – The target directory or identifier (e.g., “USER_HOME”, “PACKAGE”, or a specific path)

Returns:

None

class pysiral.scripts.config.ConfigScriptArguments

Bases: object

parser
get(args_list: List[str] = None) argparse.Namespace
static get_argument_parser() argparse.ArgumentParser

Set up the command line argument parser for the Level-2 Processor.

Returns:

The argument parser object.