Units in task scripts¶
Overview¶
This page outlines our guidelines for handling units in task scripts.
Guidelines¶
Always use the
ts_lib_unitsUnitParser.parse()method to parse raw unit strings to the TetraScience standard unitsIf the unit is not recognized, a warning should be logged and the raw unit string should be stored in the
unitfield of thets_ids_core.schema.RawValueUnitcomponent instead.