-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
58 lines (52 loc) · 1.74 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
53
54
55
56
57
58
from os import path
APP_DIR = path.dirname(path.dirname(path.realpath(__file__)))
SKIN_DIR = path.join(APP_DIR, "view")
TEMPLATES_DIR = path.join(SKIN_DIR, "templates")
STATIC_DIR = path.join(SKIN_DIR, "style")
LOGFILE = APP_DIR + "/vocprez.log"
CACHE_FILE = path.join(APP_DIR, "cache", "DATA.p")
CACHE_HOURS = 1
DEFAULT_LANGUAGE = "en"
SPARQL_QUERY_LIMIT = 2000 # Maximum number of results to return per SPARQL query
MAX_RETRIES = 2
RETRY_SLEEP_SECONDS = 10
SPARQL_TIMEOUT = 60
PORT = 5000
#
# Vocabulary data sources
#
# Here is the list of vocabulary sources that this instance uses. FILE, SPARQL, RVA & VOCBENCH are implemented already
# and are on by default (e.g. VOCBENCH = None) but other sources, such as GitHub can be added. To enable them, add a new
# like like VocBench.XXX = None
class VocabSource:
FILE = "FILE"
SPARQL = "SPARQL"
OGCSPARQL = "OGCSPARQL"
RVA = "RVA"
VOCBENCH = "VOCBENCH"
GITHUB = "GITHUB"
# BEGIN Instance Vars
SYSTEM_URI_BASE = "$SYSTEM_URI_BASE"
SYSTEM_BASE_URI = SYSTEM_URI_BASE
USE_SYSTEM_URIS = True
USE_ABS_ALT_URI = True
DEBUG = False
SPARQL_ENDPOINT = "$SPARQL_ENDPOINT"
SPARQL_USERNAME = $SPARQL_USERNAME
SPARQL_PASSWORD = $SPARQL_PASSWORD
SOURCE_NAME = "nvs"
# END Instance Vars
DATA_SOURCES = {
# example SPARQL source configured using variables in "Instance Vars" above
SOURCE_NAME: {
"source": VocabSource.SPARQL,
"sparql_endpoint": SPARQL_ENDPOINT,
"sparql_username": SPARQL_USERNAME,
"sparql_password": SPARQL_PASSWORD,
},
}
# BEGIN Vocabs list info
VOCS_URI = "http://www.opengis.net/def"
VOCS_TITLE = "OGC Vocabularies"
VOCS_DESC = "Definitions registered by OGC standardisation activities or hosted on behalf of related organisations."
# END Vocabs list info