Skip to content

Commit

Permalink
Merge branch 'development' into feature/isolate-ontology-submission-p…
Browse files Browse the repository at this point in the history
…rocess-steps
  • Loading branch information
syphax-bouazzouni committed Apr 18, 2024
2 parents 0b95749 + 026c9c4 commit 23ca9e0
Show file tree
Hide file tree
Showing 52 changed files with 1,427 additions and 5,888 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up solr configsets
run: ./test/solr/generate_ncbo_configsets.sh
- name: create config.rb file
run: cp config/config.test.rb config/config.rb
run: cp config/config.rb.sample config/config.rb
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get -y install raptor2-utils
- name: Set up JDK 11
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
openjdk-11-jre-headless \
raptor2-utils \
wait-for-it \
libraptor2-dev \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /srv/ontoportal/ontologies_linked_data
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ gem 'rubyzip', '~> 1.0'
gem 'thin'
gem 'request_store'
gem 'jwt'
gem 'json-ld', '~> 3.0.2'
gem "parallel", "~> 1.24"


# Testing
group :test do
Expand All @@ -39,3 +42,4 @@ end
# NCBO gems (can be from a local dev path or from rubygems/git)
gem 'goo', github: 'ontoportal-lirmm/goo', branch: 'development'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'master'

46 changes: 25 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: cd5bc312bd3acd2ff056a87a6f37b5419f3444dc
revision: 0e554fce49713ce4d5a742a06c2fb59a547caf47
branch: development
specs:
goo (0.0.2)
addressable (~> 2.8)
pry
rdf (= 3.2.11)
rdf-raptor
Expand All @@ -17,7 +18,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/sparql-client.git
revision: aed51baf4106fd0f3d0e3f9238f0aad9406aa3f0
revision: 180c818f7715baac64b2699bb452ef5c756f62c5
branch: master
specs:
sparql-client (1.0.1)
Expand All @@ -40,7 +41,7 @@ GEM
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.6)
bigdecimal (3.1.7)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.2.3)
Expand Down Expand Up @@ -90,9 +91,12 @@ GEM
domain_name (~> 0.5)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.7.1)
json_pure (2.7.1)
jwt (2.8.0)
json (2.7.2)
json-ld (3.0.2)
multi_json (~> 1.12)
rdf (>= 2.2.8, < 4.0)
json_pure (2.7.2)
jwt (2.8.1)
base64
language_server-protocol (3.17.0.3)
launchy (2.5.2)
Expand All @@ -107,10 +111,10 @@ GEM
net-imap
net-pop
net-smtp
method_source (1.0.0)
method_source (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0206)
mime-types-data (3.2024.0305)
mini_mime (1.1.5)
minitest (4.7.5)
minitest-reporters (0.14.24)
Expand All @@ -128,7 +132,7 @@ GEM
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0.1)
net-smtp (0.5.0)
net-protocol
netrc (0.11.0)
oj (2.18.5)
Expand All @@ -145,7 +149,7 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.4)
public_suffix (5.0.5)
racc (1.7.3)
rack (1.6.13)
rack-test (0.8.3)
Expand All @@ -167,9 +171,9 @@ GEM
rdf-xsd (3.2.1)
rdf (~> 3.2)
rexml (~> 3.2)
redis (5.1.0)
redis-client (>= 0.17.0)
redis-client (0.20.0)
redis (5.2.0)
redis-client (>= 0.22.0)
redis-client (0.22.1)
connection_pool
regexp_parser (2.9.0)
request_store (1.6.0)
Expand All @@ -182,19 +186,19 @@ GEM
rexml (3.2.6)
rsolr (1.1.2)
builder (>= 2.1.2)
rubocop (1.60.2)
rubocop (1.63.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (1.3.0)
Expand All @@ -220,14 +224,12 @@ GEM
unicode-display_width (2.5.0)
uuid (2.3.9)
macaddr (~> 1.0)
webmock (3.22.0)
webmock (3.23.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
x86_64-darwin-21
x86_64-darwin-22
x86_64-darwin-23
x86_64-linux

Expand All @@ -240,13 +242,15 @@ DEPENDENCIES
faraday (~> 1.9)
ffi
goo!
json-ld (~> 3.0.2)
jwt
libxml-ruby (~> 2.0)
minitest
minitest-reporters (>= 0.5.0)
multi_json (~> 1.0)
oj (~> 2.0)
omni_logger
parallel (~> 1.24)
pony
pry
rack (~> 1.0)
Expand All @@ -265,4 +269,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.4.21
2.4.22
139 changes: 98 additions & 41 deletions config/config.rb.sample
Original file line number Diff line number Diff line change
@@ -1,45 +1,102 @@
LinkedData.config do |config|
config.goo_port = 9000
config.goo_host = "localhost"
config.search_server_url = "http://localhost:8983/solr/term_search_core1"
config.property_search_server_url = "http://localhost:8983/solr/prop_search_core1"
config.repository_folder = "./test/data/ontology_files/repo"
config.rest_url_prefix = "http://data.bioontology.org/"
config.enable_security = false
config.java_max_heap_size = '10240M'
#PURL server config parameters
config.enable_purl = false
config.purl_host = "purl.bioontology.org"
config.purl_port = 80
config.purl_username = ""
config.purl_password = ""
config.purl_maintainers = ""
config.purl_target_url_prefix = "http://bioportal.bioontology.org"
config.sparql_endpoint_url = "http:://sparql_endpoint.com"
Goo.configure do |conf|
conf.main_languages = ['en']
end
GOO_BACKEND_NAME = ENV.include?("GOO_BACKEND_NAME") ? ENV["GOO_BACKEND_NAME"] : "4store"
GOO_PATH_QUERY = ENV.include?("GOO_PATH_QUERY") ? ENV["GOO_PATH_QUERY"] : "/sparql/"
GOO_PATH_DATA = ENV.include?("GOO_PATH_DATA") ? ENV["GOO_PATH_DATA"] : "/data/"
GOO_PATH_UPDATE = ENV.include?("GOO_PATH_UPDATE") ? ENV["GOO_PATH_UPDATE"] : "/update/"
GOO_PORT = ENV.include?("GOO_PORT") ? ENV["GOO_PORT"] : 9000
GOO_HOST = ENV.include?("GOO_HOST") ? ENV["GOO_HOST"] : "localhost"
REDIS_HOST = ENV.include?("REDIS_HOST") ? ENV["REDIS_HOST"] : "localhost"
REDIS_PORT = ENV.include?("REDIS_PORT") ? ENV["REDIS_PORT"] : 6379
SOLR_TERM_SEARCH_URL = ENV.include?("SOLR_TERM_SEARCH_URL") ? ENV["SOLR_TERM_SEARCH_URL"] : "http://localhost:8983/solr"
SOLR_PROP_SEARCH_URL = ENV.include?("SOLR_PROP_SEARCH_URL") ? ENV["SOLR_PROP_SEARCH_URL"] : "http://localhost:8983/solr"
GOO_SLICES = ENV["GOO_SLICES"] || 500
begin
LinkedData.config do |config|
Goo.slice_loading_size = GOO_SLICES.to_i
config.goo_backend_name = GOO_BACKEND_NAME.to_s
config.goo_host = GOO_HOST.to_s
config.goo_port = GOO_PORT.to_i
config.goo_path_query = GOO_PATH_QUERY.to_s
config.goo_path_data = GOO_PATH_DATA.to_s
config.goo_path_update = GOO_PATH_UPDATE.to_s
config.goo_redis_host = REDIS_HOST.to_s
config.goo_redis_port = REDIS_PORT.to_i
config.http_redis_host = REDIS_HOST.to_s
config.http_redis_port = REDIS_PORT.to_i
config.ontology_analytics_redis_host = REDIS_HOST.to_s
config.ontology_analytics_redis_port = REDIS_PORT.to_i
config.search_server_url = SOLR_TERM_SEARCH_URL.to_s
config.property_search_server_url = SOLR_PROP_SEARCH_URL.to_s
config.sparql_endpoint_url = "http:://sparql_endpoint.com"
# config.enable_notifications = false
#
config.java_max_heap_size = '20480M'
config.main_languages = ['en']

# Caches
config.goo_redis_host = REDIS_HOST.to_s
config.goo_redis_port = REDIS_PORT.to_i
config.enable_http_cache = false

# Email notifications
config.enable_notifications = false
config.email_sender = '[email protected]' # Default sender for emails
config.email_override = '[email protected]' # all email gets sent here. Disable with email_override_disable.
config.email_disable_override = true
config.smtp_host = 'localhost'
config.smtp_port = 1025
config.smtp_auth_type = :plain # :none, :plain, :login, :cram_md5
config.smtp_domain = 'lirmm.fr'
config.smtp_user = 'test'
config.smtp_password = 'test'
# Emails of the instance administrators to get mail notifications when new user or new ontology
# config.admin_emails = ['[email protected]']

#oauth
config.oauth_providers = {
github: {
check: :access_token,
link: 'https://api.github.com/user'
},
keycloak: {
check: :jwt_token,
cert: 'KEYCLOAK_SECRET_KEY'
},
orcid: {
check: :access_token,
link: 'https://pub.orcid.org/v3.0/me'
},
google: {
check: :access_token,
link: 'https://www.googleapis.com/oauth2/v3/userinfo'
# 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
config.interportal_hash = {
'agroportal' => {
'api' => 'http://data.agroportal.lirmm.fr',
'ui' => 'http://agroportal.lirmm.fr',
'apikey' => '1cfae05f-9e67-486f-820b-b393dec5764b'
},
'ncbo' => {
'api' => 'http://data.bioontology.org',
'ui' => 'http://bioportal.bioontology.org',
'apikey' => '4a5011ea-75fa-4be6-8e89-f45c8c84844e'
},
'sifr' => {
'api' => 'http://data.bioportal.lirmm.fr',
'ui' => 'http://bioportal.lirmm.fr',
'apikey' => '1cfae05f-9e67-486f-820b-b393dec5764b'
}
}
}

# oauth
config.oauth_providers = {
github: {
check: :access_token,
link: 'https://api.github.com/user'
},
keycloak: {
check: :jwt_token,
cert: 'KEYCLOAK_SECRET_KEY'
},
orcid: {
check: :access_token,
link: 'https://pub.orcid.org/v3.0/me'
},
google: {
check: :access_token,
link: 'https://www.googleapis.com/oauth2/v3/userinfo'
}
}
end
rescue NameError => e
binding.pry
# puts '(CNFG) >> LinkedData not available, cannot load config'
end

#sometimes tmp by default cannot allocate large files
$TMP_SORT_FOLDER = "SOME TMP FOLDER"
# sometimes tmp by default cannot allocate large files
$TMP_SORT_FOLDER = 'SOME TMP FOLDER'
55 changes: 0 additions & 55 deletions config/config.test.rb

This file was deleted.

Loading

0 comments on commit 23ca9e0

Please sign in to comment.