depara_pisystem#
Mapping between old and new tag names.
This module defines a mapping between old and new tag names for a project that involves collecting, processing, storing, and presenting data for industrial operations. The project originally used a system called PIMS, but later migrated to the PI System.
The module defines a list called old_name
that contains the old tag names from
the PIMS system.
The list contains strings that represent the old tag names for various
industrial operations, such as "CENT1_I@08QU-PP-871I-02-PAT05"
and "CONS1_Y@08QU-PF-852I-01M1"
.
The purpose of the module is to provide a mapping between the old tag names
and the new tag names in the PI System. The mapping is defined by a dictionary
named pims_to_pisystem_dict
that maps old tag names to new tag names.
- ivar old_name
Tag names on the PIMS system.
- vartype old_name
List[str]
- ivar new_name
Tag names on the PI System.
- vartype new_name
List[str]
- ivar pims_to_pisystem_dict
Dictionary that maps old tag names to new tag names.
- vartype pims_to_pisystem_dict
Dict[str
,str]
Notes
The module provides compatibility for the project to work with PI System.
The pims_to_pisystem_dict
dictionary is used by the preprocessamento.py
module right after the data is read from the database, in order to rename the
column names from their PI System names to their old PIMS names, thus enabling
the rest of the project to work without requiring major changes to codebase
to make it compatible with PI System.
Danger
The list old_names
contains 3,012 tag names.
However, when counting the number of unique tag names,
there are only 2,944 unique tag names.
This means that there are 68 duplicate tag names in the list.
Upon further investigation, it was found that the duplicate tag names
are also duplicated in the PI System. In other words,
There are old names being mapped to two different new names.
However, this is still a code smell, and should be fixed in the future.