imas.ids_convert.NBCPathMap¶
- class imas.ids_convert.NBCPathMap¶
Bases:
objectObject mapping paths in one DD version to path, timebasepath and context path.
- __init__()¶
Methods
__init__()Attributes
Dictionary mapping the ids path
Map providing the timebasepath for renamed elements.
Map providing the lowlevel context path for renamed elements.
Dictionary of paths that had a type change.
Map providing postprocess functions for paths.
Postprocess functions to be applied to the whole IDS.
Set of paths that should not be logged when data is present.
- path : Dict[str, str | None]¶
Dictionary mapping the ids path
When no changes have occurred (which is assumed to be the default case), the path is not present in the dictionary.
When an element is renamed it maps the old to the new name (and vice versa).
When an element does not exist in the other version, it is mapped to None.
- post_process : Dict[str, Callable[[IDSBase], None]]¶
Map providing postprocess functions for paths.
The postprocess function should be applied to the nodes after all the data is converted.
- post_process_ids : List[Callable[[IDSToplevel, IDSToplevel, bool], None]]¶
Postprocess functions to be applied to the whole IDS.
These postprocess functions should be applied to the whole IDS after all data is converted. The arguments supplied are: source IDS, target IDS, deepcopy boolean.
- type_change : Dict[str, Callable[[IDSBase, IDSBase], None] | None]¶
Dictionary of paths that had a type change.
Type changes are mapped to None in
path, thisdictallows to distinguish between a type change and a removed node.Optionally, a function can be set to the path. This function can be called to perform a supported conversion between the new and old type (or vice versa).