Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCHEMA] (for v2.0) Should calibration["measurement_type_id"] be required? #216

Open
dancasey-ie opened this issue Mar 27, 2023 · 5 comments
Assignees
Labels
breaking change Highlights that this issue will be a breaking change enhancement New feature or request

Comments

@dancasey-ie
Copy link

dancasey-ie commented Mar 27, 2023

Should calibration["measurement_type_id"] be required?

Both because sensors can have multiple measurement_types that can be calibrated separately that need to be differentiated and the current common measurement_type definition does not accept null values.

Longer explanation:
calibration["measurement_type_id"] shares the same definition as measurement_point["measurement_type_id"]. The definition does not allow null values. measurement_point["measurement_type_id"] is a required field so there is no issue, but calibration["measurement_type_id"] is currently an optional field so can cause errors if left blank.

@abohara
Copy link
Collaborator

abohara commented Apr 4, 2023

Hi @dancasey-ie

I agree conceptually that a sensor can have multiple measurement and hence it is possible to have multiple calibrations for the same sensor pertaining to this different measurements. Do you have an actual use case we can use as an example to discuss further ?

cc: @stephenholleran @heikowestermann

@heikowestermann
Copy link
Collaborator

Hey @dancasey-ie @abohara @stephenholleran,
I think measurement_type_id should be required as otherwise the measurand/measurement unit cannot be correctly identified. An example for multiple calibrations per instrument would be an ultrasonic anemometer which outputs the wind speed and the wind direction and both can be calibrated according to IEC61400-12-1 (IEC61400-50-1). Since the calibration key can also be an array, I think this is currently also supported by the schema.

@abohara
Copy link
Collaborator

abohara commented Apr 5, 2023

Thanks for the clarification @heikowestermann and @dancasey-ie

I misunderstood the request. Agree that it is a required item and should be marked as such in the schema.

@stephenholleran stephenholleran added the enhancement New feature or request label Apr 6, 2023
@stephenholleran stephenholleran self-assigned this Apr 6, 2023
@stephenholleran stephenholleran changed the title [SCHEMA] Should calibration["measurement_type_id"] be required? [SCHEMA] (for v2.0) Should calibration["measurement_type_id"] be required? Apr 6, 2023
@stephenholleran stephenholleran added the breaking change Highlights that this issue will be a breaking change label Apr 6, 2023
@stephenholleran
Copy link
Collaborator

Thanks @heikowestermann @abohara and @dancasey-ie.

Making it required will be a breaking change. Not ideal but I think the next release is going to have a few anyway.

I'll make the change.

@dancasey-ie
Copy link
Author

Thanks all @heikowestermann @abohara and @stephenholleran .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Highlights that this issue will be a breaking change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants