-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbioportal_config_development.rb
309 lines (273 loc) · 10.3 KB
/
bioportal_config_development.rb
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# Organization info
$ORG = ENV['ORG']
$ORG_URL = ENV['ORG_URL']
# Site name (required)
$SITE = ENV['SITE']
# Full string for site, EX: "NCBO BioPortal", do not modify
$ORG_SITE = $ORG.nil? || $ORG.empty? ? $SITE : "#{$ORG} #{$SITE}"
# The URL for the BioPortal Rails UI (this application)
$UI_URL = ENV['UI_URL']
# If you are running a PURL server to provide URLs for ontologies in your BioPortal instance, enable this option
$PURL_ENABLED = false
# The PURL URL is generated using this prefix + the abbreviation for an ontology.
# The PURL URL generation algorithm can be altered in app/models/ontology_wrapper.rb
$PURL_PREFIX = 'http://purl.bioontology.org/ontology'
# If your BioPortal installation includes Annotator set this to false
$ANNOTATOR_DISABLED = false
# Unique string representing the UI's id for use with the BioPortal Core
$API_KEY = ENV['API_KEY']
# BioPortal API service address
$REST_URL = ENV['API_URL']
# Annotator REST service address
# $ANNOTATOR_URL = "http://services.stageportal.lirmm.fr/annotator"
$ANNOTATOR_URL = $PROXY_URL = ENV['ANNOTATOR_URL']
# NCBO annotator URL and apikey
$NCBO_ANNOTATORPLUS_ENABLED = ENV['NCBO_ANNOTATORPLUS_ENABLED']
$NCBO_ANNOTATOR_URL = ENV['NCBO_ANNOTATOR_URL']
$NCBO_API_KEY = ENV['NCBO_API_KEY']
# Fairness Assessment.
$FAIRNESS_DISABLED = ENV['FAIRNESS_DISABLED']
$FAIRNESS_URL = ENV['FAIRNESS_URL']
# Used to define other bioportal that can be mapped to
# Example to map to ncbo bioportal : {"ncbo" => {"api" => "http://data.bioontology.org", "ui" => "http://bioportal.bioontology.org", "apikey" => ""}
# Then create the mapping using the following class in JSON : "http://purl.bioontology.org/ontology/MESH/C585345": "ncbo:MESH"
# Where "ncbo" is the namespace used as key in the interportal_hash
$INTERPORTAL_HASH = {}
$NOT_DOWNLOADABLE = {}
# Bugsnag API key for monitoring exception
#$BUGSNAG_API_KEY=
# OAuth2 authentication
$OMNIAUTH_PROVIDERS = {
github: {
client_id: 'CLIENT_ID',
client_secret: 'CLIENT_SECRET',
icon: 'github.svg',
enable: true
},
google: {
strategy: :google_oauth2,
client_id: 'CLIENT_ID',
client_secret: 'CLIENT_SECRET',
icon: 'google.svg',
enable: true
},
orcid: {
client_id: 'CLIENT_SECRET',
client_secret: 'CLIENT_SECRET',
icon: 'orcid.svg',
enable: false
},
keycloak: {
strategy: :keycloak_openid,
client_id: 'YOUR_KEYCLOAK_CLIENT_ID',
client_secret: 'YOUR_KEYCLOAK_CLIENT_SECRET',
client_options: { site: 'KEYCLOAK_SITE', realm: 'KEYCLOAK_REALM' },
name: 'keycloak',
icon: 'keycloak.svg',
enable: false
}
}.freeze
# Don't load and don't display recent mappings if false, in case of too many mappings (take longer to load homepage)
$DISPLAY_RECENT = false
# If true then the UI will get available recognize at API_URL/annotators/recognizers
$MULTIPLE_RECOGNIZERS = false
# Remove download for these ontologies. Default:
# ["CPT","ICD10","ICNP","ICPC2P","MDDB","MEDDRA","MSHFRE","MSHSPA_1","NDDF","NDFRT","NIC","RCD","SCTSPA","SNOMEDCT","WHO-ART"]
$RESTRICTED_DOWNLOADS = []
# Ontolobridge endpoint url
$ONTOLOBRIDGE_BASE_URL = 'https://ontolobridge.ccs.miami.edu/api-test/requests'
# Ontolobridge authentication token
$ONTOLOBRIDGE_AUTHENTICATION_TOKEN = 'Token Uq2pae73ktMtmgjUgtnhEOuHxr9sZeuK'
# Ontologies for which to enable the new term request (Ontolobridge) tab
$NEW_TERM_REQUEST_ONTOLOGIES = []
# Legacy REST core service address (BioPortal v3.x and lower)
$LEGACY_REST_URL = 'http://example.org:8080/bioportal'
# Release version text (appears in footer of all pages, except 404 and 500 errors)
$RELEASE_VERSION = ENV['RELEASE_VERSION']
# Enable Slices, filtering of ontologies based on subdomain and ontology groups
$ENABLE_SLICES = false
# Google Analytics ID (optional)
$ANALYTICS_ID = ENV['ANALYTICS_ID']
# Enable client request caching
$CLIENT_REQUEST_CACHING = true
# Email settings
ActionMailer::Base.smtp_settings = {
address: '', # smtp server address, ex: smtp.example.org
port: 25, # smtp server port
domain: '' # fqdn of rails server, ex: rails.example.org
}
# Announcements mailman mailing list REQUEST address, EX: [email protected]
# NOTE: You must use the REQUEST address for the mailing list. ONLY WORKS WITH MAILMAN LISTS.
$ANNOUNCE_LIST = ENV['SUPPORT_EMAIL']
# Email addresses used for sending notifications (errors, feedback, support)
$SUPPORT_EMAIL = ENV['SUPPORT_EMAIL']
# Email used to send notifications
$NOTIFICATION_EMAIL = ENV['SUPPORT_EMAIL']
# reCAPTCHA
# In order to use reCAPTCHA on the account creation and feedback submission pages:
# 1. Obtain a reCAPTCHA v2 key from: https://www.google.com/recaptcha/admin
# 2. Put the site and secret keys in the encrypted credentials file:
#
# recaptcha:
# site_key: your_site_key
# secret_key: your_secret_key
#
# 3. Set the USE_RECAPTCHA option to 'true'
ENV['USE_RECAPTCHA'] = 'false'
# Custom BioPortal logging
require 'log'
# URL where BioMixer GWT app is located
# $BIOMIXER_URL = "http://bioportal-integration.bio-mixer.appspot.com"
$BIOMIXER_URL = ENV['BIOMIXER_URL']
$BIOMIXER_APIKEY = ENV['BIOMIXER_APIKEY']
##
# Custom Ontology Details
# Custom details can be added on a per ontology basis using a key/value pair as columns of the details table
#
# Example:
# $ADDITIONAL_ONTOLOGY_DETAILS = { "STY" => { "Additional Detail" => "Text to be shown in the right-hand column." } }
##
$ADDITIONAL_ONTOLOGY_DETAILS = {}
# Front notice appears on the front page only and is closable by the user. It remains closed for seven days (stored in cookie)
$FRONT_NOTICE = ''
# Site notice appears on all pages and remains closed indefinitely. Stored below as a hash with a unique key and a string message
# EX: $SITE_NOTICE = { :unique_key => 'Put your message here (can include <a href="/link">html</a> if you use single quotes).' }
$SITE_NOTICE = {}
$TERMS_AND_CONDITIONS_LINK = 'https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/terms-conditions-naDsDo2Zxq'
$CITE_ANNOTATOR = 'https://hal.science/hal-00492024'
$ANNOTATOR_API_DOC = 'https://data.agroportal.lirmm.fr/documentation#nav_annotator'
$CITE_RECOMMENDER = 'https://doi.org/10.1186/s13326-017-0128-y'
# Resource term
$RESOURCE_TERM = ENV['RESOURCE_TERM'] || 'ontology'
$HOME_PAGE_LOGOS = [
{
img_src: 'logos/supports/numev.png',
url: 'http://www.lirmm.fr/numev',
target: '_blank'
},
{
img_src: 'logos/supports/anr.png',
url: 'https://anr.fr/en',
target: '_blank'
},
{
img_src: 'logos/supports/eu.png',
url: 'https://commission.europa.eu/research-and-innovation_en',
target: '_blank'
},
{
img_src: 'logos/collaboration/d2kab.png',
url: 'http://d2kab.mystrikingly.com',
target: '_blank'
},
{
img_src: 'logos/collaboration/lirmm.png',
url: 'http://www.lirmm.fr',
target: '_blank'
},
{
img_src: 'logos/collaboration/inrae.png',
url: 'https://www.inrae.fr/enm',
target: '_blank'
},
{
img_src: 'logos/collaboration/stanford.png',
url: 'https://www.stanford.edu',
target: '_blank'
}
]
$PORTALS_INSTANCES = [
{
color: '#31b403',
portal: 'AgroPortal',
link: 'https://agroportal.lirmm.fr/'
},
{
color: '#234979',
portal: 'BioPortal',
link: 'https://bioportal.bioontology.org/'
},
{
color: '#74a9cb',
portal: 'SIFR BioPortal',
link: 'https://bioportal.lirmm.fr/'
},
{
color: '#0d508a',
portal: 'EcoPortal',
link: 'https://ecoportal.lifewatch.eu/'
},
{
color: '#234979',
portal: 'MedPortal',
link: 'http://medportal.bmicc.cn/'
},
{
color: '#009574',
portal: 'MatPortal',
link: 'https://matportal.org/'
},
{
color: '#1c0f5d',
portal: 'IndustryPortal',
link: 'http://industryportal.enit.fr'
},
{
color: '#1e2251',
portal: 'EarthPortal',
link: 'https://earthportal.eu/'
},
{
color: '#33691B',
portal: 'BiodivPortal',
link: 'https://biodivportal.gfbio.org/'
}
]
$ONTOPORTAL_WEBSITE_LINK = "https://ontoportal.org/"
$ONTOPORTAL_GITHUB_REPO = "https://github.com/ontoportal"
$GITHUB_ISSUES = "https://github.com/agroportal/project-management/issues"
$FOOTER_LINKS = {
social: [
{ logo: "social/people.svg", link: "https://github.com/orgs/agroportal/people" },
{ logo: "social/github.svg", link: "https://github.com/agroportal" },
{ logo: "social/twitter.svg", link: "https://twitter.com/lagroportal" },
{ logo: "json.svg", link: $REST_URL },
{ logo: "summary/sparql.svg", link: "#{$SPARQL_URL}"},
{ logo: "social/email.svg", link: "mailto:#{$ANNOUNCE_LIST}" },
],
sections: {
products: {
release_notes: "https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/release-notes-btKjZk5tU2",
api: "https://data.agroportal.lirmm.fr/",
tools: "/tools",
sparql: "https://sparql.agroportal.lirmm.fr/test/",
ontoportal: $ONTOPORTAL_WEBSITE_LINK
},
support: {
contact_us: "https://#{$SITE}.lirmm.fr/feedback",
documentation: "https://ontoportal.github.io/documentation/",
agro_documentation: "https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/public-documentation-QMpsC9aVBb",
issues_and_requests: $GITHUB_ISSUES
},
agreements: {
terms: $TERMS_AND_CONDITIONS_LINK,
privacy_policy: "https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/terms-conditions-naDsDo2Zxq#h-privacy-policy",
legal_notices: "https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/terms-conditions-naDsDo2Zxq#h-legal-notice"
},
about: {
about_us: "https://github.com/agroportal/project-management",
team: "https://github.com/orgs/agroportal/people",
cite_us: "https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/publications-and-references-87tEoeoGKy",
acknowledgments: "https://doc.jonquetlab.lirmm.fr/share/e6158eda-c109-4385-852c-51a42de9a412/doc/acknowledgments-15GdRXLQdm"
}
}
}
$UI_THEME = ENV['UI_THEME'] || 'ontoportal'
$HOSTNAME = ENV['API_URL']
if $HOSTNAME
$HOSTNAME = ENV['API_URL'].split('data.').last
# add custom stage server configuration if needed (e.g bioportal_config_development_stageportal.lirmm.fr)
if File.exist?("config/bioportal_config_development_#{$HOSTNAME}")
require_relative "bioportal_config_development_#{$HOSTNAME}"
end
end