sierra.plugins.compare.graphs.namecalc#

Utility module for calculating path names.

Functions#

for_cc(→ str)

Calculate a name suitable for CSVs/graphs in stage 5 to ensure uniqueness.

for_sc(→ str)

Calculate a name suitable for CSVs/graphs in stage 5 to ensure uniqueness.

Module Contents#

sierra.plugins.compare.graphs.namecalc.for_cc(leaf: sierra.core.batchroot.ExpRootLeaf, new_stem: str, indices: list[int] | None) str[source]#

Calculate a name suitable for CSVs/graphs in stage 5 to ensure uniqueness.

"Name" here is in pathlib terminology. Targets controller comparisons. Since controller name is part of the default batchroot path, AND each batchroot path is unique, this case is easy.

sierra.plugins.compare.graphs.namecalc.for_sc(leaf: sierra.core.batchroot.ExpRootLeaf, scenarios: list[str], new_stem: str, indices: list[int] | None) str[source]#

Calculate a name suitable for CSVs/graphs in stage 5 to ensure uniqueness.

"Name" here is in pathlib terminology. Targets scenario comparisons, so we need a list of all scenarios in the path to eliminate path collisions in all cases.