Skip to content

Commit

Permalink
auto create cohorts folder when does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Aug 2, 2024
1 parent 47eb269 commit b551535
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ def init_triplestore() -> None:
if publish_graph_to_endpoint(g):
print(f"🦉 Triplestore initialization: added {len(g)} triples for the iCARE4CVD Cohort Explorer OWL ontology.")

os.makedirs(os.path.join(settings.data_folder, "cohorts"), exist_ok=True)
# Load cohorts data dictionaries already present in data/cohorts/
for folder in os.listdir(os.path.join(settings.data_folder, "cohorts")):
folder_path = os.path.join(settings.data_folder, "cohorts", folder)
Expand Down

0 comments on commit b551535

Please sign in to comment.