mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added sql model to db
This commit is contained in:
parent
a946eb2959
commit
f8736d3574
2 changed files with 15 additions and 6 deletions
11
.github/workflows/unit_tests.yml
vendored
11
.github/workflows/unit_tests.yml
vendored
|
|
@ -33,6 +33,17 @@ jobs:
|
|||
- name: Build test image
|
||||
run: docker build -f Dockerfile.test -t model-test .
|
||||
|
||||
- name: Initialise database schema
|
||||
run: |
|
||||
docker run --rm \
|
||||
--network host \
|
||||
-e DB_HOST=localhost \
|
||||
-e DB_NAME=test \
|
||||
-e DB_USERNAME=test \
|
||||
-e DB_PASSWORD=test \
|
||||
-e DB_PORT=5432 \
|
||||
model-test python scripts/init_db.py
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
docker run --rm \
|
||||
|
|
|
|||
|
|
@ -26,15 +26,13 @@ from backend.app.db.functions.materials_functions import get_materials
|
|||
from collections import defaultdict
|
||||
from sqlalchemy import func
|
||||
|
||||
# PORTFOLIO_ID = 206
|
||||
# SCENARIOS = [389]
|
||||
PORTFOLIO_ID = 633
|
||||
SCENARIOS = [1146]
|
||||
PORTFOLIO_ID = 639
|
||||
SCENARIOS = [1157]
|
||||
scenario_names = {
|
||||
1146: "Most Economic",
|
||||
1157: "EPC C - no EWI solid floor",
|
||||
}
|
||||
|
||||
project_name = "WCHG EPC D rated properties"
|
||||
project_name = "Instagroup Sample"
|
||||
|
||||
|
||||
def get_data(portfolio_id, scenario_ids):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue