Commit 1f5ddbf5 authored by Eric Duminil's avatar Eric Duminil
Browse files

Renamed templates, without 100 prefix

parent 28c17ea5
...@@ -48,11 +48,11 @@ def find_output_files(workflow_path: Path) -> list[Path]: ...@@ -48,11 +48,11 @@ def find_output_files(workflow_path: Path) -> list[Path]:
def heating_results() -> SimStadtResults: def heating_results() -> SimStadtResults:
output_files = [ output_files = [
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/101_HeatDemand.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn", / "CGSC.proj/HeatDemand.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn",
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/101_HeatDemand.flow/04_MonthlyEnergyBalance.step/Grombuehl_mini_Steinheilstrasse_DIN18599_HEATING.csv", / "CGSC.proj/HeatDemand.flow/04_MonthlyEnergyBalance.step/Grombuehl_mini_Steinheilstrasse_DIN18599_HEATING.csv",
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/101_HeatDemand.flow/04_MonthlyEnergyBalance.step/Grombuehl_mini_Steinheilstrasse_DIN18599_HEATING.log", / "CGSC.proj/HeatDemand.flow/04_MonthlyEnergyBalance.step/Grombuehl_mini_Steinheilstrasse_DIN18599_HEATING.log",
] ]
return create_simstadt_results("Heat demand simulation for Grombühl", output_files) return create_simstadt_results("Heat demand simulation for Grombühl", output_files)
...@@ -159,7 +159,7 @@ def test_heating_repr(heating_results): ...@@ -159,7 +159,7 @@ def test_heating_repr(heating_results):
def heating_and_cooling_results() -> SimStadtResults: def heating_and_cooling_results() -> SimStadtResults:
return create_simstadt_results( return create_simstadt_results(
"Heating and cooling demand simulation for Grombühl", "Heating and cooling demand simulation for Grombühl",
find_output_files(PROJECT1_PATH / "104_HeatAndCoolDemand.flow"), find_output_files(PROJECT1_PATH / "HeatAndCoolDemand.flow"),
) )
...@@ -196,7 +196,7 @@ def test_heating_and_cooling_diagrams(heating_and_cooling_results): ...@@ -196,7 +196,7 @@ def test_heating_and_cooling_diagrams(heating_and_cooling_results):
def cooling_results() -> SimStadtResults: def cooling_results() -> SimStadtResults:
return create_simstadt_results( return create_simstadt_results(
"Cooling demand simulation for Grombühl", "Cooling demand simulation for Grombühl",
find_output_files(PROJECT1_PATH / "105_CoolingDemand.flow"), find_output_files(PROJECT1_PATH / "CoolingDemand.flow"),
) )
...@@ -224,9 +224,9 @@ def test_cooling_kpis(cooling_results): ...@@ -224,9 +224,9 @@ def test_cooling_kpis(cooling_results):
def greenwater_results() -> SimStadtResults: def greenwater_results() -> SimStadtResults:
output_files = [ output_files = [
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/102_GreenWater.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn", / "CGSC.proj/GreenWater.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn",
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/102_GreenWater.flow/03_GreenWater.step/Grombühl_mini_with_trees_greenwater.csv", / "CGSC.proj/GreenWater.flow/03_GreenWater.step/Grombühl_mini_with_trees_greenwater.csv",
] ]
return create_simstadt_results("Green Water simulation for Grombühl", output_files) return create_simstadt_results("Green Water simulation for Grombühl", output_files)
...@@ -345,9 +345,9 @@ def test_greenwater_repr(greenwater_results): ...@@ -345,9 +345,9 @@ def test_greenwater_repr(greenwater_results):
def pv_results() -> SimStadtResults: def pv_results() -> SimStadtResults:
output_files = [ output_files = [
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/103_PV.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn", / "CGSC.proj/PV.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn",
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/103_PV.flow/04_PhotovoltaicPotential.step/Grombühl_mini_with_trees_meteonorm_Hay_pv_potential.csv", / "CGSC.proj/PV.flow/04_PhotovoltaicPotential.step/Grombühl_mini_with_trees_meteonorm_Hay_pv_potential.csv",
] ]
return create_simstadt_results("PV for Grombühl", output_files) return create_simstadt_results("PV for Grombühl", output_files)
...@@ -435,9 +435,9 @@ def test_pv_no_log(pv_results): ...@@ -435,9 +435,9 @@ def test_pv_no_log(pv_results):
def test_greenwater_without_trees(): def test_greenwater_without_trees():
output_files = [ output_files = [
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/102_GreenWater.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn", / "CGSC.proj/GreenWater.flow/02_WeatherProcessor.step/hourly_GHI_DHI_Ta_meteonorm_Wuerzburg.prn",
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/102_GreenWater.flow/03_GreenWater.step/Grombühl_mini_greenwater.csv", / "CGSC.proj/GreenWater.flow/03_GreenWater.step/Grombühl_mini_greenwater.csv",
] ]
results = create_simstadt_results("Green Water without trees", output_files) results = create_simstadt_results("Green Water without trees", output_files)
with pytest.raises(ValueError, match="any tree"): with pytest.raises(ValueError, match="any tree"):
...@@ -614,9 +614,9 @@ def test_solar_repr(solar_results): ...@@ -614,9 +614,9 @@ def test_solar_repr(solar_results):
def test_broken_simulation(): def test_broken_simulation():
output_files = [ output_files = [
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/103_PV.flow/02_WeatherProcessor.step/notATable.log", / "CGSC.proj/PV.flow/02_WeatherProcessor.step/notATable.log",
TEST_REPOSITORY TEST_REPOSITORY
/ "CGSC.proj/103_PV.flow/04_PhotovoltaicPotential.step/StillNotATable.png", / "CGSC.proj/PV.flow/04_PhotovoltaicPotential.step/StillNotATable.png",
] ]
results = create_simstadt_results("FakeTests", output_files) results = create_simstadt_results("FakeTests", output_files)
with pytest.raises(ValueError, match="any .csv file"): with pytest.raises(ValueError, match="any .csv file"):
......
...@@ -92,11 +92,11 @@ def test_citygml_creates_temp_repo(mock_simstadt): ...@@ -92,11 +92,11 @@ def test_citygml_creates_temp_repo(mock_simstadt):
@pytest.mark.integration @pytest.mark.integration
def test_bundled_template_name_resolves_without_env_var(simstadt_folder, monkeypatch, tmp_path): def test_bundled_template_name_resolves_without_env_var(simstadt_folder, monkeypatch, tmp_path):
"""A bare bundled template name (e.g. "103_PV") resolves via get_template_path()'s """A bare bundled template name (e.g. "PV") resolves via get_template_path()'s
fallback to the package's own templates/ directory, even with no SIMSTADT_TEMPLATE_PATH fallback to the package's own templates/ directory, even with no SIMSTADT_TEMPLATE_PATH
set — regression test for a real (non-mocked) SimStadt run.""" set — regression test for a real (non-mocked) SimStadt run."""
monkeypatch.delenv("SIMSTADT_TEMPLATE_PATH", raising=False) monkeypatch.delenv("SIMSTADT_TEMPLATE_PATH", raising=False)
results = run_workflow_with_citygml( results = run_workflow_with_citygml(
"103_PV", CITYGML, project_path=tmp_path / "Test.proj" "PV", CITYGML, project_path=tmp_path / "Test.proj"
) )
assert any(kpi.name == "PV potential yield" for kpi in results.kpis) assert any(kpi.name == "PV potential yield" for kpi in results.kpis)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment