forked from biothings/discovery-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
52 lines (46 loc) · 2.42 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
try:
from config_key import * # noqa
except ImportError:
pass
# *****************************************************************************
# Credentials
# *****************************************************************************
# Define in <project_folder>/config_key.py:
# COOKIE_SECRET = '<Any Random String>'
# GITHUB_CLIENT_ID = '<your Github application Client ID>'
# GITHUB_CLIENT_SECRET = '<your Github application Client Secret>'
# *****************************************************************************
# Elasticsearch
# *****************************************************************************
ES_INDICES = {
# INTERNAL: 'discover_schema',
"schema": "discover_schema_class",
"dataset": "discover_dataset",
}
# *****************************************************************************
# Web Application
# *****************************************************************************
APP_LIST = [
(r"/api/query/?", "biothings.web.handlers.QueryHandler", {"biothing_type": "schema"}),
(r"/api/registry/query/?", "biothings.web.handlers.QueryHandler", {"biothing_type": "schema"}),
(r"/api/registry/([^/]+)/([^/]+)/?", "discovery.handlers.api.SchemaRegistryHandler"),
(r"/api/registry/([^/]+)/?", "discovery.handlers.api.SchemaRegistryHandler"),
(r"/api/registry/?", "discovery.handlers.api.SchemaRegistryHandler"),
(r"/api/dataset/query/?", "biothings.web.handlers.QueryHandler", {"biothing_type": "dataset"}),
(r"/api/dataset/([^/]+)/?", "discovery.handlers.api.DatasetMetadataHandler"),
(r"/api/dataset/?", "discovery.handlers.api.DatasetMetadataHandler"),
(r"/api/view/?", "discovery.handlers.api.SchemaViewHandler"),
(r"/api/gh/([^/]+)/?", "discovery.handlers.api.GHHandler"),
(r"/api/gh/?", "discovery.handlers.api.GHHandler"),
(r"/api/schema/([^/]+)/?", "discovery.handlers.api.SchemaHandler"),
(r"/api/schema/([^/]+)/([^/]+)/?", "discovery.handlers.api.SchemaHandler"),
(r"/api/schema/validate/([^/]+)/([^/]+)/?", "discovery.handlers.api.MetadataValidationHandler")
]
# biothings web tester will read this
API_VERSION = ""
API_PREFIX = "api"
STATIC_PATH = "static"
# *****************************************************************************
# Search Pipeline
# *****************************************************************************
ES_QUERY_BUILDER = "discovery.pipeline.DiscoveryQueryBuilder"