Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
fix on loading config file
  • Loading branch information
abearab committed Jun 26, 2024
1 parent 70af506 commit 217bedd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CanDI/setup/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ def __init__(self, manager_path='auto', cfig_path='auto', verbose=False):
os.makedirs(manager_path)

if cfig_path == 'auto':
cfig_path = manager_path + "/data/config.ini"
if not os.path.exists(manager_path + "/data/config.ini"):
cfig_path = manager_path + "/data/config.draft.ini"
else:
cfig_path = manager_path + "/data/config.ini"

if verbose:
print(f"Manager Path: {manager_path}")
print(f"Config Path: {cfig_path}")

parser = configparser.ConfigParser()
parser.read(cfig_path.replace(".ini", ".draft.ini"))
parser.read(cfig_path)

self.manager_path = manager_path
self.cfig_path = Path(cfig_path)
Expand Down Expand Up @@ -363,7 +366,6 @@ def coessentiality_autoformat(self):
# Check if the data has already been formatted or run the formatting
if os.path.exists(coessentiality_matrix_path):
if self.verbose: print("coessentiality_matrix.csv already exists")
self.matrix = pl.read_csv(coessentiality_matrix_path)

else:
if self.verbose: print("Building Coessentiality Matrix ...", end=' ')
Expand All @@ -373,7 +375,6 @@ def coessentiality_autoformat(self):

if os.path.exists(coessentiality_df_path):
if self.verbose: print("coessentiality_df.csv already exists")
self.df = pl.read_csv(coessentiality_df_path)

else:
if self.verbose: print("Building Coessentiality DataFrame ...", end=' ')
Expand Down

0 comments on commit 217bedd

Please sign in to comment.