romtools.hpc.components.component#

Shared construction for the helpers that the dispatchers compose.

Classes

CampaignComponent(*[, campaign_directory, ...])

Base for the helpers that act on a campaign's directories.

Component(*[, config, logger])

Base for the dispatcher's helpers: each carries the dispatcher's configuration and logger, and stands alone with defaults for both.

class romtools.hpc.components.component.CampaignComponent(*, campaign_directory=None, config=None, logger=None)[source]#

Bases: Component

Base for the helpers that act on a campaign’s directories.

One rule decides what “no run directory” means, so submitting a job and staging its inputs cannot disagree about where the work happens.

Parameters:
  • campaign_directory (str) – The directory work happens in when given no run_directory

  • config (dict)

  • logger (Logger)

job_directory(run_directory=None)[source]#

Where work happens: the directory given, otherwise this campaign’s.

Parameters:

run_directory (str)

Return type:

str

class romtools.hpc.components.component.Component(*, config=None, logger=None)[source]#

Bases: object

Base for the dispatcher’s helpers: each carries the dispatcher’s configuration and logger, and stands alone with defaults for both.

Parameters:
  • config (dict) – The dispatcher’s configuration dictionary

  • logger (Logger) – An instance of the Logger class for logging