armi.scripts.migration.crossSectionBlueprintsToSettings module

Migrate compound cross section settings from blueprints file to settings file.

This setting was originally stored in blueprints just because yaml was more conducive than XML for a compound setting. After we migrated the settings system to YAML, it was much more natural to put this setting in the settings file. Along the way, we renamed some of the input fields as well.

This deletes the cross sections section from the blueprints file and adds a valid one into the settings file.

It manually reads the blueprints file rather than parsing it to ensure round-trippiness even with yaml-native links.

class armi.scripts.migration.crossSectionBlueprintsToSettings.MoveCrossSectionsFromBlueprints(stream=None, path=None)[source]

Bases: armi.scripts.migration.base.SettingsMigration

Move cross sections settings from blueprints to settings.

This modifies both settings and blueprints.

fromVersion = '0.0.0'
toVersion = '0.1.0'
_applyToStream()[source]

Add actual migration code here in a subclass.

_backupOriginal()[source]

Don’t actually back up because it’s done below.

_writeNewFile(newStream)[source]

Skip writing new file since it’s handled below.

armi.scripts.migration.crossSectionBlueprintsToSettings.migrateCrossSectionsFromBlueprints(settingsObj)[source]
armi.scripts.migration.crossSectionBlueprintsToSettings._convertBlueprints(bpPath)[source]
armi.scripts.migration.crossSectionBlueprintsToSettings._migrateInputData(origXsInputLines)[source]

Take spaces in labels out and return dict.

armi.scripts.migration.crossSectionBlueprintsToSettings._writeNewSettingsFile(cs, newXsInput)[source]
armi.scripts.migration.crossSectionBlueprintsToSettings._finalize(bpPath, csPath)[source]

Actually overwrite the original files if previous steps completed.

This ensures we don’t get partially migrated and then crash.