def test_model_energy_detailed_loads(): file_path = os.path.join(target_folder, 'model_energy_detailed_loads.json') Model.parse_file(file_path)
def test_model_energy_fixed_interval(): file_path = os.path.join(target_folder, 'model_energy_fixed_interval.json') Model.parse_file(file_path)
def test_model_complete_patient_room(): file_path = os.path.join(target_folder, 'model_complete_patient_room.json') Model.parse_file(file_path)
def test_model_energy_shoe_box(): file_path = os.path.join(target_folder, 'model_energy_shoe_box.json') Model.parse_file(file_path)
def test_model_energy_window_ac(): file_path = os.path.join(target_folder, 'model_energy_window_ac.hbjson') Model.parse_file(file_path)
def test_model_5vertex_sub_faces(): file_path = os.path.join(target_folder, 'model_5vertex_sub_faces.hbjson') Model.parse_file(file_path)
def test_model_radiance_grid_views(): file_path = os.path.join(target_folder, 'model_radiance_grid_views.hbjson') Model.parse_file(file_path)
def test_model_energy_doas_hvac(): file_path = os.path.join(target_folder, 'model_energy_doas_hvac.json') Model.parse_file(file_path)
def test_model_complete_user_data(): file_path = os.path.join(target_folder, 'model_complete_user_data.hbjson') Model.parse_file(file_path)
def test_model_complete_multiroom_radiance(): file_path = os.path.join(target_folder, 'model_complete_multiroom_radiance.hbjson') Model.parse_file(file_path)
def test_model_large_lab_building(): file_path = os.path.join(target_folder_large, 'lab_building.hbjson') Model.parse_file(file_path)
def test_model_large_single_family_home(): file_path = os.path.join(target_folder_large, 'single_family_home.hbjson') Model.parse_file(file_path)
model_object = openapi['components']['schemas']['Model'] model_object['allOf'][1]['properties']['version']['readOnly'] = True model_object['allOf'][1]['properties']['version']['default'] = VERSION with open(f'./docs/{_process_name(module["name"])}_inheritance.json', 'w') \ as out_file: json.dump(openapi, out_file, indent=2) # add the mapper file with open(f'./docs/{_process_name(module["name"])}_mapper.json', 'w') as out_file: json.dump(class_mapper(module['module']), out_file, indent=2) # generate JSONSchema for Honeybee model with open('./docs/model_json_schema.json', 'w') as out_file: out_file.write(Model.schema_json(indent=2)) # generate schema for mode with inheritance but without descriminator # we will use this file for generating redocly - the full model is too big, and the # model with inheritance and discriminators is renders incorrectly external_docs = { "description": "OpenAPI Specification with Inheritance", "url": "./model_inheritance.json" } openapi = get_openapi([Model], title='Honeybee Model Schema', description='Documentation for Honeybee model schema', version=VERSION, info=info, inheritance=True,
def test_model_energy_no_program(): file_path = os.path.join(target_folder, 'model_energy_no_program.json') Model.parse_file(file_path)
def test_model_radiance_dynamic_states(): file_path = os.path.join(target_folder, 'model_radiance_dynamic_states.hbjson') Model.parse_file(file_path)
def test_model_complete_multi_zone_office(): file_path = os.path.join(target_folder, 'model_complete_multi_zone_office.json') Model.parse_file(file_path)
def test_model_energy_window_ventilation(): file_path = os.path.join(target_folder, 'model_energy_window_ventilation.json') Model.parse_file(file_path)