You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting point:
Let's say that DLIS file has an Equipment object with various attributes set. But in one of them there is a typo, "AGULAR-DRIFT" instead of "ANGULAR-DRIFT".
Current code would iterate through all the attributes in DLIS file, would reach "AGULAR-DRIFT" attribute and won't be able to map it to any attribute in the "attributes" dictionary. Hence current code would throw KeyError, which eventually will be caught and object would be transformed into Unknown object.
Suggestion is to add "stash" attribute to objects. Stash should be a dictionary which contains all the DLIS attributes that were not mapped into known ones and be populated along in the load method.
Thus custom/mistyped attributes present in official objects won't turn objects into Unknown.
Additionally Unknown object can be reconstructed:
to have all its values in stash
to have empty "attributes" field to correspond with "attributes" field in other objects (know it has totally different meaning, so some confusion).
This should simplify the code and allow us to use the same "load" method for all the objects.
The text was updated successfully, but these errors were encountered:
Starting point:
Let's say that DLIS file has an Equipment object with various attributes set. But in one of them there is a typo, "AGULAR-DRIFT" instead of "ANGULAR-DRIFT".
Current code would iterate through all the attributes in DLIS file, would reach "AGULAR-DRIFT" attribute and won't be able to map it to any attribute in the "attributes" dictionary. Hence current code would throw KeyError, which eventually will be caught and object would be transformed into Unknown object.
Suggestion is to add "stash" attribute to objects. Stash should be a dictionary which contains all the DLIS attributes that were not mapped into known ones and be populated along in the load method.
Thus custom/mistyped attributes present in official objects won't turn objects into Unknown.
Additionally Unknown object can be reconstructed:
This should simplify the code and allow us to use the same "load" method for all the objects.
The text was updated successfully, but these errors were encountered: