sierra.core.batchroot#
Functionality for generating root directory paths for a batch experiment.
See Runtime Directory Tree for details about the defined root directories in SIERRA.
Classes#
Representation of the filesystem path containing all per-experiment data. |
|
Representation of the "name" in pathlib parlance in |
|
The set of filesystem paths under |
Functions#
|
Generate directory paths directly from cmdline arguments. |
|
Regenerate directory pathroots from a batch experiment. |
Module Contents#
- class sierra.core.batchroot.ExpRoot(sierra_root: str, project: str, controller: str, scenario: str, leaf: ExpRootLeaf)[source]#
Representation of the filesystem path containing all per-experiment data.
- class sierra.core.batchroot.ExpRootLeaf(bc: list[str], template_stem: str)[source]#
Representation of the "name" in pathlib parlance in
ExpRoot.- static from_components(bc: list[str], template_stem: str) ExpRootLeaf[source]#
Create the leaf representation directory from the components.
- static from_name(leaf: str) ExpRootLeaf[source]#
Parse the the directory name to extract leaf components.
"Name" here is pathlib parlance. Expected to be of the form:
<template stem>-[<criteria0>+<criteria1>]...
This function is the inverse of
to_path().
- to_path() pathlib.Path[source]#
Get the leaf as a
pathlib.Pathobject.
- class sierra.core.batchroot.PathSet[source]#
The set of filesystem paths under
--sierra-rootthat SIERRA uses.Collected here in the interest of DRY.
- sierra.core.batchroot.from_cmdline(args: argparse.Namespace) PathSet[source]#
Generate directory paths directly from cmdline arguments.
- sierra.core.batchroot.from_exp(sierra_root: str, project: str, batch_leaf: ExpRootLeaf, controller: str, scenario: str) PathSet[source]#
Regenerate directory pathroots from a batch experiment.
Args:
sierra_root: The value of
--sierra-root.project: The value of
--project.batch_leaf: The name of the directory that will be the root of the batch experiment (not including its parent).
controller: The value of
--controller.scenario: The value of
--scenario.