Object Upgrader
- upgrader.upgrade(schema_path=None, backup=True, _assume_version=None)
Upgrade a serialized SVS object to the most recent global serialization version. Currently, this tool only modifies SVS TOML files. Furthermore, this tool only upgrades the global serialization strategy (how objects in general are stored). It does not (yet) support upgrading individual objects whose serialization version has changed.
Objects that are already at the current serialization version are left unchanged.
- Supported Upgrade Paths:
v0.0.1
tov0.0.2
.
- Parameters:
path –
The path to the serialized SVS object.
This will usually be directory containing a canonically serialized SVS object (identifiable by the existence of a file called
svs_config.toml
and potentially other auxiliary files.Alternatively, this can be a path to an SVS serialized file directly.
- Keyword Arguments:
backup – Create a backup of the original object before creating changes. A backed up TOML file will have its extension modified to
.backup.toml
. To restore a backup, remove the.backup
infix.schema_path – Path to a schema file describing the schemas of SVS objects. This is used during the upgrade from global serialization version
v0.0.1
tov0.0.2
and will be supplied by default._assume_version – Non-conforming SVS objects may not support automatic global version detection. The assumed version (as a string triple like
"v0.0.1"
) may be provided.