Skip to content

Commit 26e08cb

Browse files
committed
Align path naming with buildstock output conventions in utils/tests
1 parent ab55db3 commit 26e08cb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/test_cohort_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_get_load_curve_dir(self):
9292

9393
def test_find_load_curve_file_expected_path(self):
9494
with patch("pathlib.Path.exists", return_value=True):
95-
load_curve_dir = Path("/data/resstock/load_curve_15min")
95+
load_curve_dir = Path("/data/resstock/load_curve_hourly")
9696
result = find_load_curve_file(
9797
load_curve_dir=load_curve_dir,
9898
bldg_id=12345,
@@ -105,7 +105,7 @@ def test_find_load_curve_file_expected_path(self):
105105
def test_find_load_curve_file_returns_none_when_missing(self):
106106
with patch("pathlib.Path.exists", return_value=False):
107107
with patch("pathlib.Path.rglob", return_value=[]):
108-
load_curve_dir = Path("/data/resstock/load_curve_15min")
108+
load_curve_dir = Path("/data/resstock/load_curve_hourly")
109109
result = find_load_curve_file(
110110
load_curve_dir=load_curve_dir,
111111
bldg_id=99999,

utils/buildstock_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def find_load_curve_file(
8181
"""Find the load curve parquet file for a specific building/upgrade.
8282
8383
buildstock-fetch writes:
84-
load_curve_15min/state={STATE}/upgrade={ID}/<bldg_id>-<ID>.parquet
84+
load_curve_*/*state={STATE}/upgrade={ID}/<bldg_id>-<ID>.parquet
8585
where <ID> may appear zero-padded or not. We check common variants before
8686
falling back to a glob search.
8787
"""

utils/resstock_cumulative_adoption.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ def fetch_baseline_and_upgrade_data(
6868

6969
baseline_paths, baseline_failed = fetch_bldg_data(
7070
bldg_ids=baseline_ids,
71-
file_type=("metadata", "load_curve_15min"),
71+
file_type=("metadata", "load_curve_hourly"),
7272
output_dir=output_dir,
7373
max_workers=max_workers,
7474
)
7575
hp_paths, hp_failed = fetch_bldg_data(
7676
bldg_ids=hp_ids,
77-
file_type=("metadata", "load_curve_15min"),
77+
file_type=("metadata", "load_curve_hourly"),
7878
output_dir=output_dir,
7979
max_workers=max_workers,
8080
)

0 commit comments

Comments
 (0)