geofabrics.runner

A convenience script for running the DEM generation pipelines contained in the processor

module of geofabrics.

Functions

config_logging(logging_filepath)

Configure the root logger inhereited by all othr loggers.

setup_logging_for_run(instructions, label)

Setup logging for the current processor run

run_processor_class(processor_class, processor_label, ...)

Run a processor class recording outputs in a unique log file and timing the

merge_dicts(dict_a, dict_b, logger, replace_a)

Merge the contents of the dict_a and dict_b. Use recursion to merge

from_instructions_dict(instructions)

Run the DEM generation pipeline(s) given the specified instructions.

from_instructions_file(instructions_path)

Run the DEM generation pipeline(s) given the specified instructions.

Module Contents

geofabrics.runner.config_logging(logging_filepath)

Configure the root logger inhereited by all othr loggers.

Parameters:

logging_filepath (pathlib)

geofabrics.runner.setup_logging_for_run(instructions, label)

Setup logging for the current processor run

Parameters:
  • instructions (dict)

  • label (str)

geofabrics.runner.run_processor_class(processor_class, processor_label, instructions)

Run a processor class recording outputs in a unique log file and timing the execution.

Parameters:
  • processor_label (str)

  • instructions (dict)

geofabrics.runner.merge_dicts(dict_a, dict_b, logger, replace_a)

Merge the contents of the dict_a and dict_b. Use recursion to merge any nested dictionaries. replace_a determines if the dict_a values are replaced or not if different values are in the dict_b.

Adapted from https://stackoverflow.com/questions/7204805/how-to-merge-dictionaries-of-dictionaries

Parameters:
  • to (dict_a The dict)

  • mouth (dict_b The location of the centre of the river)

  • dict_b (dict)

  • dict_a (dict)

  • dict_b

  • logger (logging.Logger)

  • replace_a (bool)

geofabrics.runner.from_instructions_dict(instructions)

Run the DEM generation pipeline(s) given the specified instructions. If a benchmark is specified compare the result to the benchmark

Parameters:

instructions (dict)

geofabrics.runner.from_instructions_file(instructions_path)

Run the DEM generation pipeline(s) given the specified instructions. If a benchmark is specified compare the result to the benchmark

Parameters:

instructions_path (Union[str, pathlib.Path])