diff --git a/honeybee_schema/energy/properties.py b/honeybee_schema/energy/properties.py index 83a5dee..07262a2 100644 --- a/honeybee_schema/energy/properties.py +++ b/honeybee_schema/energy/properties.py @@ -23,16 +23,18 @@ class ShadeEnergyPropertiesAbridged(BaseModel): type: constr(regex='^ShadeEnergyPropertiesAbridged$') = \ 'ShadeEnergyPropertiesAbridged' - transmittance_schedule: str = Field( + construction: str = Field( default=None, min_length=1, max_length=100, description='Name of a ShadeConstruction to set the reflectance and ' 'specularity of the Shade. If None, the construction is set by the' - 'parent Room construction_set or the Model global_construction_set.' + 'parent Room construction_set, the Model global_construction_set or ' + '(in the case fo an orphaned shade) the EnergyPlus default of 0.2 ' + 'diffuse reflectance.' ) - construction: str = Field( + transmittance_schedule: str = Field( default=None, min_length=1, max_length=100, @@ -131,12 +133,12 @@ class RoomEnergyPropertiesAbridged(BaseModel): electric_equipment: ElectricEquipmentAbridged = Field( default=None, - description='ElectricEquipment object to describe the equipment usage.' + description='ElectricEquipment object to describe the electric equipment usage.' ) gas_equipment: GasEquipmentAbridged = Field( default=None, - description='GasEquipment object to describe the equipment usage.' + description='GasEquipment object to describe the gas equipment usage.' ) infiltration: InfiltrationAbridged = Field( @@ -168,7 +170,11 @@ class ModelEnergyProperties(BaseModel): type: constr(regex='^ModelEnergyProperties$') = \ 'ModelEnergyProperties' - terrain_type: TerrianTypes = TerrianTypes.city + terrain_type: TerrianTypes = Field( + default=TerrianTypes.city, + description='Text for the terrain in which the model sits. This is used ' + 'to determine the wind profile over the height of the rooms.' + ) global_construction_set: str = Field( default=None, @@ -202,14 +208,14 @@ class ModelEnergyProperties(BaseModel): 'materials needed to make the Model constructions.' ) - hvacs: List[IdealAirSystemAbridged] = Field( + hvacs: List[Union[IdealAirSystemAbridged]] = Field( default=None, - description='List of all ProgramTypes in the Model.' + description='List of all HVAC systems in the Model.' ) program_types: List[ProgramTypeAbridged] = Field( default=None, - description='List of all HVAC systems in the Model.' + description='List of all ProgramTypes in the Model.' ) schedules: List[Union[ScheduleRulesetAbridged, ScheduleFixedIntervalAbridged]] = Field( diff --git a/honeybee_schema/model.py b/honeybee_schema/model.py index 42fc208..077b00d 100644 --- a/honeybee_schema/model.py +++ b/honeybee_schema/model.py @@ -71,9 +71,10 @@ def check_num_items(cls, v): @validator('holes') def check_num_items_holes(cls, v): - for pt_list in v: - for pt in pt_list: - assert len(pt) == 3, 'Number of floats must be 3 for (x, y, z).' + if v is not None: + for pt_list in v: + for pt in pt_list: + assert len(pt) == 3, 'Number of floats must be 3 for (x, y, z).' return v @@ -264,7 +265,9 @@ class RoomPropertiesAbridged(BaseModel): type: constr(regex='^RoomPropertiesAbridged$') = 'RoomPropertiesAbridged' - energy: RoomEnergyPropertiesAbridged + energy: RoomEnergyPropertiesAbridged = Field( + default=None + ) class Room(NamedBaseModel): @@ -277,7 +280,7 @@ class Room(NamedBaseModel): description='Faces that together form the closed volume of a room.' ) - indoor_shades: List[Shade] = Field( + indoor_shades: List[Shade] = Field( default=None, description='Shades assigned to the interior side of this object ' '(eg. partitions, tables).' @@ -298,7 +301,7 @@ class Room(NamedBaseModel): multiplier: int = Field( 1, ge=1, - description='Get or set an integer noting how many times this Room is repeated. ' + description='An integer noting how many times this Room is repeated. ' 'Multipliers are used to speed up the calculation when similar Rooms are ' 'repeated more than once. Essentially, a given simulation with the ' 'Room is run once and then the result is mutliplied by the multiplier.' @@ -309,7 +312,9 @@ class ModelProperties(BaseModel): type: constr(regex='^ModelProperties$') = 'ModelProperties' - energy: ModelEnergyProperties + energy: ModelEnergyProperties = Field( + default=None + ) class Model(NamedBaseModel):