armi.scripts.migration.base module

Base migration classes.

A classic migration takes a file name, read the files, migrates the data, and re-writes the file. Some migrations need to happen live on a stream. For example, if an old/invalid input file is being read in from an old database. The migration class defined here chooses this behavior based on whether the stream or path variables are given in the constructor.

class armi.scripts.migration.base.Migration(stream=None, path=None)[source]

Bases: object

Generic migration.

To implement a concrete Migration, one must often only implement the _applyToStream method.

fromVersion = 'x.x.x'
toVersion = 'x.x.x'
apply()[source]

Apply migration.

This is generally called from a subclass.

class armi.scripts.migration.base.BlueprintsMigration(stream=None, path=None)[source]

Bases: Migration

Migration for blueprints input.

class armi.scripts.migration.base.SettingsMigration(stream=None, path=None)[source]

Bases: Migration

Migration for settings input.

class armi.scripts.migration.base.GeomMigration(stream=None, path=None)[source]

Bases: Migration

Migration for non-blueprints geometry input.

class armi.scripts.migration.base.DatabaseMigration(stream=None, path=None)[source]

Bases: Migration

Migration for db output.