From 8f2dea1998080d2a987f7a4273b55d99852e52d6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Feb 2026 00:38:49 +0000 Subject: [PATCH 1/3] Add single building simulation CLI test and integrate into e2e workflow - Add tests/data/e2e/single-building.yml config for single building simulation - Add 'tests single-building' CLI command (similar to tests e2e) - Run single building test in e2e workflow after engine start, before full e2e Co-authored-by: Sam Wolk --- .github/workflows/e2e-integration.yml | 6 ++++++ src/globi/tools/cli/main.py | 30 +++++++++++++++++++++++++++ tests/data/e2e/single-building.yml | 20 ++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 tests/data/e2e/single-building.yml diff --git a/.github/workflows/e2e-integration.yml b/.github/workflows/e2e-integration.yml index a61c8da..d33ce16 100644 --- a/.github/workflows/e2e-integration.yml +++ b/.github/workflows/e2e-integration.yml @@ -104,6 +104,12 @@ jobs: AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} AWS_REGION: ${{ secrets.AWS_REGION }} + - name: Run single building simulation test + run: make cli-native tests single-building + env: + AWS_ENV: local.host + HATCHET_ENV: local.host + - name: Run E2E experiment id: e2e run: | diff --git a/src/globi/tools/cli/main.py b/src/globi/tools/cli/main.py index f055c68..e36e447 100644 --- a/src/globi/tools/cli/main.py +++ b/src/globi/tools/cli/main.py @@ -203,6 +203,36 @@ def tests(): pass +@tests.command() +@click.option( + "--config", + type=click.Path(exists=True), + default="tests/data/e2e/single-building.yml", + help="Path to the single building config YAML file.", +) +@click.option( + "--output-dir", + type=click.Path(file_okay=False), + default="outputs/single-building-test", + help="Output directory for simulation results.", +) +@click.pass_context +def single_building( + ctx: click.Context, + config: str = "tests/data/e2e/single-building.yml", + output_dir: str = "outputs/single-building-test", +): + """Run single building simulation test. + + Intended for CI; run with: make cli-native tests single-building + """ + import sys + + ctx.invoke(simulate, config=Path(config), output_dir=Path(output_dir)) + print("Single building simulation test passed.") + sys.exit(0) + + @tests.command() @click.option( "--manifest", diff --git a/tests/data/e2e/single-building.yml b/tests/data/e2e/single-building.yml new file mode 100644 index 0000000..2e0e819 --- /dev/null +++ b/tests/data/e2e/single-building.yml @@ -0,0 +1,20 @@ +# Single building simulation config for CLI/CI testing. +# Uses test data from tests/data/e2e/ - run from repo root. +db_file: tests/data/e2e/components-lib.db +semantic_fields_file: tests/data/e2e/semantic-fields.yml +component_map_file: tests/data/e2e/component-map.yml +epwzip_file: "https://climate.onebuilding.org/WMO_Region_4_North_and_Central_America/USA_United_States_of_America/MA_Massachusetts/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.zip" +semantic_field_context: + Region: TestRegion + Typology: Residential + Age_bracket: Post_2000 + Scenario: Baseline + Income: Low +length: 20.0 +width: 15.0 +num_floors: 2 +f2f_height: 3.5 +wwr: 0.3 +basement: none +attic: none +exposed_basement_frac: 0.25 From 8bc7c771ac9a4ca1fc72751ee48cec080ee0d1c9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Feb 2026 00:49:36 +0000 Subject: [PATCH 2/3] Use Docker CLI for single-building test (EnergyPlus in containers) - Add tests/ volume mount to simulations service for test data access - Switch workflow from make cli-native to make cli for single-building test Co-authored-by: Sam Wolk --- .github/workflows/e2e-integration.yml | 2 +- docker-compose.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-integration.yml b/.github/workflows/e2e-integration.yml index d33ce16..f3e3cd6 100644 --- a/.github/workflows/e2e-integration.yml +++ b/.github/workflows/e2e-integration.yml @@ -105,7 +105,7 @@ jobs: AWS_REGION: ${{ secrets.AWS_REGION }} - name: Run single building simulation test - run: make cli-native tests single-building + run: make cli tests single-building env: AWS_ENV: local.host HATCHET_ENV: local.host diff --git a/docker-compose.yml b/docker-compose.yml index 497b8a1..498fdf5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: volumes: - ./inputs:/code/inputs - ./outputs:/code/outputs + - ./tests:/code/tests fanouts: image: ${AWS_ACCOUNT_ID:-123456789012}.dkr.ecr.${AWS_REGION:-us-east-1}.amazonaws.com/hatchet/globi:${IMAGE_TAG:-latest} build: From f91bf3632be7006aa4ff67b9658075b67f5032c4 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Feb 2026 13:40:39 +0000 Subject: [PATCH 3/3] Only mount tests/data/e2e for single-building test Co-authored-by: Sam Wolk --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 498fdf5..c5a1d8a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: volumes: - ./inputs:/code/inputs - ./outputs:/code/outputs - - ./tests:/code/tests + - ./tests/data/e2e:/code/tests/data/e2e fanouts: image: ${AWS_ACCOUNT_ID:-123456789012}.dkr.ecr.${AWS_REGION:-us-east-1}.amazonaws.com/hatchet/globi:${IMAGE_TAG:-latest} build: