Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up to #1 #5

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion database_tables/hvac_minimum_requirement_water_heaters.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
minimum_storage: NUMERIC
maximum_storage: NUMERIC
minimum_capacity_per_storage: NUMERIC
maximum_capacity_per_storage: NUMERIC
draw profile: TEXT
start_date: TEXT
end_date: TEXT
Expand Down Expand Up @@ -41,6 +42,7 @@
minimum_storage NUMERIC,
maximum_storage NUMERIC,
minimum_capacity_per_storage NUMERIC,
maximum_capacity_per_storage NUMERIC,
draw_profile TEXT,
start_date TEXT NOT NULL,
end_date TEXT NOT NULL,
Expand Down Expand Up @@ -70,6 +72,7 @@
minimum_storage,
maximum_storage,
minimum_capacity_per_storage,
maximum_capacity_per_storage,
draw_profile,
start_date,
end_date,
Expand All @@ -88,7 +91,7 @@
r_value,
annotation
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
"""

RECORD_TEMPLATE = {
Expand All @@ -100,6 +103,7 @@
"minimum_storage": 0.0,
"maximum_storage": 0.0,
"minimum_capacity_per_storage": 0.0,
"maximum_capacity_per_storage": 0.0,
"draw_profile": "",
"start_date": "",
"end_date": "",
Expand Down Expand Up @@ -159,6 +163,7 @@ def validate_record_datatype(self, record):
"minimum_storage",
"maximum_storage",
"minimum_capacity_per_storage",
"maximum_capacity_per_storage",
"energy_factor_base",
"energy_factor_volume_derate",
"standby_loss_base",
Expand Down Expand Up @@ -197,6 +202,7 @@ def _preprocess_record(self, record):
getattr_either("minimum_storage", record),
getattr_either("maximum_storage", record),
getattr_either("minimum_capacity_per_storage", record),
getattr_either("maximum_capacity_per_storage", record),
getattr_either("draw_profile", record),
getattr_either("start_date", record),
getattr_either("end_date", record),
Expand Down
Loading