Coverage for application / config.py: 87%
23 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 05:22 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 05:22 +0000
1import os
3HURLSTOR_URL = 'https://hurlstor.soest.hawaii.edu'
6class Config:
7 SESSION_TYPE = 'filesystem'
8 SESSION_FILE_DIR = 'flask_session'
9 SESSION_PERMANENT = False
10 SESSION_USE_SIGNER = True
11 SESSION_FILE_THRESHOLD = 10
12 LOCAL_APP_URL = 'http://127.0.0.1:8000'
13 TATOR_URL = 'https://cloud.tator.io'
14 TATOR_PROJECT_ID = 26
15 VARS_ANNOSAURUS_URL = f'{HURLSTOR_URL}/anno/v1'
16 VARS_KNOWLEDGE_BASE_URL = f'{HURLSTOR_URL}/kb/v1'
17 VARS_VAMPIRE_SQUID_URL = f'{HURLSTOR_URL}/vam/v1'
18 VARS_CHARYBDIS_URL = f'{HURLSTOR_URL}/references'
20 DARC_REVIEW_HEADERS = {'API-Key': os.environ.get('DARC_REVIEW_API_KEY')}
21 SECRET_KEY = os.environ.get('APP_SECRET_KEY')
23 if os.environ.get('_FLASK_ENV') == 'no_server_edits':
24 print('\n\nLOCAL DEVELOPMENT MODE: No server edits\n\n')
25 ANNOSAURUS_CLIENT_SECRET = ''
26 DARC_REVIEW_URL = 'http://127.0.0.1:5000'
27 else:
28 ANNOSAURUS_CLIENT_SECRET = os.environ.get('ANNOSAURUS_CLIENT_SECRET')
29 DARC_REVIEW_URL = 'https://hurlstor.soest.hawaii.edu:5000'
30 # https://hurlstor.soest.hawaii.edu:5000 == https://darc.soest.hawaii.edu
31 # We set up a proxy to point darc.soest.hawaii.edu to hurlstor.soest.hawaii.edu:5000. External reviewers should
32 # access their page using the darc.soest.hawaii.edu URL. This app primarily uses the hurlstor URL. This can be
33 # changed in the future if needed, but prefer to continue using the hurlstor URL so it's clearer that this is
34 # the actual server that's being accessed. We also still need to maintain the SSL certificate for
35 # hurlstor.soest.hawaii.edu - if it expires, the proxy will fail the SSL handshake.