Skip to content

Commit

Permalink
ENH: Change to class_label to disambiguate from the use of labels els…
Browse files Browse the repository at this point in the history
…ewhere as keys
  • Loading branch information
thclark committed Jan 16, 2024
1 parent f2ca0ec commit b764c5a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/generate_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"properties.design_bases.items.properties.certification.properties.standard",
"properties.design_bases.items.properties.certification.properties.standard_edition",
"properties.design_bases.items.properties.design_class",
"properties.design_bases.items.properties.design_class.oneOf[0].properties.label",
"properties.design_bases.items.properties.design_class.oneOf[1].properties.label",
"properties.design_bases.items.properties.design_class.oneOf[0].properties.class_label",
"properties.design_bases.items.properties.design_class.oneOf[1].properties.class_label",
"properties.design_bases.items.properties.design_class.oneOf[1].properties.annual_average_wind_speed",
"properties.design_bases.items.properties.design_class.oneOf[1].properties.annual_average_air_density",
"properties.design_bases.items.properties.design_class.oneOf[1].properties.reference_wind_speed",
Expand Down
8 changes: 4 additions & 4 deletions docs/terms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ design_bases.design_class
A fully or partially predefined environmental class, (eg IEC or other
scheme)

design_bases.design_class[0].label
++++++++++++++++++++++++++++++++++
design_bases.design_class[0].class_label
++++++++++++++++++++++++++++++++++++++++

Select from predefined IEC design classes I, II, and III.

design_bases.design_class[1].label
++++++++++++++++++++++++++++++++++
design_bases.design_class[1].class_label
++++++++++++++++++++++++++++++++++++++++

Specify IEC classes S, T, CC or an entirely custom design class

Expand Down
6 changes: 3 additions & 3 deletions power-curve-schema/examples/generic-117-3.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"standard_edition": "2"
},
"design_class": {
"label": "II"
"class_label": "II"
},
"design_lifetime": 20,
"turbulence": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"standard_edition": "2"
},
"design_class": {
"label": "S",
"class_label": "S",
"annual_average_wind_speed": 8.5,
"annual_average_air_density": 1.15,
"reference_wind_speed": 37.5,
Expand Down Expand Up @@ -109,7 +109,7 @@
"standard_edition": "2"
},
"design_class": {
"label":"II"
"class_label":"II"
},
"design_lifetime": 20,
"standard_climate": {
Expand Down
2 changes: 1 addition & 1 deletion power-curve-schema/examples/generic-274-20.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"standard_edition": "2"
},
"design_class": {
"label": "II"
"class_label": "II"
},
"design_lifetime": 20,
"standard_climate": {
Expand Down
12 changes: 5 additions & 7 deletions power-curve-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,22 +310,20 @@
"oneOf": [
{
"type": "object",
"required": ["label"],
"required": ["class_label"],
"properties": {
"label": {
"$comment": "TODO change this from `label` to `class_label`",
"class_label": {
"description": "Select from predefined IEC design classes I, II, and III.",
"enum": ["I", "II", "III"]
}
},
"$comment": "S (T, CC to be confirmed) is a custom class, use other objects."
"$comment": "S (T, CC to be confirmed) is a custom class, use other objects, what should we do for class IV turbines? Are they custom?"
},
{
"type": "object",
"required": ["label"],
"required": ["class_label"],
"properties": {
"label": {
"$comment": "TODO change this from `label` to `class_label`",
"class_label": {
"title": "Label",
"description": "Specify IEC classes S, T, CC or an entirely custom design class",
"enum": ["S", "T", "CC", "Custom"]
Expand Down

0 comments on commit b764c5a

Please sign in to comment.