renamed epc_data to model_data

This commit is contained in:
Khalim Conn-Kowlessar 2023-06-15 15:05:50 +01:00
parent cee74f09e5
commit 446531b974
43 changed files with 53 additions and 53 deletions

View file

@ -1,7 +1,7 @@
[run]
omit =
epc_data/tests/*
epc_data/temp_inputs.py
epc_data/config.py
epc_data/__init__.py
epc_data/app.py
model_data/tests/*
model_data/temp_inputs.py
model_data/config.py
model_data/__init__.py
model_data/app.py

View file

@ -10,10 +10,10 @@ part of a larger application
# Folders
### epc_data/
### model_data/
This folder contains related to the reading and preparation of
epc data
assessment model data, including pulling out epc attributes
# Testing
@ -26,10 +26,10 @@ pytest
This will run the complete panel of tests and report on coverage in the locations specified
by the pytest.ini file.
To run tests in a specific service, e.g. inside of epc_data, simple run
To run tests in a specific service, e.g. inside of model_data, simple run
```commandline
pytest epc_data
pytest model_data
```
This will produce the test results and coverage reports

View file

@ -1,8 +1,8 @@
from typing import List, Dict, Any
from collections import Counter
from epc_data.attributes.RoofAttributes import RoofAttributes
from epc_data.attributes.FloorAttributes import FloorAttributes
from model_data.attributes.RoofAttributes import RoofAttributes
from model_data.attributes.FloorAttributes import FloorAttributes
class EpcClean:

View file

@ -1,5 +1,5 @@
from epc_api.client import EpcClient
from epc_data.config import EPC_AUTH_TOKEN
from model_data.config import EPC_AUTH_TOKEN
class Property:

View file

@ -28,7 +28,7 @@ and click OK, or select the conda environment from the dropdown.
You may need to restart Pycharm for the new interpreter to be recognised.
To install project dependencies navigate to /epc_data and run
To install project dependencies navigate to /model_data and run
```commandline
pip install -r requirements.txt

View file

@ -1,12 +1,12 @@
import pandas as pd
from tqdm import tqdm
from epc_data.temp_inputs import input_data
from epc_data.Property import Property
from epc_data.config import EPC_AUTH_TOKEN
from model_data.temp_inputs import input_data
from model_data.Property import Property
from model_data.config import EPC_AUTH_TOKEN
from epc_api.client import EpcClient
from epc_data.downloader import pagenated_epc_download
from epc_data.EpcClean import EpcClean
from model_data.downloader import pagenated_epc_download
from model_data.EpcClean import EpcClean
def handler():
@ -40,7 +40,7 @@ def handler():
cleaner.clean()
# For testing:
from epc_data.attributes.HotWaterAttributes import HotWaterAttributes
from model_data.attributes.HotWaterAttributes import HotWaterAttributes
from collections import Counter
count = Counter([x["main-fuel"] for x in data])
descriptions = {x["hotwater-description"] for x in data}

View file

@ -1,5 +1,5 @@
from typing import Dict, Union, Optional
from epc_data.attributes.attribute_utils import extract_thermal_transmittance, extract_component_types
from model_data.attributes.attribute_utils import extract_thermal_transmittance, extract_component_types
class FloorAttributes:

View file

@ -1,5 +1,5 @@
from typing import Dict, Union
from epc_data.attributes.attribute_utils import clean_description, remove_punctuation, find_keyword
from model_data.attributes.attribute_utils import clean_description, remove_punctuation, find_keyword
class HotWaterAttributes:

View file

@ -1,5 +1,5 @@
from typing import Dict, Union
from epc_data.attributes.attribute_utils import clean_description, remove_punctuation, find_keyword
from model_data.attributes.attribute_utils import clean_description, remove_punctuation, find_keyword
class MainFuelAttributes:

View file

@ -1,4 +1,4 @@
from epc_data.attributes.attribute_utils import clean_description, process_part
from model_data.attributes.attribute_utils import clean_description, process_part
from typing import Dict, Union

View file

@ -1,5 +1,5 @@
from typing import Dict, Union
from epc_data.attributes.attribute_utils import clean_description, remove_punctuation, find_keyword
from model_data.attributes.attribute_utils import clean_description, remove_punctuation, find_keyword
class MainheatControlAttributes:

View file

@ -1,6 +1,6 @@
import re
from typing import Dict, Union
from epc_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittance
from model_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittance
class RoofAttributes:

View file

@ -1,5 +1,5 @@
from typing import Dict, Union
from epc_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittance
from model_data.attributes.attribute_utils import extract_component_types, extract_thermal_transmittance
class WallAttributes:

View file

@ -1,5 +1,5 @@
from typing import Dict, Union
from epc_data.attributes.attribute_utils import clean_description
from model_data.attributes.attribute_utils import clean_description
class WindowAttributes:

View file

@ -1,6 +1,6 @@
import os
from dotenv import load_dotenv
load_dotenv(dotenv_path='epc_data/.env')
load_dotenv(dotenv_path='model_data/.env')
EPC_AUTH_TOKEN = os.environ.get('EPC_AUTH_TOKEN')

View file

@ -1,5 +1,5 @@
import pytest
import epc_data.attributes.attribute_utils as attribute_utils
import model_data.attributes.attribute_utils as attribute_utils
def test_extract_thermal_transmittance():

View file

@ -1,6 +1,6 @@
import pytest
from epc_api.client import EpcClient
from epc_data.downloader import pagenated_epc_download
from model_data.downloader import pagenated_epc_download
# Mock EPC search response
mock_epc_response = {

View file

@ -1,11 +1,11 @@
import pytest
import pickle
from epc_data.EpcClean import EpcClean
from model_data.EpcClean import EpcClean
from pathlib import Path
# For local testing
if __file__ == "<input>":
input_data_path = Path("./epc_data/tests/test_data/EpcClean_inputs.obj")
input_data_path = Path("./model_data/tests/test_data/EpcClean_inputs.obj")
else:
current_file_path = Path(__file__)
input_data_path = current_file_path.parent / 'test_data' / 'EpcClean_inputs.obj'

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.tests.test_data.test_floor_attributes_cases import clean_floor_cases
from epc_data.attributes.FloorAttributes import FloorAttributes
from model_data.tests.test_data.test_floor_attributes_cases import clean_floor_cases
from model_data.attributes.FloorAttributes import FloorAttributes
class TestCleanFloor:

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.attributes.HotWaterAttributes import HotWaterAttributes
from epc_data.tests.test_data.test_hot_water_attributes_cases import hotwater_cases
from model_data.attributes.HotWaterAttributes import HotWaterAttributes
from model_data.tests.test_data.test_hot_water_attributes_cases import hotwater_cases
class TestHotWaterAttributes:

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.attributes.MainFuelAttributes import MainFuelAttributes
from epc_data.tests.test_data.test_main_fuel_attributes_cases import mainfuel_cases
from model_data.attributes.MainFuelAttributes import MainFuelAttributes
from model_data.tests.test_data.test_main_fuel_attributes_cases import mainfuel_cases
class TestMainHeatControlAttributes:

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.attributes.MainheatAttributes import MainHeatAttributes
from epc_data.tests.test_data.test_mainheat_attributes_cases import mainheat_cases
from model_data.attributes.MainheatAttributes import MainHeatAttributes
from model_data.tests.test_data.test_mainheat_attributes_cases import mainheat_cases
class TestMainHeatAttributes:

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.attributes.MainheatControlAttributes import MainheatControlAttributes
from epc_data.tests.test_data.test_mainheat_control_attributes_cases import mainheat_control_cases
from model_data.attributes.MainheatControlAttributes import MainheatControlAttributes
from model_data.tests.test_data.test_mainheat_control_attributes_cases import mainheat_control_cases
class TestMainHeatControlAttributes:

View file

@ -1,7 +1,7 @@
import pytest
from unittest.mock import Mock
from epc_api.client import EpcClient
from epc_data.Property import Property
from model_data.Property import Property
# Define some test data
mock_epc_response = {

View file

@ -1,13 +1,13 @@
import pytest
import pickle
from epc_data.EpcClean import EpcClean
from model_data.EpcClean import EpcClean
from pathlib import Path
from epc_data.tests.test_data.test_roof_attributes_cases import clean_roof_test_cases
from epc_data.attributes.RoofAttributes import RoofAttributes
from model_data.tests.test_data.test_roof_attributes_cases import clean_roof_test_cases
from model_data.attributes.RoofAttributes import RoofAttributes
# For local testing
if __file__ == "<input>":
input_data_path = Path("./epc_data/tests/test_data/EpcClean_inputs.obj")
input_data_path = Path("./model_data/tests/test_data/EpcClean_inputs.obj")
else:
current_file_path = Path(__file__)
input_data_path = current_file_path.parent / 'test_data' / 'EpcClean_inputs.obj'

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.attributes.WallAttributes import WallAttributes
from epc_data.tests.test_data.test_wall_attributes_cases import wall_cases
from model_data.attributes.WallAttributes import WallAttributes
from model_data.tests.test_data.test_wall_attributes_cases import wall_cases
class TestWallAttributes:

View file

@ -1,6 +1,6 @@
import pytest
from epc_data.attributes.WindowAttributes import WindowAttributes
from epc_data.tests.test_data.test_window_attributes_cases import windows_cases
from model_data.attributes.WindowAttributes import WindowAttributes
from model_data.tests.test_data.test_window_attributes_cases import windows_cases
class TestWindowAttributes:

View file

@ -1,3 +1,3 @@
[pytest]
addopts = --cov-report term-missing --cov=epc_data
testpaths = epc_data/tests
addopts = --cov-report term-missing --cov=model_data
testpaths = model_data/tests