epinterface 1.0.1__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {epinterface-1.0.1 → epinterface-1.0.3}/PKG-INFO +1 -1
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/fields/spec.py +28 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/utils.py +25 -2
- {epinterface-1.0.1 → epinterface-1.0.3}/pyproject.toml +1 -1
- {epinterface-1.0.1 → epinterface-1.0.3}/uv.lock +1 -1
- {epinterface-1.0.1 → epinterface-1.0.3}/.editorconfig +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.github/actions/setup-python-env/action.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.github/workflows/main.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.github/workflows/on-release-main.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.github/workflows/validate-codecov-config.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.gitignore +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.pre-commit-config.yaml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.prettierignore +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.python-version +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/.vscode/settings.json +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/CONTRIBUTING.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/LICENSE +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/Makefile +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/README.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/codecov.yaml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/cli.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/index.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/actions.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/builder.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/climate-studio.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/geometry.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/interface.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/sbem/components.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/sbem/composer.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/sbem/index.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/docs/modules/weather.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/actions.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/builder.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/cli.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/climate_studio/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/climate_studio/builder.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/climate_studio/interface.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/constants/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/data/Minimal.idf +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/data/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.ddy +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/data/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.epw +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/data/USA_MA_Boston-Logan.Intl.AP.725090_TMYx.2009-2023.zip +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/data/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/data/res_schedules.parquet +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/ddy_injector_bayes.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/ddy_interface_bayes.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/geometry.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/interface.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/py.typed +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/annotations.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/builder.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/common.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/composer.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/envelope.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/materials.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/operations.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/schedules.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/space_use.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/systems.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/components/zones.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/exceptions.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/fields/__init__.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/flat_model.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/interface.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/model_graph_structure.md +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/client.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250309133033_create_initial_schema/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250310162045_switch_to_using_one_week_per_month/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250317202733_change_names_ventilation/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250325185158_add_mutually_exclusive_ventilation_techtypes/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250326141941_reduce_naming_complexity_ventilation/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250331141910_add_support_for_attic_and_basement_constructions/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/20250919152559_decouple_basement_infiltration/migration.sql +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/migration_lock.toml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/partial_types.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/schema.prisma +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/seed_fns.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/epinterface/weather.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/mkdocs.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/everett_lib.json +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/everett_lib_v2.ipynb +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/everett_retrofit_actions.ipynb +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/everett_retrofits.yaml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/idf-demo.ipynb +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/idf-demo.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/notebooks/view-geo.ipynb +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/scripts/gridsim.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/conftest.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/20251001_Template_MAWebApp.xlsx +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/USA_MA_Chicopee-Westover.Metro.AP.744910_TMYx.2009-2023.zip +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/component-map-ma.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/components-ma.db +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/0318_Template_MAWebApp.xlsx +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/Template_MAWebApp.xlsx +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/component-map-ma.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/components-ma-old.db +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/components-ma.db +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/components-ma.db Kopie +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/components-ma.db Kopie 2 +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/components-ma.db Kopie 3 +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/old/semantic-fields-ma.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/semantic-fields-ma.yml +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/test_lib.json +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/data/tester_lib.xlsx +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_actions.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_components/test_builder.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_components/test_component_lib.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_components/test_envelope_comps.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_components/test_operations.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_components/test_space_use_comps.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_composer.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_db.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_example.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_geometry.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tests/test_weather.py +0 -0
- {epinterface-1.0.1 → epinterface-1.0.3}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: epinterface
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: This is a repository for dynamically generating energy models within Python, relying on Archetypal and Eppy for most of its functionality.
|
|
5
5
|
Project-URL: Homepage, https://github.com/szvsw/epinterface
|
|
6
6
|
Project-URL: Documentation, https://szvsw.github.io/epinterface
|
|
@@ -51,6 +51,34 @@ class SemanticModelFields(BaseModel):
|
|
|
51
51
|
GFA_col: str | None = Field(
|
|
52
52
|
default=None, description="The gross floor area column name [m2]."
|
|
53
53
|
)
|
|
54
|
+
Building_ID_col: str | None = Field(
|
|
55
|
+
default=None, description="The building ID column name."
|
|
56
|
+
)
|
|
57
|
+
Basement_col: str | None = Field(
|
|
58
|
+
default=None, description="The basement column name."
|
|
59
|
+
)
|
|
60
|
+
Attic_col: str | None = Field(default=None, description="The attic column name.")
|
|
61
|
+
Exposed_Basement_Frac_col: str | None = Field(
|
|
62
|
+
default=None, description="The exposed basement fraction column name."
|
|
63
|
+
)
|
|
64
|
+
Weather_File_col: str | None = Field(
|
|
65
|
+
default=None, description="The weather file column name."
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def semantic_field_names(self) -> list[str]:
|
|
70
|
+
"""The names of the semantic fields."""
|
|
71
|
+
return [f.Name for f in self.Fields]
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def rich_field_names(self) -> list[str | None]:
|
|
75
|
+
"""The names of the rich fields."""
|
|
76
|
+
return [v for k, v in self.model_dump().items() if k.endswith("_col")]
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def field_names(self) -> list[str | None]:
|
|
80
|
+
"""The names of the fields."""
|
|
81
|
+
return [*self.semantic_field_names, *self.rich_field_names]
|
|
54
82
|
|
|
55
83
|
@model_validator(mode="after")
|
|
56
84
|
def check_at_least_one_height_or_num_floors(self):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Utility functions for working with SBEMs."""
|
|
2
2
|
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import cast
|
|
4
|
+
from typing import Any, cast
|
|
5
5
|
|
|
6
6
|
import yaml
|
|
7
7
|
from tqdm.autonotebook import tqdm
|
|
@@ -15,11 +15,25 @@ from epinterface.sbem.fields.spec import SemanticModelFields
|
|
|
15
15
|
from epinterface.sbem.prisma.client import PrismaSettings
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
class ModelsNotConstructableError(Exception):
|
|
19
|
+
"""An error raised when the models are not constructable."""
|
|
20
|
+
|
|
21
|
+
def __init__(self, failing_contexts: list[dict[str, Any]]):
|
|
22
|
+
"""Initialize the error."""
|
|
23
|
+
self.failing_contexts = failing_contexts
|
|
24
|
+
printable_contexts = failing_contexts[: min(10, len(failing_contexts))]
|
|
25
|
+
msg = "The following contexts failed to resolve to a valid zone component:\n"
|
|
26
|
+
msg += "\n\n"
|
|
27
|
+
msg += yaml.dump(printable_contexts, indent=2, sort_keys=False)
|
|
28
|
+
super().__init__(msg)
|
|
29
|
+
|
|
30
|
+
|
|
18
31
|
def check_model_existence(
|
|
19
32
|
component_map_path: Path,
|
|
20
33
|
semantic_fields_path: Path,
|
|
21
34
|
db_path: Path,
|
|
22
35
|
max_tests: int = 100,
|
|
36
|
+
raise_on_error: bool = False,
|
|
23
37
|
) -> None:
|
|
24
38
|
"""Check if all semantic field combinations resolve to a valid zone component (up to some sampling limit).
|
|
25
39
|
|
|
@@ -34,6 +48,7 @@ def check_model_existence(
|
|
|
34
48
|
semantic_fields_path: Path to the semantic fields file.
|
|
35
49
|
db_path: Path to the database file.
|
|
36
50
|
max_tests: Maximum number of tests to run.
|
|
51
|
+
raise_on_error: Whether to raise an error if any tests fail.
|
|
37
52
|
"""
|
|
38
53
|
with open(semantic_fields_path) as f:
|
|
39
54
|
semantic_fields_yaml = yaml.safe_load(f)
|
|
@@ -61,8 +76,13 @@ def check_model_existence(
|
|
|
61
76
|
grid = grid.sample(min(max_tests, len(grid)))
|
|
62
77
|
|
|
63
78
|
# Checks that things that should be in the db are in the db
|
|
79
|
+
failing_contexts = []
|
|
64
80
|
with db:
|
|
65
|
-
for _ix, row in tqdm(
|
|
81
|
+
for _ix, row in tqdm(
|
|
82
|
+
grid.iterrows(),
|
|
83
|
+
total=len(grid),
|
|
84
|
+
desc="Checking semantic field/component lib compatibility.",
|
|
85
|
+
):
|
|
66
86
|
context = row.to_dict()
|
|
67
87
|
for field_name, field_val in field_vals.items():
|
|
68
88
|
context[field_name] = field_val[context[field_name]]
|
|
@@ -72,3 +92,6 @@ def check_model_existence(
|
|
|
72
92
|
)
|
|
73
93
|
except Exception as e:
|
|
74
94
|
print(f"\nError: {e}, context: {context}\n")
|
|
95
|
+
failing_contexts.append(context)
|
|
96
|
+
if raise_on_error and failing_contexts:
|
|
97
|
+
raise ModelsNotConstructableError(failing_contexts)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "epinterface"
|
|
3
|
-
version = "v1.0.
|
|
3
|
+
version = "v1.0.3"
|
|
4
4
|
description = "This is a repository for dynamically generating energy models within Python, relying on Archetypal and Eppy for most of its functionality."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{epinterface-1.0.1 → epinterface-1.0.3}/epinterface/sbem/prisma/migrations/migration_lock.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|