From 5b9e2ffa43db20e721150a15e28d0dbf0b3ad203 Mon Sep 17 00:00:00 2001 From: Florez Ospina Juan Felipe Date: Wed, 29 Jan 2025 09:20:10 +0100 Subject: [PATCH] Add code to identify the file path, which is key to find the dima submodule. --- data_flagging_app.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/data_flagging_app.py b/data_flagging_app.py index f1b80a9..40a456d 100644 --- a/data_flagging_app.py +++ b/data_flagging_app.py @@ -1,5 +1,17 @@ import sys, os +try: + thisFilePath = os.path.abspath(__file__) + print(thisFilePath) +except NameError: + print("[Notice] The __file__ attribute is unavailable in this environment (e.g., Jupyter or IDLE).") + print("When using a terminal, make sure the working directory is set to the script's location to prevent path issues (for the DIMA submodule)") + #print("Otherwise, path to submodule DIMA may not be resolved properly.") + thisFilePath = os.getcwd() # Use current directory or specify a default + +dimaPath = os.path.normpath(os.path.join(thisFilePath, "..",'..')) # Move up to project root + +print(dimaPath) import pandas as pd import numpy as np @@ -176,6 +188,8 @@ app.layout = dbc.Container([ ], ) +#@app.callback() + @app.callback( Output('memory-output','data'), Output('timeseries-plot', 'figure'),