diff --git a/config/dev/settings.py b/config/dev/settings.py index 41e02b76..a5cbf6e5 100644 --- a/config/dev/settings.py +++ b/config/dev/settings.py @@ -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 @@ -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 @@ -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",