mpylab.tools.nport_migration moduleΒΆ
Migrate legacy NPORT interpolation settings in INI files.
- exception mpylab.tools.nport_migration.NPortMigrationError
Bases:
ValueErrorRaised when an INI file cannot be migrated without ambiguity.
- class mpylab.tools.nport_migration.NPortMigrationResult(source: str, replacements: int, device_type: str | None)
Bases:
objectResult of inspecting or migrating one INI source.
- property changed
Return whether legacy channel settings were replaced.
- device_type: str | None
- replacements: int
- source: str
- mpylab.tools.nport_migration.discover_ini_files(path, recursive=False)
Return deterministic INI inputs for one file or directory.
- mpylab.tools.nport_migration.main(argv=None)
Run the
mpylab-nport-migratecommand.
- mpylab.tools.nport_migration.migrate_nport_ini_file(path, *, write=False)
Inspect and optionally migrate one NPORT-style INI file.
- mpylab.tools.nport_migration.migrate_nport_ini_source(source)
Return an explicitly configured equivalent of a legacy NPORT INI.
Only
NPORT,CABLE,ANTENNAandAMPLIFIERfiles are considered. Both historicalINTERPOLATION = LINandLOGare converted to the explicit settings that preserve the old NPORT behavior.