armi.bookkeeping.db.database module¶
Abstract class defining the common interface for all ARMI database implementations
-
class
armi.bookkeeping.db.database.
Database
[source]¶ Bases:
object
Abstract class defining the common interface for all Database implementations.
Notes
This is a pretty anemic set of interfaces, since the different implementations can vary wildly. For now these are the bare minimum interfaces that should be needed to convert one Database format to another, and serve as a common ancestor.
-
genTimeSteps
() → Generator[Tuple[int, int], None, None][source]¶ Get a sequence of tuples (cycle, node) that are contained in the database.
-
genAuxiliaryData
(ts: Tuple[int, int]) → Generator[str, None, None][source]¶ Get a sequence of auxiliary dataset/group names for the passed time step.
- Returns
A generator that produces absolute paths to the auxiliary data. Absolute names make it easier for a database version-agnostic converter to find the actual data.
- Return type
Generator[str]
-
getAuxiliaryDataPath
(ts: Tuple[int, int], name: str) → str[source]¶ Get a string describing a path to an auxiliary data location.
- Parameters
ts – The time step that the auxiliary data belongs to
name – The name of the auxiliary data
- Returns
An absolute location for storing auxiliary data with the given name for the given time step
- Return type
-