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
Leverage str, enum capability of Python for any generated enums (#133)
* str_enum: Change generation of S2 specification to include the subclass of an enum.
* str_enum: Exclude generated files from pyright check.
* str_enum: ombc classes should be explicitely exported in init.
* str_enum: add missing Any to dict type in S2Parser.
@@ -507,8 +493,7 @@ class SessionRequest(BaseModel):
507
493
message_id: ID
508
494
request: SessionRequestType=Field(..., description="The type of request")
509
495
diagnostic_label: Optional[str] =Field(
510
-
None,
511
-
description="Optional field for a human readible descirption for debugging purposes",
496
+
None, description="Optional field for a human readible descirption for debugging purposes"
512
497
)
513
498
514
499
@@ -586,12 +571,10 @@ class PEBCEnergyConstraint(BaseModel):
586
571
description="Identifier of this PEBC.EnergyConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.",
587
572
)
588
573
valid_from: AwareDatetime=Field(
589
-
...,
590
-
description="Moment this PEBC.EnergyConstraints information starts to be valid",
574
+
..., description="Moment this PEBC.EnergyConstraints information starts to be valid"
591
575
)
592
576
valid_until: AwareDatetime=Field(
593
-
...,
594
-
description="Moment until this PEBC.EnergyConstraints information is valid.",
577
+
..., description="Moment until this PEBC.EnergyConstraints information is valid."
595
578
)
596
579
upper_average_power: float=Field(
597
580
...,
@@ -634,8 +617,7 @@ class PPBCScheduleInstruction(BaseModel):
634
617
description="Indicates the moment the PPBC.PowerSequence shall start. When the specified execution time is in the past, execution must start as soon as possible.",
635
618
)
636
619
abnormal_condition: bool=Field(
637
-
...,
638
-
description="Indicates if this is an instruction during an abnormal condition",
620
+
..., description="Indicates if this is an instruction during an abnormal condition"
639
621
)
640
622
641
623
@@ -665,8 +647,7 @@ class PPBCStartInterruptionInstruction(BaseModel):
665
647
description="Indicates the moment the PPBC.PowerSequence shall be interrupted. When the specified execution time is in the past, execution must start as soon as possible.",
666
648
)
667
649
abnormal_condition: bool=Field(
668
-
...,
669
-
description="Indicates if this is an instruction during an abnormal condition",
650
+
..., description="Indicates if this is an instruction during an abnormal condition"
670
651
)
671
652
672
653
@@ -697,8 +678,7 @@ class PPBCEndInterruptionInstruction(BaseModel):
697
678
description="Indicates the moment PPBC.PowerSequence interruption shall end. When the specified execution time is in the past, execution must start as soon as possible.",
698
679
)
699
680
abnormal_condition: bool=Field(
700
-
...,
701
-
description="Indicates if this is an instruction during an abnormal condition",
681
+
..., description="Indicates if this is an instruction during an abnormal condition"
702
682
)
703
683
704
684
@@ -745,8 +725,7 @@ class OMBCInstruction(BaseModel):
745
725
description="The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1.",
746
726
)
747
727
abnormal_condition: bool=Field(
748
-
...,
749
-
description="Indicates if this is an instruction during an abnormal condition",
728
+
..., description="Indicates if this is an instruction during an abnormal condition"
750
729
)
751
730
752
731
@@ -824,8 +803,7 @@ class FRBCInstruction(BaseModel):
824
803
description="Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.",
825
804
)
826
805
abnormal_condition: bool=Field(
827
-
...,
828
-
description="Indicates if this is an instruction during an abnormal condition.",
806
+
..., description="Indicates if this is an instruction during an abnormal condition."
829
807
)
830
808
831
809
@@ -871,8 +849,7 @@ class DDBCActuatorStatus(BaseModel):
871
849
message_id: ID
872
850
actuator_id: ID=Field(..., description="ID of the actuator this messages refers to")
873
851
active_operation_mode_id: ID=Field(
874
-
...,
875
-
description="The operation mode that is presently active for this actuator.",
852
+
..., description="The operation mode that is presently active for this actuator."
876
853
)
877
854
operation_mode_factor: float=Field(
878
855
...,
@@ -903,8 +880,7 @@ class DDBCInstruction(BaseModel):
903
880
description="Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.",
904
881
)
905
882
abnormal_condition: bool=Field(
906
-
...,
907
-
description="Indicates if this is an instruction during an abnormal condition",
883
+
..., description="Indicates if this is an instruction during an abnormal condition"
908
884
)
909
885
actuator_id: ID=Field(..., description="ID of the actuator this Instruction belongs to.")
910
886
operation_mode_id: ID=Field(..., description="ID of the DDBC.OperationMode")
@@ -937,8 +913,7 @@ class PowerValue(BaseModel):
937
913
..., description="The power quantity the value refers to"
938
914
)
939
915
value: float=Field(
940
-
...,
941
-
description="Power value expressed in the unit associated with the CommodityQuantity",
916
+
..., description="Power value expressed in the unit associated with the CommodityQuantity"
942
917
)
943
918
944
919
@@ -1020,8 +995,7 @@ class PEBCAllowedLimitRange(BaseModel):
1020
995
..., description="Type of power quantity this PEBC.AllowedLimitRange applies to"
1021
996
)
1022
997
limit_type: PEBCPowerEnvelopeLimitType=Field(
1023
-
...,
1024
-
description="Indicates if this ranges applies to the upper limit or the lower limit",
998
+
..., description="Indicates if this ranges applies to the upper limit or the lower limit"
1025
999
)
1026
1000
range_boundary: NumberRange=Field(
1027
1001
...,
@@ -1193,8 +1167,7 @@ class ResourceManagerDetails(BaseModel):
1193
1167
)
1194
1168
manufacturer: Optional[str] =Field(None, description="Name of Manufacturer")
1195
1169
model: Optional[str] =Field(
1196
-
None,
1197
-
description="Name of the model of the device (provided by the manufacturer)",
1170
+
None, description="Name of the model of the device (provided by the manufacturer)"
1198
1171
)
1199
1172
serial_number: Optional[str] =Field(
1200
1173
None, description="Serial number of the device (provided by the manufacturer)"
@@ -1218,8 +1191,7 @@ class ResourceManagerDetails(BaseModel):
1218
1191
description="Currency to be used for all information regarding costs. Mandatory if cost information is published.",
1219
1192
)
1220
1193
provides_forecast: bool=Field(
1221
-
...,
1222
-
description="Indicates whether the ResourceManager is able to provide PowerForecasts",
1194
+
..., description="Indicates whether the ResourceManager is able to provide PowerForecasts"
@@ -1306,8 +1278,7 @@ class PEBCInstruction(BaseModel):
1306
1278
description="Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.",
1307
1279
)
1308
1280
abnormal_condition: bool=Field(
1309
-
...,
1310
-
description="Indicates if this is an instruction during an abnormal condition.",
1281
+
..., description="Indicates if this is an instruction during an abnormal condition."
1311
1282
)
1312
1283
power_constraints_id: ID=Field(
1313
1284
...,
@@ -1380,8 +1351,7 @@ class PPBCPowerSequence(BaseModel):
1380
1351
min_length=1,
1381
1352
)
1382
1353
is_interruptible: bool=Field(
1383
-
...,
1384
-
description="Indicates whether the option of pausing a sequence is available.",
1354
+
..., description="Indicates whether the option of pausing a sequence is available."
1385
1355
)
1386
1356
max_pause_before: Optional[Duration] =Field(
1387
1357
None,
@@ -1509,10 +1479,7 @@ class FRBCActuatorDescription(BaseModel):
1509
1479
description="Human readable name/description for the actuator. This element is only intended for diagnostic purposes and not for HMI applications.",
1510
1480
)
1511
1481
supported_commodities: List[Commodity] =Field(
1512
-
...,
1513
-
description="List of all supported Commodities.",
1514
-
max_length=4,
1515
-
min_length=1,
1482
+
..., description="List of all supported Commodities.", max_length=4, min_length=1
0 commit comments