armi.scripts.migration.m0_1_0_newDbFormat module¶
Migrate ARMI databases to newer versions.
Oftentimes, code changes cause databases from previous versions to become invalid, yet users still want to be able to load from the old cases. These scripts assist in converting old databases to new ones.
This is expected to be extended with version-dependent chains.
- 
class armi.scripts.migration.m0_1_0_newDbFormat.ConvertDB2toDB3(stream=None, path=None)[source]¶
- Bases: - armi.scripts.migration.base.DatabaseMigration- Convert ARMI DB version 2 to DB version 3. 
- 
armi.scripts.migration.m0_1_0_newDbFormat._migrateDatabase(databasePath, preCollector, visitor, postApplier)[source]¶
- Generic database-traversing system to apply custom version-specific migrations. - Parameters
- databasePath (str) – Path to DB file to be converted 
- preCollector (callable) – Function that acts on oldDB and produces some generic data object 
- visitor (callable) – Function that will be called on each dataset of the old HDF5 database. This should map information into the new DB. 
- postApplier (callable) – Function that will run after all visiting is done. Will have acecss to the pre-collected data. 
 
- Raises
- OSError – When database is not found. 
 
- 
armi.scripts.migration.m0_1_0_newDbFormat._updateLayout(newDB, preCollection, name, dataset)[source]¶
- 
armi.scripts.migration.m0_1_0_newDbFormat._updateParams(newDB, preCollection, name, dataset)[source]¶
- Visit parameters and apply migration transformations. - Does not affect input or layout.