wrong code

This commit is contained in:
Jun-te Kim 2025-12-03 12:54:05 +00:00
parent 05027c3328
commit 1adf7f6950
2 changed files with 20 additions and 9 deletions

View file

@ -3,15 +3,17 @@ import dash_bootstrap_components as dbc
import pandas as pd
from datetime import datetime, timedelta
from dash import ctx
import json
import os
from backend.src.dashboard.services.file_manager import FileManager
from backend.src.dashboard.services.json_reader import jsonReader
from backend.src.dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday
# from backend.src.dashboard.services.file_manager import FileManager
# from backend.src.dashboard.services.json_reader import jsonReader
# from backend.src.dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday
# from dashboard.services.file_manager import FileManager
# from dashboard.services.json_reader import jsonReader
# from dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday
from dashboard.services.file_manager import FileManager
from dashboard.services.json_reader import jsonReader
from dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday
SAFE_DELIM = "\\\\"
@ -27,9 +29,15 @@ def current_week_start():
# -----------------------------------------------------
# Load & Build Master DF
# -----------------------------------------------------
def build_master_df():
s3 = FileManager()
key, path, data = s3.download_and_read_latest()
def build_master_df(local=False):
local=True
if local is False:
s3 = FileManager()
key, path, data = s3.download_and_read_latest()
else:
file_path = os.path.join(os.path.dirname(__file__), "data.json")
with open(file_path, "r") as f:
data = json.load(f)
hubspot_data = jsonReader(data)
frames = []

View file

@ -124,6 +124,9 @@ class HubSpotClientAsync:
'design_planned_week',
'retrofit_design_status',
'design_completion_date',
'item_id__monday_com_',
'funding_type',
'coordination_status__stage_1_',
]
)