mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
change unit tests to run on every pr
This commit is contained in:
parent
4ae439ddd3
commit
6e2da7c166
3 changed files with 4 additions and 14 deletions
11
.github/workflows/unit_tests.yml
vendored
11
.github/workflows/unit_tests.yml
vendored
|
|
@ -1,9 +1,9 @@
|
||||||
name: Run unit tests
|
name: Run unit tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|
@ -22,13 +22,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make setup
|
make setup
|
||||||
|
|
||||||
- name: Set dev AWS credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: eu-west-2
|
|
||||||
|
|
||||||
- name: Run tests with tox via Makefile
|
- name: Run tests with tox via Makefile
|
||||||
env:
|
env:
|
||||||
EPC_AUTH_TOKEN: ${{ secrets.DEV_EPC_AUTH_TOKEN }}
|
EPC_AUTH_TOKEN: ${{ secrets.DEV_EPC_AUTH_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -885,13 +885,11 @@ async def model_engine(body: PlanTriggerRequest):
|
||||||
)
|
)
|
||||||
|
|
||||||
# The materials data could be cached or local so we don't need to make
|
# The materials data could be cached or local so we don't need to make
|
||||||
# consistent requests to the backend for
|
# consistent requests to the backend for the same data
|
||||||
# the same data
|
|
||||||
logger.info("Reading in materials and cleaned datasets")
|
logger.info("Reading in materials and cleaned datasets")
|
||||||
with db_read_session() as session:
|
with db_read_session() as session:
|
||||||
materials = db_funcs.materials_functions.get_materials(session)
|
materials = db_funcs.materials_functions.get_materials(session)
|
||||||
cleaned = get_cleaned()
|
cleaned = get_cleaned()
|
||||||
# project_scores_matrix, partial_project_scores_matrix, whlg_eligible_postcodes = get_funding_data()
|
|
||||||
|
|
||||||
kwh_client = KwhData(bucket=get_settings().DATA_BUCKET, read_consumption_data=True)
|
kwh_client = KwhData(bucket=get_settings().DATA_BUCKET, read_consumption_data=True)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1265,8 +1265,7 @@ class HeatingRecommender:
|
||||||
|
|
||||||
# We check if there's a mains connection and the hot water is inefficient, as this will improve with a boiler
|
# We check if there's a mains connection and the hot water is inefficient, as this will improve with a boiler
|
||||||
has_inefficient_water = (
|
has_inefficient_water = (
|
||||||
self.property.data["mains-gas-flag"] and
|
self.property.data["mains-gas-flag"] and self.property.data["hot-water-energy-eff"] in ["Very Poor", "Poor"]
|
||||||
self.property.data["hot-water-energy-eff"] in ["Very Poor", "Poor"]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
non_invasive_recommendation = next((
|
non_invasive_recommendation = next((
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue