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

Units #67

Open
kilojoules opened this issue Sep 27, 2024 · 2 comments
Open

Units #67

kilojoules opened this issue Sep 27, 2024 · 2 comments
Assignees
Labels
plant Related to the wind plant schema Related to the json schema turbine Related to the wind turbine

Comments

@kilojoules
Copy link
Collaborator

We are inconsistant or lacking in units documentation. It can be a child (units) or part of the description, or neither, in the current form

@ptrbortolotti ptrbortolotti self-assigned this Jan 13, 2025
@ptrbortolotti ptrbortolotti added turbine Related to the wind turbine plant Related to the wind plant schema Related to the json schema labels Jan 13, 2025
@ptrbortolotti
Copy link
Collaborator

In the turbine schema we are doing pretty well and units is its own field

@kenloen
Copy link
Collaborator

kenloen commented Jan 16, 2025

To add units as an entry for a member, the Draft schema that we use needs to be extended with the option as it is done here: https://github.com/IEAWindTask37/windIO/blob/1a74473322c14a70296c13e5659bd6c68074b1ab/test/turbine/test_turbine.py#L75
At least if we are doing "strict" schema validation with additionalProperties: false which would be the best to ensure that the schema does not contain typos.

We should probably only add units as a possibility for entries of type: number

We should probably also add validation of the value (e.g. "kg", "m/s", "kg*m/", ..) units them self to ensure they are consistent and follow the same structure. I think this will be hard with a regex expression, but we could consider using a Python tool for it and extending the validator for this validation it: https://python-jsonschema.readthedocs.io/en/stable/creating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plant Related to the wind plant schema Related to the json schema turbine Related to the wind turbine
Projects
None yet
Development

No branches or pull requests

3 participants