mpylab.tools.dot_migration moduleΒΆ
Safely migrate legacy variable names in measurement-graph conditions.
- exception mpylab.tools.dot_migration.DotMigrationError
Bases:
ValueErrorRaised when a DOT file cannot be migrated without ambiguity.
- class mpylab.tools.dot_migration.MigrationResult(source: str, replacements: int)
Bases:
objectResult of migrating one DOT source.
- property changed
Return whether the source contains migrated identifiers.
- replacements: int
- source: str
- mpylab.tools.dot_migration.discover_dot_files(path, recursive=False)
Return deterministic DOT input files for one file or directory.
- mpylab.tools.dot_migration.main(argv=None)
Run the
mpylab-dot-migratecommand.
- mpylab.tools.dot_migration.migrate_dot_file(path, *, write=False, path_checks=())
Validate and optionally migrate one DOT file.
- mpylab.tools.dot_migration.migrate_dot_source(source, old_name='f', new_name='FREQUENCY')
Migrate one exact identifier inside DOT
conditionattributes.Formatting, comments and string literals inside expressions are retained. No node labels, filenames or
actionattributes are changed.