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
The unit_of_measurement in SimpleAttributeDefinition, TimeseriesAttributeDefinition and TimeseriesResource should be left as string type.
The new_unit_of_measurement parameter in update_timeseries_resource_info should be left as a string, but in the implementation of update_timeseries_resource_info we should use ListUnitsOfMeasurement RPC1 to map the unit of measurement name to ID and use the ID in the updated UpdateTimeseriesResource RPC.
With this approach the:
Python SDK API is compatible with older versions.
Users can still work with units of measurements expressed as strings, which could be handier.
We still have the option to extend the new_unit_of_measurement in update_timeseries_resource_info to accept also IDs and express unit_of_measurement in SimpleAttributeDefinition, TimeseriesAttributeDefinition and TimeseriesResource by new class UnitOfMeasurement instead of string.
Adjust to proto changes that will be done in https://github.com/Volue/energy-mesh/issues/4662.
The changes won't break the Python SDK API:
unit_of_measurement
inSimpleAttributeDefinition
,TimeseriesAttributeDefinition
andTimeseriesResource
should be left as string type.new_unit_of_measurement
parameter inupdate_timeseries_resource_info
should be left as a string, but in the implementation ofupdate_timeseries_resource_info
we should useListUnitsOfMeasurement
RPC1 to map the unit of measurement name to ID and use the ID in the updatedUpdateTimeseriesResource
RPC.With this approach the:
new_unit_of_measurement
inupdate_timeseries_resource_info
to accept also IDs and expressunit_of_measurement
inSimpleAttributeDefinition
,TimeseriesAttributeDefinition
andTimeseriesResource
by new classUnitOfMeasurement
instead of string.Footnotes
This RPC will be added in https://github.com/Volue/energy-mesh/issues/4701. ↩
The text was updated successfully, but these errors were encountered: