armi.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.migration.base.Migration(stream=None, path=None)[source]
Bases:
ABCGeneric migration.
To implement a concrete Migration, you must implement the
_applyToStreammethod. You must also define the abstract propertiesfromVersionandtoVersion. These are the ARMI versions you are migrating from and to. ThetoVersionmust be higher than thefromVersion.- abstract property fromVersion
ARMI version string, must be smaller than toVersion.
- abstract property toVersion
ARMI version string, must be larger than fromVersion.
- class armi.migration.base.BlueprintsMigration(stream=None, path=None)[source]
Bases:
MigrationMigration for blueprints input.