Skip to content

Commit

Permalink
fix(tests): Update some of the test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-p-may committed Mar 10, 2024
1 parent b217bf6 commit 07aa423
Show file tree
Hide file tree
Showing 9 changed files with 74,267 additions and 9,282 deletions.
1 change: 0 additions & 1 deletion PHX/from_WUFI_XML/phx_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,6 @@ def _spec_cap_WH_m2k(_input):
else:
return 3

print("-" * 25)
phx_obj = PhxZone()

phx_obj.zone_type = ZoneType(_data.KindZone)
Expand Down
27 changes: 10 additions & 17 deletions _testing_WUFI_to_PHX.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

print(" -" * 50)
for i, xm_source_file_name in enumerate(SOURCE_FILE_NAMES):
print(f" -" * 25)
xm_source_file = SOURCE_DIR / xm_source_file_name

# ----------------------------------------------------------------
Expand All @@ -31,19 +30,13 @@
# -- 2) Convert the Pydantic WUFI model over to a PHX model
print(f"[green bold]> Converting XML-data to a PHX-Model[/green bold]")
phx_project = convert_WUFI_XML_to_PHX_project(wufi_xml_model)
for variant in phx_project.variants:
print(f" - - - - {variant.name} - - - - - ")
for i, aperture in enumerate(variant.building.aperture_components):
print(
f"\t{i :03d} | ap-id={aperture.id_num :04d} | host-id={aperture.host.id_num :04d} | {aperture.display_name}"
)

# # ----------------------------------------------------------------
# # -- 3) Output the PHX model back to a WUFI-XML
# target_file = TARGET_DIR / xm_source_file_name
# xml_txt = xml_builder.generate_WUFI_XML_from_object(phx_project)

# # ----------------------------------------------------------------
# # -- 4) Save the XML file
# print(f"[bold]> Saving the XML file to: ./{target_file}[/bold]")
# xml_txt_to_file.write_XML_text_file(target_file, xml_txt, False)

# ----------------------------------------------------------------
# -- 3) Output the PHX model back to a WUFI-XML
target_file = TARGET_DIR / xm_source_file_name
xml_txt = xml_builder.generate_WUFI_XML_from_object(phx_project)

# ----------------------------------------------------------------
# -- 4) Save the XML file
print(f"[bold]> Saving the XML file to: ./{target_file}[/bold]")
xml_txt_to_file.write_XML_text_file(target_file, xml_txt, False)
4 changes: 2 additions & 2 deletions tests/_reference_xml/Default_Model_Single_Zone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<Components count="3">
<Component index="0">
<IdentNr>5</IdentNr>
<Name>Room_1_95f6e17f..Face4</Name>
<Name>Room_1_6a6ec134..Face4</Name>
<Visual>true</Visual>
<Type>1</Type>
<IdentNrColorI>12</IdentNrColorI>
Expand All @@ -218,7 +218,7 @@
</Component>
<Component index="1">
<IdentNr>6</IdentNr>
<Name>Room_1_95f6e17f..Face5</Name>
<Name>Room_1_6a6ec134..Face5</Name>
<Visual>true</Visual>
<Type>1</Type>
<IdentNrColorI>7</IdentNrColorI>
Expand Down
Loading

0 comments on commit 07aa423

Please sign in to comment.