forked from Scifabric/pybossa
-
Notifications
You must be signed in to change notification settings - Fork 12
/
settings_test.py.tmpl
271 lines (256 loc) · 9.15 KB
/
settings_test.py.tmpl
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# -*- coding: utf8 -*-
from collections import OrderedDict
SERVER_NAME = 'localhost'
SERVER_TYPE = 'Development QA'
DISPLAY_PLATFORM_IDENTIFIER = True
NAVBAR_COLOR = 'linear-gradient(44deg, orange, #4b0f0f)'
FORCE_HTTPS = False
HOST = 'localhost'
PORT = 5001
DEFAULT_SYNC_TARGET = 'localhost'
# THEME='crowdcrafting-theme'
CRYPTOPAN_KEY = '32-char-str-for-AES-key-and-pad.'
SECRET = 'foobar'
SECRET_KEY = 'my-session-secret'
SERVER_TYPE = 'Test'
SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://rtester:rtester@localhost/pybossa_test'
CONTACT_ENABLE = ['all']
CONTACT_SUBJECT = 'GIGwork message for project {short_name} by {email}'
CONTACT_BODY = 'A GIGwork support request has been sent for the project: {project_name}.'
GOOGLE_CLIENT_ID = 'id'
GOOGLE_CLIENT_SECRET = 'secret'
TWITTER_CONSUMER_KEY='key'
TWITTER_CONSUMER_SECRET='secret'
FACEBOOK_APP_ID='id'
FACEBOOK_APP_SECRET='secret'
TERMSOFUSE = 'http://okfn.org/terms-of-use/'
DATAUSE = 'http://opendatacommons.org/licenses/by/'
ITSDANGEROUSKEY = 'its-dangerous-key'
LOGO = 'logo.png'
MAIL_SERVER = 'localhost'
MAIL_USERNAME = None
MAIL_PASSWORD = None
MAIL_PORT = 25
MAIL_FAIL_SILENTLY = True
MAIL_DEFAULT_SENDER = 'PYBOSSA Support <info@pybossa.com>'
ADMINS = ['admin@broken.com']
ANNOUNCEMENT = {'admin': 'Root Message', 'user': 'User Message', 'owner': 'Owner Message'}
ANNOUNCEMENT_LEVELS = {
'admin': {'display': 'Admin', 'level': 0},
'owner': {'display': 'Project Creator', 'level': 10},
'subadmin': {'display': 'Subadmin', 'level': 20},
'user': {'display': 'User', 'level': 30}
}
ANNOUNCEMENT_LEVEL_OPTIONS = [
{'text': v['display'], 'value': v['level']} for k, v in ANNOUNCEMENT_LEVELS.items()
]
LOCALES = [('en', 'English'), ('es', u'Español'),
('it', 'Italiano'), ('fr', u'Français'),
('ja', u'日本語'), ('el', u'ελληνικά')]
ENFORCE_PRIVACY = False
REDIS_CACHE_ENABLED = False
REDIS_SENTINEL = [('localhost', 26379)]
REDIS_SENTINELS = 'localhost:26379'
REDIS_KEYPREFIX = 'pybossa_cache'
REDIS_MASTER_NAME = 'mymaster'
REDIS_SOCKET_TIMEOUT = 30
WTF_CSRF_ENABLED = False
WTF_CSRF_SSL_STRICT = False
TESTING = True
CSRF_ENABLED = False
MAIL_SERVER = 'localhost'
MAIL_USERNAME = None
MAIL_PASSWORD = None
MAIL_PORT = 25
MAIL_FAIL_SILENTLY = True
MAIL_DEFAULT_SENDER = 'PYBOSSA Support <info@pybossa.com>'
ALLOWED_EXTENSIONS = ['js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'zip']
UPLOAD_FOLDER = '/tmp/'
UPLOAD_METHOD = 'local'
FLICKR_API_KEY = 'apikey'
FLICKR_SHARED_SECRET = "secret"
DROPBOX_APP_KEY = 'key'
YOUTUBE_API_SERVER_KEY = 'apikey'
LIMIT = 25
PER = 15 * 60
SSE = True
TIMEOUT = 5 * 60
PERMANENT_SESSION_LIFETIME = 24*60
LDAP_USER_OBJECT_FILTER = '(&(objectclass=inetOrgPerson)(cn=%s))'
LDAP_USER_FILTER_FIELD = 'cn'
LDAP_PYBOSSA_FIELDS = {'fullname': 'givenName',
'name': 'uid',
'email_addr': 'cn'}
WEEKLY_ADMIN_REPORTS_EMAIL = ['admin@admin.com']
FLASK_PROFILER = {
"enabled": False, # disable so that sqlite works in multithreading
"storage": {
"engine": "sqlite"
},
"basicAuth":{
"enabled": True,
"username": "admin",
"password": "admin"
},
"ignore": [
"^/static/.*"
]
}
BSSO_SETTINGS = {
"strict": True,
"debug": True,
"sp": {
"entityId": "test",
"assertionConsumerService": {
"url": "http://localhost:5000/bloomberg/login",
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
},
"singleLogoutService": {
"url": "http://localhost:5000/login/callback",
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
},
"NameIDFormat": "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
},
"idp": {
"entityId": "https://test.com",
"singleSignOnService": {
"url": "https://test.com",
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
},
"singleLogoutService": {
"url": "https://test.com",
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
}
}
}
AVATAR_ABSOLUTE = True
SPAM = ['fake.com']
PRODUCTS_SUBPRODUCTS = {
'abc': ['def'],
'test_product': ['test_subproduct1', 'test_subproduct2']
}
# Wizard Steps
# 'step_name': {
#
# 'title': 'Step 1', [Title that will be displayed on the UI]
# 'icon': 'fa fa-pencil', [Icon class that will be use to be displayed on the UI]
# 'href': {'url_for': 'project.new' [Url that will be redirected to when user click at step]
# 'args': ['short_name', 'published'] [arguments for url_for function possible values are "short_name" and "published" or empty]
# }
# 'done_checks': {'always': False, 'and': [''], 'or': []}, [if True Step is going to be filled]
# 'enable_checks': {'always': True, 'and': [''], 'or': []}, [if True Step border are going to be blue]
# 'visible_checks': {'and': ['not_project_exist'], 'or': []}, [if True Step is going to be visible]
# [Checks:
# The 'always' key must be used to keep a static value {always: True/False}, it means no its not dependent on
# any logic.
#
# All 'check-names' keys represent specific checks functions that can be found on the wizard.py class as check_options.
# each step can have combinations of checks in {'and':[], 'or': []} and the final result will be a bolean condition
# equivalent to"any('or') or all(and)"
# ]
# }
WIZARD_STEPS = OrderedDict([
('new_project', {
'title': 'Project Creation',
'icon': 'fa fa-pencil',
'href': {'url_for': 'project.new',
'args': ['']},
'done_checks': {'always': False},
'enable_checks': {'always': True},
'visible_checks': {'and': ['not_project_exist'], 'or': []},
}),
('project_details', {
'title': 'Project Details',
'icon': 'fa fa-pencil',
'href': {'url_for': 'project.update',
'args': ['short_name']},
'done_checks': {'always': True},
'enable_checks': {'always': True},
'visible_checks': {'and': ['project_exist'], 'or': []}
}),
('task_imports', {
'title': 'Task Imports',
'icon': 'fa fa-file',
'href': {'url_for': 'project.import_task',
'args': ['short_name']},
'done_checks': {'and': ['tasks_amount'], 'or': []},
'enable_checks': {'and': ['project_exist'], 'or': []},
'visible_checks': {'always': True}
}),
('task_presenter', {
'title': 'Task Presenter',
'icon': 'fa fa-pencil',
'href': {'url_for': 'project.task_presenter_editor',
'args': ['short_name']},
'done_checks': {'and': ['task_presenter'], 'or': []},
'enable_checks': {'and': ['tasks_amount'], 'or': ['task_presenter', 'project_publish']},
'visible_checks': {'always': True}
}),
('task_settings', {
'title': 'Task Settings',
'icon': 'fa fa-cogs',
'href': {'url_for': 'project.task_settings',
'args': ['short_name']},
'done_checks': {'and': ['task_presenter', 'tasks_amount'], 'or': ['project_publish']},
'enable_checks': {'and': ['task_presenter', 'tasks_amount'], 'or': ['project_publish']},
'visible_checks': {'always': True}
}),
('publish', {
'title': 'Publish',
'icon': 'fa fa-check',
'href': {'url_for': 'project.publish',
'args': ['short_name', 'published']},
'done_checks': {'always': False},
'enable_checks': {'and': ['task_presenter', 'tasks_amount'], 'or': ['project_publish']},
'visible_checks': {'and': ['not_project_publish'], 'or': ['not_project_exist']},
}),
('published', {
'title': 'Published',
'icon': 'fa fa-check',
'href': {'url_for': 'project.details',
'args': ['short_name']},
'done_checks': {'always': True},
'enable_checks': {'always': True},
'visible_checks': {'and': ['project_publish'], 'or': []}})
])
DATA_CLASSIFICATION = [
('L1 - internal', False),
('L1 - internal valid', True),
('L2 - propriertary', False),
('L2 - propriertary valid', True),
('L3 - community', True),
('L4 - public', True)
]
VALID_DATA_CLASSES = [data_class for data_class, enabled in DATA_CLASSIFICATION if enabled and data_class]
VALID_ACCESS_LEVELS = sorted(set(data_class.split('-')[0].strip() for data_class in VALID_DATA_CLASSES))
FIRM_TO_TYPE = {
1234567: "Test firm id 1",
1098765: "Test firm id 2",
905877: "Test firm id 3"
}
CONTACT_ENABLE = ''
# Send emails weekly update every
WEEKLY_UPDATE_STATS = 'Sunday'
# Send emails weekly to admin
WEEKLY_ADMIN_REPORTS = 'Monday'
COMPLETED_TASK_CLEANUP_DAYS = [
(None, "None"),
(30, "30 days"),
(60, "60 days"),
(90, "90 days"),
(180, "180 days")
]
MAX_IMAGE_UPLOAD_SIZE_MB = 5
MAX_SAVED_ANSWERS = 1
SWAGGER_TEMPLATE = {
'info': {
'title': 'Local GIGwork API',
'description': 'Explore and experiment with Gigwork\'s REST APIs.\nUseful Links:\n- [Pybossa Docs](https://docs.pybossa.com/)',
},
}
LLM_MODEL_NAMES = {
'finlm',
'flan-ul2',
'mixtral-8x7b',
'mixtral-8x7b-instruct'
}