forked from surroundaustralia/VocPrez-theme-cgi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
54 lines (48 loc) · 1.65 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
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 VocBench.XXX = None
class VocabSource:
FILE = "FILE"
SPARQL = "SPARQL"
RVA = "RVA"
VOCBENCH = "VOCBENCH"
GITHUB = "GITHUB"
# BEGIN Instance Vars
SYSTEM_BASE_URI = "$SYSTEM_BASE_URI"
USE_SYSTEM_URIS = True
DEBUG = False
SPARQL_ENDPOINT = "$SPARQL_ENDPOINT"
SPARQL_USERNAME = $SPARQL_USERNAME
SPARQL_PASSWORD = $SPARQL_PASSWORD
SOURCE_NAME = "cgi"
# 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_TITLE = "CGI Vocabularies Register"
VOCS_URI = "http://resource.geosciml.org/def/voc/"
VOCS_DESC = "Vocabularies managed and published by the Commission for Geoscience Information (CGI)"
# END Vocabs list info