diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cbeb010..5462694 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,8 @@ "extensions": [ "ms-python.python", "ms-azuretools.vscode-docker", - "ms-toolsai.jupyter" + "ms-toolsai.jupyter", + "mechatroner.rainbow-csv" ] } } diff --git a/etl/jjc_invoice.py b/etl/jjc_invoice.py index ca1538b..a2e82c3 100644 --- a/etl/jjc_invoice.py +++ b/etl/jjc_invoice.py @@ -3,6 +3,7 @@ from pprint import pformat from etl.pdfReader.pdfReaderToText import pdfReaderToText from etl.surveyedData.surveryedData import surveyedDataProcessor import pandas as pd +import math file_paths = [{'119 CUTNOOK LANE, M44 6LU': ['/tmp/sharepoint/Andy Rumfitt/W.C. 10.03.2025/FOR HOUSING/119 CUTNOOK LANE, M44 6LU/CSR - 119 Cutnook.pdf', '/tmp/sharepoint/Andy Rumfitt/W.C. 10.03.2025/FOR HOUSING/119 CUTNOOK LANE, M44 6LU/EPR.pdf', @@ -292,7 +293,7 @@ def work_out_total_floor_area(pre_site_note): total += add_all_floors(pre_site_note.property_description.ex4_proprerty.dimensions) if ext4 is True else 0 - return total + return math.ceil(total) if total%1 >=0.5 else math.floor(total) def main(): @@ -302,6 +303,7 @@ def main(): "Type of Work": [], "Price": [], "Total Floor Area": [], + "Empty/Cavity": [], } jjc = SharePointScraper(SharePointInstaller.JJC) @@ -320,10 +322,12 @@ def main(): data["Type of Work"].append("Caluclating...") data["Price"].append("Caluclating...") data["Total Floor Area"].append(total_floor_area) + data["Empty/Cavity"].append("None") if survey.csr: if survey.csr.insulation_info: - print(survey.csr.insulation_info.type) + data["Empty/Cavity"].pop() + data["Empty/Cavity"].append(survey.csr.insulation_info.type) @@ -339,4 +343,6 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() + +# TO DO compare floor area with deemed one \ No newline at end of file