Skip to content

Commit

Permalink
If ROOT_DIR is None (pre prod) try execpt repository variable cause w…
Browse files Browse the repository at this point in the history
…e don't need it (#43)
  • Loading branch information
armgilles committed Nov 12, 2020
1 parent 84adff4 commit 127736e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions vcub_keeper/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@
ROOT_DIR = os.environ.get("ROOT_DIR") # with .env file in preprod
IS_PROD = True

ROOT_DATA_RAW = ROOT_DIR + '/data/raw/'
ROOT_DATA_CLEAN = ROOT_DIR + '/data/clean/'
ROOT_DATA_REF = ROOT_DIR + '/data/ref/'
ROOT_MODEL = ROOT_DIR + '/model/'
# In case where ROOT_DIR is None (pre-prod) but we don't need these variables
try:
ROOT_DATA_RAW = ROOT_DIR + '/data/raw/'
ROOT_DATA_CLEAN = ROOT_DIR + '/data/clean/'
ROOT_DATA_REF = ROOT_DIR + '/data/ref/'
ROOT_MODEL = ROOT_DIR + '/model/'
except:
print("Can't have repository variables")


# Only in dev
Expand Down Expand Up @@ -60,7 +64,7 @@


# Features to use during clustering
FEATURES_TO_USE_CLUSTER = ['consecutive_no_transactions_out',
FEATURES_TO_USE_CLUSTER = ['consecutive_no_transactions_out',
'Sin_weekday', 'Cos_weekday',
'Sin_hours', 'Cos_hours']

Expand Down

0 comments on commit 127736e

Please sign in to comment.