armi.cases.suite module
The CaseSuite
object is responsible for running, and executing a set of user inputs. Many
entry points redirect into CaseSuite
methods, such as clone
, compare
, and submit
.
Used in conjunction with the Case
object, CaseSuite
can be used to
collect a series of cases and submit them to a cluster for execution. Furthermore, a CaseSuite
can be used to gather executed cases for post-analysis.
CaseSuite
s should allow Cases
to be added from totally separate directories. This is
useful for plugin-informed testing as well as other things.
See also
armi.cases.case
An individual item of a case suite.
- class armi.cases.suite.CaseSuite(cs)[source]
Bases:
object
A CaseSuite is a collection of possibly related Case objects.
- add(case)[source]
Add a Case object to the CaseSuite.
Case objects within a CaseSuite must have unique
title
attributes, a KeyError will be raised
- discover(rootDir=None, patterns=None, ignorePatterns=None, recursive=True, skipInspection=False)[source]
Finds case objects by searching for a pattern of file paths, and adds them to the suite.
This searches for Settings input files and loads them to create Case objects.
- Parameters:
rootDir (str, optional) – root directory to search for settings files
patterns (list of str, optional) – file pattern to use to filter file names
ignorePatterns (list of str, optional) – file patterns to exclude matching file names
recursive (bool, optional) – if True, recursively search for settings files
skipInspection (bool, optional) – if True, skip running the check inputs
- echoConfiguration()[source]
Print information about this suite to the run log.
Notes
Some of these printouts won’t make sense for all users, and may make sense to be delegated to the plugins/app.
- clone(oldRoot=None, writeStyle='short')[source]
Clone a CaseSuite to a new place.
Creates a clone for each case within a CaseSuite. If
oldRoot
is not specified, then each case clone is made in a directory with the title of the case. IfoldRoot
is specified, then a relative path fromoldRoot
will be used to determine a new relative path to the current directoryoldRoot
.- Parameters:
Notes
By design, a CaseSuite has no location dependence; this allows any set of cases to compose a CaseSuite. The thought is that the post-analysis capabilities without restricting a root directory could be beneficial. For example, this allows one to perform analysis on cases analyzed by Person A and Person B, even if the analyses were performed in completely different locations. As a consequence, when you want to clone, we need to infer a “root” of the original cases to attempt to mirror whatever existing directory structure there may have been.
- run()[source]
Run each case, one after the other.
Warning
Suite running may not work yet if the cases have interdependencies. We typically run on a HPC but are still working on a platform independent way of handling HPCs.
- compare(that, exclusion: Optional[Sequence[str]] = None, weights=None, tolerance=0.01, timestepCompare=None) int [source]
Compare one case suite with another.
- Return type:
The number of problem differences encountered.