Coverage for application/config.py: 84%
25 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-23 02:22 +0000
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-23 02:22 +0000
1import os
3HURLSTOR_URL = 'http://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 VARS_ANNOTATION_URL = f'{HURLSTOR_URL}:8082/v1/annotations'
15 VARS_CONCEPT_LIST_URL = f'{HURLSTOR_URL}:8083/v1/concept'
16 VARS_PHYLOGENY_URL = f'{HURLSTOR_URL}:8083/v1/phylogeny/up'
17 VARS_SEQUENCE_LIST_URL = f'{HURLSTOR_URL}:8084/v1/videosequences/names'
18 VARS_DIVE_QUERY_URL = f'{HURLSTOR_URL}:8086/query/dive'
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_URL = f'{HURLSTOR_URL}:8082/v1'
26 ANNOSAURUS_CLIENT_SECRET = ''
27 DARC_REVIEW_URL = 'http://127.0.0.1:5000'
28 else:
29 ANNOSAURUS_URL = f'{HURLSTOR_URL}:8082/v1'
30 ANNOSAURUS_CLIENT_SECRET = os.environ.get('ANNOSAURUS_CLIENT_SECRET')
31 DARC_REVIEW_URL = 'https://hurlstor.soest.hawaii.edu:5000'
32 # https://hurlstor.soest.hawaii.edu:5000 == https://darc.soest.hawaii.edu
33 # We set up a proxy to point darc.soest.hawaii.edu to hurlstor.soest.hawaii.edu:5000. External reviewers should
34 # access their page using the darc.soest.hawaii.edu URL. This app primarily uses the hurlstor URL. This can be
35 # changed in the future if needed, but prefer to continue using the hurlstor URL so it's clearer that this is
36 # the actual server that's being accessed. We also still need to maintain the SSL certificate for
37 # hurlstor.soest.hawaii.edu - if it expires, the proxy will fail the SSL handshake.