Skip to content

Commit

Permalink
Updated dev/settings with new download paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pgm committed Nov 7, 2024
2 parents f4eb5c7 + 694a88e commit 2ec3af3
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions config/dev/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
from depmap.read_config import read_config


dev_datasets = DataLoadConfig(
hgnc_dataset=HUGO_NCGC_TAIGA_ID,
dose_replicate_level_datasets=[ # this split is only used by db loading, to loop over a different list and use a different loader
Expand All @@ -19,6 +20,30 @@
)


def get_downloads_paths(ENV_TYPE):
paths = [
os.path.join(
Config.PROJECT_ROOT,
f"../../depmap-deploy/portal-config/env/{ENV_TYPE}/downloads",
)
]

if ENV_TYPE != "public":
paths.append(
os.path.join(
Config.PROJECT_ROOT,
"../../depmap-deploy/portal-config/env/shared/nonpublic_downloads",
)
)
paths.append(
os.path.join(
Config.PROJECT_ROOT,
"../../depmap-deploy/portal-config/env/shared/public_downloads",
)
)
return paths


# dev downloads are _dev_only, plus specified in settings.py


Expand Down Expand Up @@ -131,16 +156,7 @@ class DevConfig(Config):
Config.PROJECT_ROOT,
f"../../depmap-deploy/portal-config/env/{ENV_TYPE}/dmc_symposia.yaml",
)
DOWNLOADS_PATHS = [
os.path.join(
Config.PROJECT_ROOT,
f"../../depmap-deploy/portal-config/env/{ENV_TYPE}/downloads",
),
os.path.join(
Config.PROJECT_ROOT,
"../../depmap-deploy/portal-config/env/shared/shared_downloads",
),
]
DOWNLOADS_PATHS = get_downloads_paths(ENV_TYPE)
DEV_DOWNLOADS_PATH = os.path.join(Config.PROJECT_ROOT, f"../config/dev/downloads")
DOWNLOADS_KEY = os.path.join(
Config.PROJECT_ROOT, "./secrets/dev-downloads-key.json",
Expand Down

0 comments on commit 2ec3af3

Please # to comment.