Skip to content

Commit

Permalink
fix(identifier): Change name property to identifier
Browse files Browse the repository at this point in the history
This PR should NOT be merged in until comparable PRs can be put together for the other 12 repos that are broken by this change.
  • Loading branch information
chriswmackey authored and Chris Mackey committed Apr 5, 2020
1 parent 0541a89 commit b8ecc33
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions honeybee_standards/data/constructions/default.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"Generic Air Boundary": {
"type": "AirBoundaryConstructionAbridged",
"name": "Generic Air Boundary",
"identifier": "Generic Air Boundary",
"air_mixing_per_area": 0.1,
"air_mixing_schedule": "Always On"
},
"Generic Context": {
"type": "ShadeConstruction",
"name": "Generic Context",
"identifier": "Generic Context",
"solar_reflectance": 0.2,
"visible_reflectance": 0.2,
"is_specular": false
},
"Generic Shade": {
"type": "ShadeConstruction",
"name": "Generic Shade",
"identifier": "Generic Shade",
"solar_reflectance": 0.35,
"visible_reflectance": 0.35,
"is_specular": false
Expand Down
2 changes: 1 addition & 1 deletion honeybee_standards/data/constructionsets/default.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Default Generic Construction Set": {
"type": "ConstructionSetAbridged",
"name": "Default Generic Construction Set",
"identifier": "Default Generic Construction Set",
"wall_set": {
"type": "WallSetAbridged",
"exterior_construction": null,
Expand Down
8 changes: 4 additions & 4 deletions honeybee_standards/data/modifiersets/default.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Generic_Interior_Visible_Modifier_Set": {
"type": "ModifierSetAbridged",
"name": "Generic_Interior_Visible_Modifier_Set",
"identifier": "Generic_Interior_Visible_Modifier_Set",
"wall_set": {
"interior_modifier": "generic_wall_0.50",
"exterior_modifier": "generic_wall_0.50",
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"Generic_Interior_Solar_Modifier_Set": {
"type": "ModifierSetAbridged",
"name": "Generic_Interior_Solar_Modifier_Set",
"identifier": "Generic_Interior_Solar_Modifier_Set",
"wall_set": {
"interior_modifier": "generic_wall_0.50",
"exterior_modifier": "generic_wall_0.50",
Expand Down Expand Up @@ -81,7 +81,7 @@
},
"Generic_Exterior_Visible_Modifier_Set": {
"type": "ModifierSetAbridged",
"name": "Generic_Exterior_Visible_Modifier_Set",
"identifier": "Generic_Exterior_Visible_Modifier_Set",
"wall_set": {
"interior_modifier": "generic_wall_0.50",
"exterior_modifier": "generic_wall_exterior_side_0.35",
Expand Down Expand Up @@ -121,7 +121,7 @@
},
"Generic_Exterior_Solar_Modifier_Set": {
"type": "ModifierSetAbridged",
"name": "Generic_Exterior_Solar_Modifier_Set",
"identifier": "Generic_Exterior_Solar_Modifier_Set",
"wall_set": {
"interior_modifier": "generic_wall_0.50",
"exterior_modifier": "generic_wall_exterior_side_0.35",
Expand Down
16 changes: 8 additions & 8 deletions honeybee_standards/data/programtypes/default.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"Plenum": {
"type": "ProgramTypeAbridged",
"name": "Plenum"
"identifier": "Plenum"
},
"Generic Office Program": {
"type": "ProgramTypeAbridged",
"name": "Generic Office Program",
"identifier": "Generic Office Program",
"people": {
"type": "PeopleAbridged",
"name": "Generic Office People",
"identifier": "Generic Office People",
"people_per_area": 0.0565,
"radiant_fraction": 0.3,
"latent_fraction": {"type": "Autocalculate"},
Expand All @@ -17,7 +17,7 @@
},
"lighting": {
"type": "LightingAbridged",
"name": "Generic Office Lighting",
"identifier": "Generic Office Lighting",
"watts_per_area": 10.55,
"return_air_fraction": 0.0,
"radiant_fraction": 0.7,
Expand All @@ -26,7 +26,7 @@
},
"electric_equipment": {
"type": "ElectricEquipmentAbridged",
"name": "Generic Office Equipment",
"identifier": "Generic Office Equipment",
"watts_per_area": 10.33,
"radiant_fraction": 0.5,
"latent_fraction": 0.0,
Expand All @@ -35,19 +35,19 @@
},
"infiltration": {
"type": "InfiltrationAbridged",
"name": "Generic Office Infiltration",
"identifier": "Generic Office Infiltration",
"flow_per_exterior_area": 0.0002266,
"schedule": "Generic Office Infiltration"
},
"ventilation": {
"type": "VentilationAbridged",
"name": "Generic Office Ventilation",
"identifier": "Generic Office Ventilation",
"flow_per_person": 0.00236,
"flow_per_area": 0.000305
},
"setpoint": {
"type": "SetpointAbridged",
"name": "Generic Office Setpoints",
"identifier": "Generic Office Setpoints",
"heating_schedule": "Generic Office Heating",
"cooling_schedule": "Generic Office Cooling"
}
Expand Down
18 changes: 9 additions & 9 deletions tests/default_data_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


def test_construction_lib():
"""Test that the all of the constructions in the default library can be parsed in."""
"""Test that the all of the constructions in the default library can be parsed."""
constr_default = './honeybee_standards/data/constructions/default.idf'

opaque_constrs = OpaqueConstruction.extract_all_from_idf_file(constr_default)
Expand Down Expand Up @@ -54,9 +54,9 @@ def test_constructionsets_lib():
csets = []
with open(constr_default, 'r') as json_file:
c_dict = json.load(json_file)
for c_name in c_dict:
for c_id in c_dict:
constructionset = ConstructionSet.from_dict_abridged(
c_dict[c_name], opaque_cs[0] + window_cs[1])
c_dict[c_id], opaque_cs[0] + window_cs[1])
csets.append(constructionset)

assert len(csets) >= 1
Expand All @@ -83,13 +83,13 @@ def test_programtype_lib():
scheds = {}
for sched in schedule_rulesets:
assert isinstance(sched, ScheduleRuleset)
scheds[sched.name] = sched
scheds[sched.identifier] = sched

ptypes = []
with open(ptype_default, 'r') as json_file:
p_dict = json.load(json_file)
for p_name in p_dict:
programtype = ProgramType.from_dict_abridged(p_dict[p_name], scheds)
for p_id in p_dict:
programtype = ProgramType.from_dict_abridged(p_dict[p_id], scheds)
ptypes.append(programtype)

assert len(ptypes) >= 2
Expand Down Expand Up @@ -122,13 +122,13 @@ def test_modifiersets_lib():
rad_dicts = string_to_dicts(f.read())
for mod_dict in rad_dicts:
mod = dict_to_modifier(mod_dict)
modifiers[mod.name] = mod
modifiers[mod.identifier] = mod

msets = []
with open(modset_default, 'r') as json_file:
m_dict = json.load(json_file)
for m_name in m_dict:
modifierset = ModifierSet.from_dict_abridged(m_dict[m_name], modifiers)
for m_id in m_dict:
modifierset = ModifierSet.from_dict_abridged(m_dict[m_id], modifiers)
msets.append(modifierset)

assert len(msets) >= 4
Expand Down

0 comments on commit b8ecc33

Please sign in to comment.