From 09a6db612046402078f024c1e0f70c1cd49fa32a Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Mon, 7 Mar 2022 09:25:22 -0800 Subject: [PATCH 01/39] Update branch specifier to develop --- Gemfile | 11 ++++++----- Gemfile.lock | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index 6585a824..0bb12418 100644 --- a/Gemfile +++ b/Gemfile @@ -9,11 +9,12 @@ gem 'rake', '~> 10.0' gem 'redis' gem 'ruby-xxHash' -# Development -gem 'pry', group: :development +group :development do + gem 'pry' +end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'master' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master' -gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'master' +gem 'goo', github: 'ncbo/goo', branch: 'develop' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' +gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop' gem 'ncbo_resource_index', github: 'ncbo/resource_index' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 7cc86c8a..73cb126f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/ncbo/goo.git - revision: d0dd816a0afd5b85a02c4b909502cf3a93e6be58 - branch: master + revision: ed6283cb05a2e5a003d11c80cd63661533b98141 + branch: develop specs: goo (0.0.2) addressable (= 2.3.5) @@ -16,8 +16,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 052e17698a59ff548a749fa7e365156c39aa7305 - branch: master + revision: 23e41f7ca3e4f55ded008ad889d678006342f56e + branch: develop specs: ontologies_linked_data (0.0.1) activesupport @@ -51,7 +51,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 - branch: master + branch: develop specs: sparql-client (1.0.1) json_pure (>= 1.4) From 4e599cf48787a4ea53ecad4bf90e7f7426796284 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 9 Mar 2022 21:30:55 -0800 Subject: [PATCH 02/39] remove deprecated ncbo_resource_index --- Gemfile | 3 +-- Gemfile.lock | 36 +++--------------------------------- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/Gemfile b/Gemfile index 0bb12418..e0fd6769 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,5 @@ end # NCBO gems (can be from a local dev path or from rubygems/git) gem 'goo', github: 'ncbo/goo', branch: 'develop' +gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'remove_ncbo_resource_index' gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' -gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop' -gem 'ncbo_resource_index', github: 'ncbo/resource_index' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 73cb126f..5500c014 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: ed6283cb05a2e5a003d11c80cd63661533b98141 + revision: 9aa06b55b82e1168d1a842ec797dca464f8fc947 branch: develop specs: goo (0.0.2) @@ -16,8 +16,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 23e41f7ca3e4f55ded008ad889d678006342f56e - branch: develop + revision: dac406167b740576dd43eecbd5ae85e15bc3de9e + branch: remove_ncbo_resource_index specs: ontologies_linked_data (0.0.1) activesupport @@ -26,7 +26,6 @@ GIT json libxml-ruby multi_json - ncbo_resource_index oj omni_logger pony @@ -35,19 +34,6 @@ GIT rsolr rubyzip -GIT - remote: https://github.com/ncbo/resource_index.git - revision: 24a7f14a6da4f4a0eaba1016ca5a378dfccd7441 - specs: - ncbo_resource_index (0.0.1) - elasticsearch (= 2.0.0) - mysql2 (= 0.5.2) - pony - ref - ruby-xxHash - sequel - typhoeus - GIT remote: https://github.com/ncbo/sparql-client.git revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 @@ -75,16 +61,6 @@ GEM cube-ruby (0.0.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - elasticsearch (2.0.0) - elasticsearch-api (= 2.0.0) - elasticsearch-transport (= 2.0.0) - elasticsearch-api (2.0.0) - multi_json - elasticsearch-transport (2.0.0) - faraday - multi_json - ethon (0.15.0) - ffi (>= 1.15.0) faraday (1.10.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -130,7 +106,6 @@ GEM minitest (4.7.5) multi_json (1.15.0) multipart-post (2.1.1) - mysql2 (0.5.2) net-http-persistent (2.9.4) netrc (0.11.0) oj (2.18.5) @@ -148,7 +123,6 @@ GEM rdf (1.0.8) addressable (>= 2.2) redis (4.6.0) - ref (2.0.0) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) @@ -160,11 +134,8 @@ GEM ruby-xxHash (0.4.0.2) ruby2_keywords (0.0.5) rubyzip (2.3.2) - sequel (5.54.0) systemu (2.6.5) thread_safe (0.3.6) - typhoeus (1.4.0) - ethon (>= 0.9.0) tzinfo (0.3.60) unf (0.1.4) unf_ext @@ -181,7 +152,6 @@ DEPENDENCIES ffi goo! minitest (~> 4.0) - ncbo_resource_index! oj (~> 2.0) ontologies_linked_data! pry From 25ee3018082906bb9158c57deb1b6b0fa8a6c7e7 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Fri, 25 Mar 2022 14:58:58 -0700 Subject: [PATCH 03/39] update ruby v2.6 -> 2.7 ncbo/bioportal-project#241 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4d97982e..db9402a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6 +FROM ruby:2.7 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends openjdk-11-jre-headless raptor2-utils # The Gemfile Caching Trick From 76b55c324e9c509aa7cc6476bce53cfb96a5d209 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 30 Mar 2022 22:26:05 -0700 Subject: [PATCH 04/39] ruby v2.7, bundler optimization - v2.3 --- .dockerignore | 5 ++++- .github/workflows/ruby-unit-tests.yml | 4 ++-- Dockerfile | 4 +++- Gemfile.lock | 2 +- config/{config.rb.test => config.test.rb} | 0 docker-compose.yml | 8 +++++++- run-unit-tests.sh | 4 ++-- 7 files changed, 19 insertions(+), 8 deletions(-) rename config/{config.rb.test => config.test.rb} (100%) diff --git a/.dockerignore b/.dockerignore index 907fcb07..53b9b1b0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,9 @@ -# Git +.bundle .git .gitignore +.github +.DS_Store +vendor/bundle # Logs log/* # Temp files diff --git a/.github/workflows/ruby-unit-tests.yml b/.github/workflows/ruby-unit-tests.yml index 6a30c87b..7066e554 100644 --- a/.github/workflows/ruby-unit-tests.yml +++ b/.github/workflows/ruby-unit-tests.yml @@ -10,8 +10,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: copy config file - run: cp config/config.rb.test config/config.rb + run: cp config/config.test.rb config/config.rb - name: Build docker-compose run: docker-compose build - name: Run unit tests - run: docker-compose up --exit-code-from unit-test + run: docker-compose run dev bundle exec rake test TESTOPTS='-v' diff --git a/Dockerfile b/Dockerfile index db9402a7..d56fa84e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends openjdk- RUN mkdir -p /srv/ontoportal/ncbo_annotator COPY Gemfile* /srv/ontoportal/ncbo_annotator/ WORKDIR /srv/ontoportal/ncbo_annotator -RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)" +RUN gem install bundler +ENV BUNDLE_PATH /bundle RUN bundle install COPY . /srv/ontoportal/ncbo_annotator +CMD ["/bin/bash"] diff --git a/Gemfile.lock b/Gemfile.lock index 73cb126f..8cbf6196 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -191,4 +191,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.1.4 + 2.3.10 diff --git a/config/config.rb.test b/config/config.test.rb similarity index 100% rename from config/config.rb.test rename to config/config.test.rb diff --git a/docker-compose.yml b/docker-compose.yml index abd88e8b..09d8f00e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,13 @@ version: '3.8' services: - unit-test: + dev: build: . + volumes: + - bundle:/bundle + - .:/srv/ontoportal/ncbo_annotator environment: + - BUNDLE_PATH=/bundle - GOO_BACKEND_NAME=4store - GOO_PORT=9000 - GOO_HOST=4store-ut @@ -35,3 +39,5 @@ services: && 4s-backend ontoportal_kb && 4s-httpd -D -s-1 -p 9000 ontoportal_kb" +volumes: + bundle: diff --git a/run-unit-tests.sh b/run-unit-tests.sh index c3065039..90031759 100755 --- a/run-unit-tests.sh +++ b/run-unit-tests.sh @@ -2,9 +2,9 @@ # sample script for running unit tests in docker. This functionality should be moved to a rake task # # add config for unit testing -[ -f config/config.rb ] || cp config/config.rb.test config/config.rb +[ -f config/config.rb ] || cp config/config.test.rb config/config.rb docker-compose build #docker-compose up --exit-code-from unit-test -docker-compose run --rm unit-test bundle exec rake test TESTOPTS='-v' +docker-compose run --rm dev bundle exec rake test TESTOPTS='-v' docker-compose kill From 08732ff394d08c0a5e6693b7ced2dec932f40429 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Mon, 18 Apr 2022 09:20:05 -0700 Subject: [PATCH 05/39] Reset branch specifier to develop --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index e0fd6769..1e277c8d 100644 --- a/Gemfile +++ b/Gemfile @@ -15,5 +15,5 @@ end # NCBO gems (can be from a local dev path or from rubygems/git) gem 'goo', github: 'ncbo/goo', branch: 'develop' -gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'remove_ncbo_resource_index' +gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop' gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' diff --git a/Gemfile.lock b/Gemfile.lock index 5500c014..380294d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,8 +16,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: dac406167b740576dd43eecbd5ae85e15bc3de9e - branch: remove_ncbo_resource_index + revision: ed6666eee52e973ebe43360c08c9692902a719b4 + branch: develop specs: ontologies_linked_data (0.0.1) activesupport @@ -54,10 +54,10 @@ GEM thread_safe (~> 0.1) tzinfo (~> 0.3.37) addressable (2.3.5) - bcrypt (3.1.16) + bcrypt (3.1.17) builder (3.2.4) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) cube-ruby (0.0.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) @@ -93,7 +93,7 @@ GEM json (2.6.1) json_pure (2.6.1) libxml-ruby (3.2.2) - logger (1.5.0) + logger (1.5.1) macaddr (1.7.2) systemu (~> 2.6.5) mail (2.7.1) From 5bdb6ee9434bad8de946e37312f2f14f918746c0 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Mon, 18 Apr 2022 14:22:11 -0700 Subject: [PATCH 06/39] Update Gemfile.lock --- Gemfile.lock | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 380294d1..5d33ce9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 9aa06b55b82e1168d1a842ec797dca464f8fc947 + revision: dc653acd412ac6b3d538394a53481bd5c3c11f4c branch: develop specs: goo (0.0.2) @@ -11,12 +11,11 @@ GIT rest-client rsolr sparql-client - systemu uuid GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: ed6666eee52e973ebe43360c08c9692902a719b4 + revision: 983516900a08e83e59fe3649187107cddee025f0 branch: develop specs: ontologies_linked_data (0.0.1) @@ -139,7 +138,7 @@ GEM tzinfo (0.3.60) unf (0.1.4) unf_ext - unf_ext (0.0.8) + unf_ext (0.0.8.1) uuid (2.3.9) macaddr (~> 1.0) From 84114f956aa2e6ef951d0d5fed447aeff6dd3f10 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Mon, 18 Apr 2022 14:32:53 -0700 Subject: [PATCH 07/39] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index bba32df2..c313c1c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -160,4 +160,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.10 + 2.3.11 From 76d5e4aff8ac9bd696da4a1ccb9a6742ffe6403b Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Tue, 19 Apr 2022 07:58:50 -0700 Subject: [PATCH 08/39] Add Linux platform --- Gemfile.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile.lock b/Gemfile.lock index c313c1c1..c42971ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -144,6 +144,7 @@ GEM PLATFORMS ruby + x86_64-linux DEPENDENCIES cube-ruby From 532f89677472dbf63475862d81fe9be3e1883353 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Tue, 19 Apr 2022 07:59:03 -0700 Subject: [PATCH 09/39] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c42971ac..b2b2a588 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 983516900a08e83e59fe3649187107cddee025f0 + revision: 138dad00e5ab90e2568529517ec988839450a870 branch: develop specs: ontologies_linked_data (0.0.1) From 54c1e3affede32bed5f02c95b51ccf1da5f84e36 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Tue, 28 Jun 2022 23:03:48 -0700 Subject: [PATCH 10/39] Fix - deprecation warning for pipelining commands on a Redis instance Addresses #19 Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0. redis.pipelined do redis.get("key") end should be replaced by redis.pipelined do |pipeline| pipeline.get("key") end --- lib/ncbo_annotator.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index 8594bcc4..d77109b5 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -218,9 +218,10 @@ def delete_term_cache(redis_prefix) while !class_keys.empty? # use expire instead of del to allow potential clients to finish using the data - redis.pipelined { - class_keys.each {|key| redis.expire(key, key_expire_time)} - } + redis.pipelined do |pipeline| + class_keys.each { |key| pipeline.expire(key, key_expire_time) } + end + redis.ltrim(key_storage, CHUNK_SIZE + 1, -1) # Remove what we just deleted redis.ltrim(key_storage, CHUNK_SIZE + 1, -1) # Remove what we just deleted class_keys = redis.lrange(key_storage, 0, CHUNK_SIZE) # Get next chunk end @@ -443,12 +444,12 @@ def annotate_direct(text, options={}) redis_data = Hash.new cur_inst = redis_current_instance() - redis.pipelined { + redis.pipelined do |pipeline| rawAnnotations.each do |ann| id = get_prefixed_id(cur_inst, ann.string_id) - redis_data[id] = { future: redis.hgetall(id) } + redis_data[id] = {future: pipeline.hgetall(id)} end - } + end sleep(1.0 / 150.0) redis_data.each do |k, v| while v[:future].value.is_a?(Redis::FutureNotReady) From 521c4f7a2723239ed5e283672984a1b09b413c64 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Tue, 28 Jun 2022 23:13:49 -0700 Subject: [PATCH 11/39] Remove duplicated line --- lib/ncbo_annotator.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index d77109b5..fbd53665 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -222,7 +222,6 @@ def delete_term_cache(redis_prefix) class_keys.each { |key| pipeline.expire(key, key_expire_time) } end redis.ltrim(key_storage, CHUNK_SIZE + 1, -1) # Remove what we just deleted - redis.ltrim(key_storage, CHUNK_SIZE + 1, -1) # Remove what we just deleted class_keys = redis.lrange(key_storage, 0, CHUNK_SIZE) # Get next chunk end else From d053a081b3d605671d106c7becbc39360b730b14 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Thu, 14 Jul 2022 11:46:04 -0700 Subject: [PATCH 12/39] Restore branch specifier to master --- Gemfile | 6 +++--- Gemfile.lock | 34 ++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 1e277c8d..4d4af1d2 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,6 @@ group :development do end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'develop' -gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' +gem 'goo', github: 'ncbo/goo', branch: 'master' +gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'master' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master' diff --git a/Gemfile.lock b/Gemfile.lock index b2b2a588..ea7333c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,10 @@ GIT remote: https://github.com/ncbo/goo.git - revision: dc653acd412ac6b3d538394a53481bd5c3c11f4c - branch: develop + revision: fd7d45cb862c5c2c1833b64a5c8c14154384edc2 + branch: master specs: goo (0.0.2) - addressable (= 2.3.5) + addressable (~> 2.8) pry rdf (= 1.0.8) redis @@ -15,8 +15,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 138dad00e5ab90e2568529517ec988839450a870 - branch: develop + revision: 5d0176d97d740ab5c7213980448019e44cf5574c + branch: master specs: ontologies_linked_data (0.0.1) activesupport @@ -36,7 +36,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 - branch: develop + branch: master specs: sparql-client (1.0.1) json_pure (>= 1.4) @@ -52,8 +52,9 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.3.5) - bcrypt (3.1.17) + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + bcrypt (3.1.18) builder (3.2.4) coderay (1.1.3) concurrent-ruby (1.1.10) @@ -85,13 +86,13 @@ GEM faraday-retry (1.0.3) ffi (1.15.5) http-accept (1.7.0) - http-cookie (1.0.4) + http-cookie (1.0.5) domain_name (~> 0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) - json (2.6.1) - json_pure (2.6.1) - libxml-ruby (3.2.2) + json (2.6.2) + json_pure (2.6.2) + libxml-ruby (3.2.3) logger (1.5.1) macaddr (1.7.2) systemu (~> 2.6.5) @@ -115,9 +116,10 @@ GEM pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) + public_suffix (4.0.7) + rack (2.2.4) + rack-test (2.0.2) + rack (>= 1.3) rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) @@ -138,7 +140,7 @@ GEM tzinfo (0.3.60) unf (0.1.4) unf_ext - unf_ext (0.0.8.1) + unf_ext (0.0.8.2) uuid (2.3.9) macaddr (~> 1.0) From ed325ae9f79e3b0a0061b1af0b02f624de1d0eef Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Mon, 18 Jul 2022 10:26:33 -0700 Subject: [PATCH 13/39] Update Gemfile.lock --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ea7333c0..e5917701 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 5d0176d97d740ab5c7213980448019e44cf5574c + revision: 8196bf34b45c75f8104bb76dfcba1db0f2c048e4 branch: master specs: ontologies_linked_data (0.0.1) @@ -77,8 +77,8 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) @@ -105,7 +105,7 @@ GEM mini_mime (1.1.2) minitest (4.7.5) multi_json (1.15.0) - multipart-post (2.1.1) + multipart-post (2.2.3) net-http-persistent (2.9.4) netrc (0.11.0) oj (2.18.5) @@ -123,7 +123,7 @@ GEM rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) - redis (4.6.0) + redis (4.7.1) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) From 5bf81650de3652f407610e66247561134b61e0e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jul 2022 22:12:44 +0000 Subject: [PATCH 14/39] Bump tzinfo from 0.3.60 to 0.3.61 Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 0.3.60 to 0.3.61. - [Release notes](https://github.com/tzinfo/tzinfo/releases) - [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md) - [Commits](https://github.com/tzinfo/tzinfo/compare/v0.3.60...v0.3.61) --- updated-dependencies: - dependency-name: tzinfo dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e5917701..e64048ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -137,7 +137,7 @@ GEM rubyzip (2.3.2) systemu (2.6.5) thread_safe (0.3.6) - tzinfo (0.3.60) + tzinfo (0.3.61) unf (0.1.4) unf_ext unf_ext (0.0.8.2) From bad8c646205014b1fc82793fb9c07d7075b4c068 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 27 Jul 2022 17:07:43 -0700 Subject: [PATCH 15/39] Reset branch specifier to develop --- Gemfile | 6 +++--- Gemfile.lock | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 4d4af1d2..1e277c8d 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,6 @@ group :development do end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'master' -gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'master' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master' +gem 'goo', github: 'ncbo/goo', branch: 'develop' +gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' diff --git a/Gemfile.lock b/Gemfile.lock index e64048ed..5e746b13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/ncbo/goo.git - revision: fd7d45cb862c5c2c1833b64a5c8c14154384edc2 - branch: master + revision: 7fe22f03b56a944822c986269076a2e2aa64d6a2 + branch: develop specs: goo (0.0.2) addressable (~> 2.8) @@ -15,8 +15,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 8196bf34b45c75f8104bb76dfcba1db0f2c048e4 - branch: master + revision: 53cd329b4a4a5fa4c4294cf4fe2dd43b0d748948 + branch: develop specs: ontologies_linked_data (0.0.1) activesupport @@ -36,7 +36,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 - branch: master + branch: develop specs: sparql-client (1.0.1) json_pure (>= 1.4) From 75d1a8f302c8af4060bf62fc619f230084da521e Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 3 Nov 2022 13:49:20 -0700 Subject: [PATCH 16/39] Gemfile.lock update --- Gemfile.lock | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5e746b13..c27063cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 7fe22f03b56a944822c986269076a2e2aa64d6a2 + revision: 091e0ca001244a7dbaed0644b0b1087a3a24d16a branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 53cd329b4a4a5fa4c4294cf4fe2dd43b0d748948 + revision: a00dac9a0825697cb7f6ac5e0f4db6ab8f4bae79 branch: develop specs: ontologies_linked_data (0.0.1) @@ -52,16 +52,17 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) bcrypt (3.1.18) builder (3.2.4) coderay (1.1.3) concurrent-ruby (1.1.10) + connection_pool (2.3.0) cube-ruby (0.0.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - faraday (1.10.0) + faraday (1.10.2) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -92,7 +93,7 @@ GEM concurrent-ruby (~> 1.0) json (2.6.2) json_pure (2.6.2) - libxml-ruby (3.2.3) + libxml-ruby (3.2.4) logger (1.5.1) macaddr (1.7.2) systemu (~> 2.6.5) @@ -116,14 +117,17 @@ GEM pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (4.0.7) - rack (2.2.4) + public_suffix (5.0.0) + rack (3.0.0) rack-test (2.0.2) rack (>= 1.3) rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) - redis (4.7.1) + redis (5.0.5) + redis-client (>= 0.9.0) + redis-client (0.11.0) + connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) @@ -163,4 +167,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.11 + 2.3.15 From 0d5a4d823d9c9df11ba98292f06971bb9a127235 Mon Sep 17 00:00:00 2001 From: mdorf Date: Mon, 30 Jan 2023 16:28:01 -0800 Subject: [PATCH 17/39] Gemfile.lock update --- Gemfile.lock | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c27063cc..2fc982b8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 091e0ca001244a7dbaed0644b0b1087a3a24d16a + revision: 15023141f6051d4fa6cba6081d082c720327b0c9 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: a00dac9a0825697cb7f6ac5e0f4db6ab8f4bae79 + revision: d7425e581d35b265a0263faba7c32c0fdb51cbba branch: develop specs: ontologies_linked_data (0.0.1) @@ -57,12 +57,13 @@ GEM bcrypt (3.1.18) builder (3.2.4) coderay (1.1.3) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.0) connection_pool (2.3.0) cube-ruby (0.0.3) + date (3.3.3) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - faraday (1.10.2) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -91,14 +92,17 @@ GEM domain_name (~> 0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) - json (2.6.2) - json_pure (2.6.2) - libxml-ruby (3.2.4) - logger (1.5.1) + json (2.6.3) + json_pure (2.6.3) + libxml-ruby (4.0.0) + logger (1.5.3) macaddr (1.7.2) systemu (~> 2.6.5) - mail (2.7.1) + mail (2.8.0.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) @@ -106,27 +110,36 @@ GEM mini_mime (1.1.2) minitest (4.7.5) multi_json (1.15.0) - multipart-post (2.2.3) + multipart-post (2.3.0) net-http-persistent (2.9.4) + net-imap (0.3.4) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol netrc (0.11.0) oj (2.18.5) omni_logger (0.1.4) logger pony (1.13.1) mail (>= 2.0) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.0) - rack (3.0.0) + public_suffix (5.0.1) + rack (3.0.4.1) rack-test (2.0.2) rack (>= 1.3) rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) - redis (5.0.5) + redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.11.0) + redis-client (0.12.1) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -141,6 +154,7 @@ GEM rubyzip (2.3.2) systemu (2.6.5) thread_safe (0.3.6) + timeout (0.3.1) tzinfo (0.3.61) unf (0.1.4) unf_ext From f5484f7f2003a761812d09ea83c00e248034e0e7 Mon Sep 17 00:00:00 2001 From: mdorf Date: Tue, 31 Jan 2023 11:58:26 -0800 Subject: [PATCH 18/39] Gemfile.lock update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2fc982b8..3e2aacf2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: d7425e581d35b265a0263faba7c32c0fdb51cbba + revision: e6372f193488a69ef0c2015017ace8a48274a326 branch: develop specs: ontologies_linked_data (0.0.1) From 6bb32f10669abd7ff982294489cfe6609ec32f47 Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 1 Feb 2023 09:14:40 -0800 Subject: [PATCH 19/39] Gemfile had references to develop branch --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 1e277c8d..4d4af1d2 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,6 @@ group :development do end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'develop' -gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' +gem 'goo', github: 'ncbo/goo', branch: 'master' +gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'master' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master' From fa8fc96c7f55b1a37f2677bde3d2d16fa93712be Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 1 Feb 2023 09:15:03 -0800 Subject: [PATCH 20/39] Gemfile.lock update --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e2aacf2..b5ed4721 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 15023141f6051d4fa6cba6081d082c720327b0c9 - branch: develop + revision: 919c20dec58375eb8a4dd1aed47864e2ad7bacfa + branch: master specs: goo (0.0.2) addressable (~> 2.8) @@ -15,8 +15,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: e6372f193488a69ef0c2015017ace8a48274a326 - branch: develop + revision: b22237dc0753ac3824ad60780ce386162142ebcd + branch: master specs: ontologies_linked_data (0.0.1) activesupport @@ -36,7 +36,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 - branch: develop + branch: master specs: sparql-client (1.0.1) json_pure (>= 1.4) From f1da45b4b6d4fee2872ab0a735841a3f6e54f8ad Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 1 Feb 2023 11:54:30 -0800 Subject: [PATCH 21/39] Allow setting ruby version in the docker-compose file --- .github/workflows/ruby-unit-tests.yml | 4 ++-- Dockerfile | 15 ++++++++++++--- docker-compose.yml | 9 ++++++--- run-unit-tests.sh | 3 ++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ruby-unit-tests.yml b/.github/workflows/ruby-unit-tests.yml index 7066e554..d303dafe 100644 --- a/.github/workflows/ruby-unit-tests.yml +++ b/.github/workflows/ruby-unit-tests.yml @@ -8,10 +8,10 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: copy config file run: cp config/config.test.rb config/config.rb - name: Build docker-compose run: docker-compose build - name: Run unit tests - run: docker-compose run dev bundle exec rake test TESTOPTS='-v' + run: docker-compose run ruby bundle exec rake test TESTOPTS='-v' diff --git a/Dockerfile b/Dockerfile index d56fa84e..5521fe1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,19 @@ -FROM ruby:2.7 +ARG RUBY_VERSION +ARG DISTRO_NAME=bullseye + +FROM ruby:$RUBY_VERSION-$DISTRO_NAME + +RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \ + openjdk-11-jre-headless \ + raptor2-utils \ + && rm -rf /var/lib/apt/lists/* -RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends openjdk-11-jre-headless raptor2-utils # The Gemfile Caching Trick RUN mkdir -p /srv/ontoportal/ncbo_annotator -COPY Gemfile* /srv/ontoportal/ncbo_annotator/ +COPY *.gemspec Gemfile* /srv/ontoportal/ncbo_annotator/ + WORKDIR /srv/ontoportal/ncbo_annotator + RUN gem install bundler ENV BUNDLE_PATH /bundle RUN bundle install diff --git a/docker-compose.yml b/docker-compose.yml index 09d8f00e..48e0ece4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,13 @@ version: '3.8' services: - dev: - build: . + ruby: + build: + context: . + args: + RUBY_VERSION: '2.7' volumes: - - bundle:/bundle + #- bundle:/bundle - .:/srv/ontoportal/ncbo_annotator environment: - BUNDLE_PATH=/bundle diff --git a/run-unit-tests.sh b/run-unit-tests.sh index 90031759..cc239130 100755 --- a/run-unit-tests.sh +++ b/run-unit-tests.sh @@ -6,5 +6,6 @@ docker-compose build #docker-compose up --exit-code-from unit-test -docker-compose run --rm dev bundle exec rake test TESTOPTS='-v' +docker-compose run --rm ruby bundle exec rake test TESTOPTS='-v' +#docker-compose down docker-compose kill From d77efb1d9e21bc1936dbd80d6d522f3b0e44eaf4 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 1 Feb 2023 13:27:34 -0800 Subject: [PATCH 22/39] Add codecov reporting --- .github/workflows/ruby-unit-tests.yml | 10 +++++++++- Gemfile | 4 +++- Gemfile.lock | 15 ++++++++++++++- test/test_case.rb | 17 +++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby-unit-tests.yml b/.github/workflows/ruby-unit-tests.yml index d303dafe..f5e84715 100644 --- a/.github/workflows/ruby-unit-tests.yml +++ b/.github/workflows/ruby-unit-tests.yml @@ -14,4 +14,12 @@ jobs: - name: Build docker-compose run: docker-compose build - name: Run unit tests - run: docker-compose run ruby bundle exec rake test TESTOPTS='-v' + run: | + ci_env=`bash <(curl -s https://codecov.io/env)` + docker-compose run $ci_env -e CI ruby bundle exec rake test TESTOPTS='-v' + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + with: + flags: unittests + verbose: true + fail_ci_if_error: false # optional (default = false) diff --git a/Gemfile b/Gemfile index 1e277c8d..8d2426c5 100644 --- a/Gemfile +++ b/Gemfile @@ -3,14 +3,16 @@ source 'https://rubygems.org' gem 'cube-ruby', require: 'cube' gem 'faraday', '~> 1.9' gem 'ffi' -gem 'minitest', '~> 4.0' gem 'oj', '~> 2.0' gem 'rake', '~> 10.0' gem 'redis' gem 'ruby-xxHash' group :development do + gem 'minitest', '~> 4.0' gem 'pry' + gem 'simplecov' + gem 'simplecov-cobertura' # for codecov.io end # NCBO gems (can be from a local dev path or from rubygems/git) diff --git a/Gemfile.lock b/Gemfile.lock index 3e2aacf2..a701beb0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -61,6 +61,7 @@ GEM connection_pool (2.3.0) cube-ruby (0.0.3) date (3.3.3) + docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) faraday (1.10.3) @@ -146,12 +147,22 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) + rexml (3.2.5) rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) ruby-xxHash (0.4.0.2) ruby2_keywords (0.0.5) rubyzip (2.3.2) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) systemu (2.6.5) thread_safe (0.3.6) timeout (0.3.1) @@ -178,7 +189,9 @@ DEPENDENCIES rake (~> 10.0) redis ruby-xxHash + simplecov + simplecov-cobertura sparql-client! BUNDLED WITH - 2.3.15 + 2.3.26 diff --git a/test/test_case.rb b/test/test_case.rb index 025649e8..52476b5d 100644 --- a/test/test_case.rb +++ b/test/test_case.rb @@ -1,3 +1,20 @@ +if ENV['COVERAGE'] == 'true' || ENV['CI'] == 'true' + require 'simplecov' + require 'simplecov-cobertura' + # https://github.com/codecov/ruby-standard-2 + # Generate HTML and Cobertura reports which can be consumed by codecov uploader + SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::CoberturaFormatter + ]) + SimpleCov.start do + add_filter '/test/' + add_filter 'app.rb' + add_filter 'init.rb' + add_filter '/config/' + end +end + require 'ontologies_linked_data' require_relative '../lib/ncbo_annotator' require_relative '../config/config' From 2ee3915af8aa96be7f5fce825c25c6291c8952e5 Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 1 Feb 2023 14:56:12 -0800 Subject: [PATCH 23/39] fixed a failing unit test, test_annotate_minsize_term --- Gemfile.lock | 2 +- test/test_annotator.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a701beb0..2c60cc1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -194,4 +194,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.26 + 2.3.15 diff --git a/test/test_annotator.rb b/test/test_annotator.rb index 56f162f3..08a3736d 100644 --- a/test/test_annotator.rb +++ b/test/test_annotator.rb @@ -397,7 +397,7 @@ def test_annotate_minsize_term expand_with_mappings: false, min_term_size: 10, whole_word_only: true, - with_synonyms: true + with_synonyms: false }) direct = annotations From 964f0680799421ab24eddc974d9f2995c6c88734 Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 1 Feb 2023 15:12:17 -0800 Subject: [PATCH 24/39] Gemfile.lock update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index add8fc6f..21fff0c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: b22237dc0753ac3824ad60780ce386162142ebcd + revision: 546b3a45a6f359c09f0cc95d954f03e979b4847a branch: master specs: ontologies_linked_data (0.0.1) From 88cc449c289bd86e574a84f79fcfb1d883c684cb Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Fri, 17 Feb 2023 17:24:17 -0800 Subject: [PATCH 25/39] Set mgrep default port to 55556 --- config/config.test.rb | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.test.rb b/config/config.test.rb index bfa5c227..b915f03d 100644 --- a/config/config.test.rb +++ b/config/config.test.rb @@ -12,7 +12,7 @@ REDIS_PORT = ENV.include?('REDIS_PORT') ? ENV['REDIS_PORT'] : 6379 SOLR_HOST = ENV.include?('SOLR_HOST') ? ENV['SOLR_HOST'] : 'localhost' MGREP_HOST = ENV.include?('MGREP_HOST') ? ENV['MGREP_HOST'] : 'localhost' -MGREP_PORT = ENV.include?('MGREP_PORT') ? ENV['MGREP_PORT'] : 55555 +MGREP_PORT = ENV.include?('MGREP_PORT') ? ENV['MGREP_PORT'] : 55556 LinkedData.config do |config| config.goo_host = GOO_HOST.to_s diff --git a/docker-compose.yml b/docker-compose.yml index 48e0ece4..82bd3a0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: - REDIS_PORT=6379 - SOLR_HOST=solr-ut - MGREP_HOST=mgrep-ut - - MGREP_PORT=55555 + - MGREP_PORT=55556 depends_on: - solr-ut - redis-ut @@ -33,7 +33,7 @@ services: image: redis mgrep-ut: - image: ontoportal/mgrep-ncbo:0.1 + image: ontoportal/mgrep:0.0.2 4store-ut: image: bde2020/4store From 276973b627608c3f87933af9d0092a3de87f8592 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Fri, 17 Feb 2023 18:42:08 -0800 Subject: [PATCH 26/39] gem version update --- Gemfile | 4 ++-- Gemfile.lock | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 8d2426c5..11eea763 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,9 @@ source 'https://rubygems.org' -gem 'cube-ruby', require: 'cube' +gem 'cube-ruby' gem 'faraday', '~> 1.9' gem 'ffi' -gem 'oj', '~> 2.0' +gem 'oj', '~> 3.0' gem 'rake', '~> 10.0' gem 'redis' gem 'ruby-xxHash' diff --git a/Gemfile.lock b/Gemfile.lock index 2c60cc1a..f8520e96 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 15023141f6051d4fa6cba6081d082c720327b0c9 + revision: 4fc0723dcb81c6ab37713ade379566e93ec2caf6 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: e6372f193488a69ef0c2015017ace8a48274a326 + revision: 297f630ee5a35a78b015adf32fdb1e3af59ca652 branch: develop specs: ontologies_linked_data (0.0.1) @@ -35,7 +35,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git - revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 + revision: 55e7dbf858eb571c767bc67868f9af61663859cb branch: develop specs: sparql-client (1.0.1) @@ -99,7 +99,7 @@ GEM logger (1.5.3) macaddr (1.7.2) systemu (~> 2.6.5) - mail (2.8.0.1) + mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop @@ -123,7 +123,7 @@ GEM net-smtp (0.3.3) net-protocol netrc (0.11.0) - oj (2.18.5) + oj (3.14.2) omni_logger (0.1.4) logger pony (1.13.1) @@ -140,7 +140,7 @@ GEM addressable (>= 2.2) redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.12.1) + redis-client (0.12.2) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -165,7 +165,7 @@ GEM simplecov_json_formatter (0.1.4) systemu (2.6.5) thread_safe (0.3.6) - timeout (0.3.1) + timeout (0.3.2) tzinfo (0.3.61) unf (0.1.4) unf_ext @@ -183,7 +183,7 @@ DEPENDENCIES ffi goo! minitest (~> 4.0) - oj (~> 2.0) + oj (~> 3.0) ontologies_linked_data! pry rake (~> 10.0) @@ -194,4 +194,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.15 + 2.3.26 From a8999d3ccae99f10d486b7004280f12f86295d07 Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 4 May 2023 14:27:13 -0700 Subject: [PATCH 27/39] fixed #26 - annotator cache generation failure - Unsupported command argument type: RDF::URI --- lib/ncbo_annotator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index fbd53665..85948a55 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -671,9 +671,9 @@ def create_term_entry(redis, instance_prefix, ontResourceId, resourceId, label_t # exclude single-character or empty/null values if (val.to_s.strip.length > 2) - id = get_prefixed_id_from_value(instance_prefix, val) + id = get_prefixed_id_from_value(instance_prefix, val.to_s) # populate dictionary structure - redis.hset(DICTHOLDER.call(instance_prefix), id, val) + redis.hset(DICTHOLDER.call(instance_prefix), id, val.to_s) entry = "#{label_type}#{LABEL_DELIM}#{ontResourceId}" # parse out semanticTypeCodes From 9fd2649b66d3bd6ef7666729d9f91087aa406266 Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 4 May 2023 14:28:25 -0700 Subject: [PATCH 28/39] Gemfile.lock update --- Gemfile.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f8520e96..8a5ddadf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 4fc0723dcb81c6ab37713ade379566e93ec2caf6 + revision: b8c7867450ec6ea2d3167eb9d9b1aed5614a1ce3 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 297f630ee5a35a78b015adf32fdb1e3af59ca652 + revision: 79527b94fbb59081ba58281a5cd51ec3448fadb0 branch: develop specs: ontologies_linked_data (0.0.1) @@ -52,13 +52,13 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.8.1) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) bcrypt (3.1.18) builder (3.2.4) coderay (1.1.3) - concurrent-ruby (1.2.0) - connection_pool (2.3.0) + concurrent-ruby (1.2.2) + connection_pool (2.4.0) cube-ruby (0.0.3) date (3.3.3) docile (1.4.0) @@ -95,7 +95,7 @@ GEM concurrent-ruby (~> 1.0) json (2.6.3) json_pure (2.6.3) - libxml-ruby (4.0.0) + libxml-ruby (4.1.1) logger (1.5.3) macaddr (1.7.2) systemu (~> 2.6.5) @@ -107,7 +107,7 @@ GEM method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) + mime-types-data (3.2023.0218.1) mini_mime (1.1.2) minitest (4.7.5) multi_json (1.15.0) @@ -123,7 +123,7 @@ GEM net-smtp (0.3.3) net-protocol netrc (0.11.0) - oj (3.14.2) + oj (3.14.3) omni_logger (0.1.4) logger pony (1.13.1) @@ -132,15 +132,15 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (5.0.1) - rack (3.0.4.1) - rack-test (2.0.2) + rack (3.0.7) + rack-test (2.1.0) rack (>= 1.3) rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.12.2) + redis-client (0.14.1) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -166,7 +166,7 @@ GEM systemu (2.6.5) thread_safe (0.3.6) timeout (0.3.2) - tzinfo (0.3.61) + tzinfo (0.3.62) unf (0.1.4) unf_ext unf_ext (0.0.8.2) @@ -194,4 +194,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.26 + 2.3.15 From 3ae6bfb56dc59a670b5bc1a513ff4929f8cf3756 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 17 Jul 2023 14:31:12 -0700 Subject: [PATCH 29/39] bundle update --- Gemfile.lock | 20 ++++++++++---------- docker-compose.yml | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8a5ddadf..d13e2575 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: b8c7867450ec6ea2d3167eb9d9b1aed5614a1ce3 + revision: fb203b0396d03c1df61abfcdbc4070787010f052 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 79527b94fbb59081ba58281a5cd51ec3448fadb0 + revision: 1f535313248f27170f7ecdb3450ae8247be735eb branch: develop specs: ontologies_linked_data (0.0.1) @@ -54,11 +54,11 @@ GEM tzinfo (~> 0.3.37) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) - bcrypt (3.1.18) + bcrypt (3.1.19) builder (3.2.4) coderay (1.1.3) concurrent-ruby (1.2.2) - connection_pool (2.4.0) + connection_pool (2.4.1) cube-ruby (0.0.3) date (3.3.3) docile (1.4.0) @@ -113,7 +113,7 @@ GEM multi_json (1.15.0) multipart-post (2.3.0) net-http-persistent (2.9.4) - net-imap (0.3.4) + net-imap (0.3.6) date net-protocol net-pop (0.1.2) @@ -123,7 +123,7 @@ GEM net-smtp (0.3.3) net-protocol netrc (0.11.0) - oj (3.14.3) + oj (3.15.0) omni_logger (0.1.4) logger pony (1.13.1) @@ -131,8 +131,8 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.1) - rack (3.0.7) + public_suffix (5.0.3) + rack (3.0.8) rack-test (2.1.0) rack (>= 1.3) rake (10.5.0) @@ -165,7 +165,7 @@ GEM simplecov_json_formatter (0.1.4) systemu (2.6.5) thread_safe (0.3.6) - timeout (0.3.2) + timeout (0.4.0) tzinfo (0.3.62) unf (0.1.4) unf_ext @@ -194,4 +194,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.15 + 2.4.17 diff --git a/docker-compose.yml b/docker-compose.yml index 82bd3a0d..43c9aa0e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: command: "bundle exec rake test TESTOPTS='-v'" solr-ut: - image: ontoportal/solr-ut:0.1 + image: ontoportal/solr-ut:0.0.2 redis-ut: image: redis @@ -37,6 +37,7 @@ services: 4store-ut: image: bde2020/4store + platform: linux/amd64 command: > bash -c "4s-backend-setup --segments 4 ontoportal_kb && 4s-backend ontoportal_kb From 067104ae94c0e9d058cfbf419364fbf03f34de43 Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 7 Sep 2023 16:46:06 -0700 Subject: [PATCH 30/39] Gemfile.lock update --- Gemfile.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d13e2575..191022a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: fb203b0396d03c1df61abfcdbc4070787010f052 + revision: 911d71aefe433314d11398445e3856fca503b9c1 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 1f535313248f27170f7ecdb3450ae8247be735eb + revision: e33a0e451f8a8226d98291168e45b46d7065e670 branch: develop specs: ontologies_linked_data (0.0.1) @@ -52,7 +52,7 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) bcrypt (3.1.19) builder (3.2.4) @@ -105,15 +105,15 @@ GEM net-pop net-smtp method_source (1.0.0) - mime-types (3.4.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) - mini_mime (1.1.2) + mime-types-data (3.2023.0808) + mini_mime (1.1.5) minitest (4.7.5) multi_json (1.15.0) multipart-post (2.3.0) net-http-persistent (2.9.4) - net-imap (0.3.6) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -123,7 +123,7 @@ GEM net-smtp (0.3.3) net-protocol netrc (0.11.0) - oj (3.15.0) + oj (3.16.1) omni_logger (0.1.4) logger pony (1.13.1) @@ -138,16 +138,16 @@ GEM rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) - redis (5.0.6) + redis (5.0.7) redis-client (>= 0.9.0) - redis-client (0.14.1) + redis-client (0.17.0) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.2.5) + rexml (3.2.6) rsolr (2.5.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) @@ -194,4 +194,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.4.17 + 2.3.15 From 04226ac5840a328e6f906f15c769ee6ee5723102 Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 7 Sep 2023 17:00:35 -0700 Subject: [PATCH 31/39] Gemfile.lock update --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e7ebe5cf..2633fbff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 911d71aefe433314d11398445e3856fca503b9c1 - branch: develop + revision: cd477a1c71d8c2b2c26c3ea92c9457643a9cc70a + branch: master specs: goo (0.0.2) addressable (~> 2.8) @@ -15,8 +15,8 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: e33a0e451f8a8226d98291168e45b46d7065e670 - branch: develop + revision: 89474face62004ab70430ef718556fe50720e038 + branch: master specs: ontologies_linked_data (0.0.1) activesupport @@ -35,7 +35,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git - revision: fb4a89b420f8eb6dda5190a126b6c62e32c4c0c9 + revision: d418d56a6c9ff5692f925b45739a2a1c66bca851 branch: master specs: sparql-client (1.0.1) From 4f4361e2c181143bba3876326ecda407a587207e Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 1 Nov 2023 20:14:26 -0700 Subject: [PATCH 32/39] Gemfile.lock update --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2633fbff..22c95b35 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: cd477a1c71d8c2b2c26c3ea92c9457643a9cc70a + revision: daea7822af9e5ca1961d6873a758735133a1b2db branch: master specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 89474face62004ab70430ef718556fe50720e038 + revision: a7ad210e846a390f203457be2459719214d142fe branch: master specs: ontologies_linked_data (0.0.1) @@ -87,7 +87,7 @@ GEM faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - ffi (1.15.5) + ffi (1.16.3) http-accept (1.7.0) http-cookie (1.0.5) domain_name (~> 0.5) @@ -107,7 +107,7 @@ GEM method_source (1.0.0) mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0808) + mime-types-data (3.2023.1003) mini_mime (1.1.5) minitest (4.7.5) multi_json (1.15.0) @@ -120,7 +120,7 @@ GEM net-protocol net-protocol (0.2.1) timeout - net-smtp (0.3.3) + net-smtp (0.4.0) net-protocol netrc (0.11.0) oj (3.16.1) @@ -138,9 +138,9 @@ GEM rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) - redis (5.0.7) - redis-client (>= 0.9.0) - redis-client (0.17.0) + redis (5.0.8) + redis-client (>= 0.17.0) + redis-client (0.18.0) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) From ebbb7a3c28ecde49c261290bec34ab082490a271 Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 1 Nov 2023 20:16:56 -0700 Subject: [PATCH 33/39] Gemfile.lock update --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 191022a2..1ff15f36 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 911d71aefe433314d11398445e3856fca503b9c1 + revision: 6db93bb3d5095a5fe0d017e572c5a04caa34ebc6 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: e33a0e451f8a8226d98291168e45b46d7065e670 + revision: ff10e5ff4103431da1aec3cbbaebc57547c0035c branch: develop specs: ontologies_linked_data (0.0.1) @@ -87,7 +87,7 @@ GEM faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - ffi (1.15.5) + ffi (1.16.3) http-accept (1.7.0) http-cookie (1.0.5) domain_name (~> 0.5) @@ -107,7 +107,7 @@ GEM method_source (1.0.0) mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0808) + mime-types-data (3.2023.1003) mini_mime (1.1.5) minitest (4.7.5) multi_json (1.15.0) @@ -120,7 +120,7 @@ GEM net-protocol net-protocol (0.2.1) timeout - net-smtp (0.3.3) + net-smtp (0.4.0) net-protocol netrc (0.11.0) oj (3.16.1) @@ -138,9 +138,9 @@ GEM rake (10.5.0) rdf (1.0.8) addressable (>= 2.2) - redis (5.0.7) - redis-client (>= 0.9.0) - redis-client (0.17.0) + redis (5.0.8) + redis-client (>= 0.17.0) + redis-client (0.18.0) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) From c72bbfe7bfc1f8c153816ef0ac874ce5c69cf370 Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 14 Dec 2023 16:10:03 -0800 Subject: [PATCH 34/39] resolved an issue with the Recommender query in AllegroGraph --- Gemfile.lock | 36 +++++++++++++++++------------------- lib/ncbo_annotator.rb | 5 ++++- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1ff15f36..8c251895 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: ff10e5ff4103431da1aec3cbbaebc57547c0035c + revision: 9487c7f73e68abab097af523d42c1d2e106e614b branch: develop specs: ontologies_linked_data (0.0.1) @@ -52,18 +52,18 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) - bcrypt (3.1.19) + bcrypt (3.1.20) + bigdecimal (3.1.5) builder (3.2.4) coderay (1.1.3) concurrent-ruby (1.2.2) connection_pool (2.4.1) cube-ruby (0.0.3) - date (3.3.3) + date (3.3.4) docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20231109) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -93,10 +93,10 @@ GEM domain_name (~> 0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) - json (2.6.3) - json_pure (2.6.3) - libxml-ruby (4.1.1) - logger (1.5.3) + json (2.7.1) + json_pure (2.7.1) + libxml-ruby (4.1.2) + logger (1.6.0) macaddr (1.7.2) systemu (~> 2.6.5) mail (2.8.1) @@ -107,7 +107,7 @@ GEM method_source (1.0.0) mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.1003) + mime-types-data (3.2023.1205) mini_mime (1.1.5) minitest (4.7.5) multi_json (1.15.0) @@ -118,12 +118,13 @@ GEM net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout net-smtp (0.4.0) net-protocol netrc (0.11.0) - oj (3.16.1) + oj (3.16.3) + bigdecimal (>= 3.0) omni_logger (0.1.4) logger pony (1.13.1) @@ -131,7 +132,7 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.3) + public_suffix (5.0.4) rack (3.0.8) rack-test (2.1.0) rack (>= 1.3) @@ -140,7 +141,7 @@ GEM addressable (>= 2.2) redis (5.0.8) redis-client (>= 0.17.0) - redis-client (0.18.0) + redis-client (0.19.0) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -165,11 +166,8 @@ GEM simplecov_json_formatter (0.1.4) systemu (2.6.5) thread_safe (0.3.6) - timeout (0.4.0) + timeout (0.4.1) tzinfo (0.3.62) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) uuid (2.3.9) macaddr (~> 1.0) diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index 85948a55..caf2198a 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -3,7 +3,7 @@ # require 'sparql_http' # require 'ontologies_linked_data' # require_relative 'dictionary/generator' - +require 'uri' require 'zlib' require 'redis' require 'ontologies_linked_data' @@ -723,6 +723,9 @@ def mappings_for_class_ids(class_ids) end def hierarchy_query(class_ids) + # mdorf, 12/14/2023: AllegroGraph throws a MalformedQuery exception + # if an ID is not of the proper URI format + class_ids.select! { |id| id =~ URI::regexp } filter_ids = class_ids.map { |id| "?id = <#{id}>" } .join " || " query = < ?parent . } From d7ee80860a0eab9293af81083a0700d099c50263 Mon Sep 17 00:00:00 2001 From: mdorf Date: Fri, 15 Dec 2023 14:29:03 -0800 Subject: [PATCH 35/39] an improved fix to ncbo/ncbo_ontology_recommender#21 --- lib/ncbo_annotator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ncbo_annotator.rb b/lib/ncbo_annotator.rb index caf2198a..4631b53a 100644 --- a/lib/ncbo_annotator.rb +++ b/lib/ncbo_annotator.rb @@ -725,7 +725,7 @@ def mappings_for_class_ids(class_ids) def hierarchy_query(class_ids) # mdorf, 12/14/2023: AllegroGraph throws a MalformedQuery exception # if an ID is not of the proper URI format - class_ids.select! { |id| id =~ URI::regexp } + class_ids.select! { |id| id =~ /\A#{URI::regexp}\z/ } filter_ids = class_ids.map { |id| "?id = <#{id}>" } .join " || " query = < ?parent . } From 944af97d38d874497f1db28a206a0e9d3b753d17 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Tue, 19 Dec 2023 16:41:20 -0800 Subject: [PATCH 36/39] Add AllegroGraph backend to unit test matrix --- .github/workflows/ruby-unit-tests.yml | 8 +- Dockerfile | 3 +- config/config.test.rb | 33 ++++---- docker-compose.yml | 108 ++++++++++++++++++++++---- run-unit-tests.sh | 5 +- 5 files changed, 122 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ruby-unit-tests.yml b/.github/workflows/ruby-unit-tests.yml index f5e84715..c4268d19 100644 --- a/.github/workflows/ruby-unit-tests.yml +++ b/.github/workflows/ruby-unit-tests.yml @@ -7,6 +7,10 @@ on: jobs: test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + backend: ['ruby', 'ruby-agraph'] # api runs tests with 4store backend and api-agraph runs with AllegroGraph backend steps: - uses: actions/checkout@v3 - name: copy config file @@ -14,9 +18,11 @@ jobs: - name: Build docker-compose run: docker-compose build - name: Run unit tests + # unit tests are run inside a container + # http://docs.codecov.io/docs/testing-with-docker run: | ci_env=`bash <(curl -s https://codecov.io/env)` - docker-compose run $ci_env -e CI ruby bundle exec rake test TESTOPTS='-v' + docker-compose run $ci_env -e CI ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v' - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/Dockerfile b/Dockerfile index 5521fe1e..5016faa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,8 @@ COPY *.gemspec Gemfile* /srv/ontoportal/ncbo_annotator/ WORKDIR /srv/ontoportal/ncbo_annotator -RUN gem install bundler +# set bundler to v2.4.22 which is the last version supported by ruby 2.7 +RUN gem install bundler -v 2.4.22 ENV BUNDLE_PATH /bundle RUN bundle install COPY . /srv/ontoportal/ncbo_annotator diff --git a/config/config.test.rb b/config/config.test.rb index b915f03d..bfba7b91 100644 --- a/config/config.test.rb +++ b/config/config.test.rb @@ -1,24 +1,31 @@ # frozen_string_literal: true # -# This file is designed for used for unit testing +# configuration for unit testing # -# All the defaults are set in -# https://github.com/ncbo/ontologies_linked_data/blob/master/lib/ontologies_linked_data/config/config.rb -### -GOO_HOST = ENV.include?('GOO_HOST') ? ENV['GOO_HOST'] : 'localhost' -GOO_PORT = ENV.include?('GOO_PORT') ? ENV['GOO_PORT'] : 9000 -REDIS_HOST = ENV.include?('REDIS_HOST') ? ENV['REDIS_HOST'] : 'localhost' -REDIS_PORT = ENV.include?('REDIS_PORT') ? ENV['REDIS_PORT'] : 6379 -SOLR_HOST = ENV.include?('SOLR_HOST') ? ENV['SOLR_HOST'] : 'localhost' -MGREP_HOST = ENV.include?('MGREP_HOST') ? ENV['MGREP_HOST'] : 'localhost' -MGREP_PORT = ENV.include?('MGREP_PORT') ? ENV['MGREP_PORT'] : 55556 +GOO_HOST = ENV.include?('GOO_HOST') ? ENV['GOO_HOST'] : 'localhost' +GOO_PORT = ENV.include?('GOO_PORT') ? ENV['GOO_PORT'] : 9000 +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/" +REDIS_HOST = ENV.include?('REDIS_HOST') ? ENV['REDIS_HOST'] : 'localhost' +REDIS_PORT = ENV.include?('REDIS_PORT') ? ENV['REDIS_PORT'] : 6379 +MGREP_HOST = ENV.include?('MGREP_HOST') ? ENV['MGREP_HOST'] : 'localhost' +MGREP_PORT = ENV.include?('MGREP_PORT') ? ENV['MGREP_PORT'] : 55556 +SOLR_TERM_SEARCH_URL = ENV.include?("SOLR_TERM_SEARCH_URL") ? ENV["SOLR_TERM_SEARCH_URL"] : "http://localhost:8983/solr/term_search_core1" +SOLR_PROP_SEARCH_URL = ENV.include?("SOLR_PROP_SEARCH_URL") ? ENV["SOLR_PROP_SEARCH_URL"] : "http://localhost:8983/solr/prop_search_core1" + LinkedData.config do |config| + config.goo_backend_name = GOO_BACKEND_NAME.to_s config.goo_host = GOO_HOST.to_s config.goo_port = GOO_PORT.to_i - config.search_server_url = "http://#{SOLR_HOST}:8983/solr/term_search_core1".to_s - config.property_search_server_url = "http://#{SOLR_HOST}:8983/solr/prop_search_core1".to_s + 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.search_server_url = SOLR_TERM_SEARCH_URL.to_s + config.property_search_server_url = SOLR_PROP_SEARCH_URL.to_s end Annotator.config do |config| config.mgrep_host = MGREP_HOST.to_s diff --git a/docker-compose.yml b/docker-compose.yml index 43c9aa0e..3b343882 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,39 +1,89 @@ version: '3.8' -services: - ruby: +x-app: &app build: context: . args: RUBY_VERSION: '2.7' + environment: &env + COVERAGE: 'true' # enable simplecov code coverage + REDIS_HOST: redis-ut + REDIS_PORT: 6379 + MGREP_HOST: mgrep-ut + MGREP_PORT: 55556 + SOLR_TERM_SEARCH_URL: http://solr-ut:8983/solr/term_search_core1 + SOLR_PROP_SEARCH_URL: http://solr-ut:8983/solr/prop_search_core1 volumes: - #- bundle:/bundle - .:/srv/ontoportal/ncbo_annotator + stdin_open: true + tty: true + command: "bundle exec rake test TESTOPTS='-v'" + depends_on: &depends_on + solr-ut: + condition: service_healthy + redis-ut: + condition: service_healthy + mgrep-ut: + condition: service_healthy + +services: + ruby: + <<: *app environment: - - BUNDLE_PATH=/bundle - - GOO_BACKEND_NAME=4store - - GOO_PORT=9000 - - GOO_HOST=4store-ut - - REDIS_HOST=redis-ut - - REDIS_PORT=6379 - - SOLR_HOST=solr-ut - - MGREP_HOST=mgrep-ut - - MGREP_PORT=55556 + <<: *env + GOO_BACKEND_NAME: 4store + GOO_PORT: 9000 + GOO_HOST: 4store-ut depends_on: - - solr-ut - - redis-ut - - 4store-ut - - mgrep-ut - command: "bundle exec rake test TESTOPTS='-v'" + <<: *depends_on + 4store-ut: + condition: service_started + profiles: + - 4store + + ruby-agraph: + <<: *app + environment: + <<: *env + GOO_BACKEND_NAME: ag + GOO_PORT: 10035 + GOO_HOST: agraph-ut + GOO_PATH_QUERY: /repositories/bioportal_test + GOO_PATH_DATA: /repositories/bioportal_test/statements + GOO_PATH_UPDATE: /repositories/bioportal_test/statements + depends_on: + <<: *depends_on + agraph-ut: + condition: service_healthy + profiles: + - agraph solr-ut: image: ontoportal/solr-ut:0.0.2 + healthcheck: + test: ["CMD-SHELL", "curl -sf http://localhost:8983/solr/term_search_core1/admin/ping?wt=json | grep -iq '\"status\":\"OK\"}' || exit 1"] + start_period: 3s + interval: 10s + timeout: 5s + retries: 5 redis-ut: image: redis + healthcheck: + test: redis-cli ping + interval: 10s + timeout: 3s + retries: 10 mgrep-ut: image: ontoportal/mgrep:0.0.2 + platform: linux/amd64 + healthcheck: + test: ["CMD", "nc", "-z", "-v", "localhost", "55556"] + start_period: 3s + interval: 10s + timeout: 5s + retries: 5 4store-ut: image: bde2020/4store @@ -42,6 +92,30 @@ services: bash -c "4s-backend-setup --segments 4 ontoportal_kb && 4s-backend ontoportal_kb && 4s-httpd -D -s-1 -p 9000 ontoportal_kb" + profiles: + - 4store + + agraph-ut: + image: franzinc/agraph:v8.0.0 + platform: linux/amd64 + environment: + - AGRAPH_SUPER_USER=test + - AGRAPH_SUPER_PASSWORD=xyzzy + shm_size: 1g + command: > + bash -c "/agraph/bin/agraph-control --config /agraph/etc/agraph.cfg start + ; agtool repos create bioportal_test + ; agtool users add anonymous + ; agtool users grant anonymous root:bioportal_test:rw + ; tail -f /agraph/data/agraph.log" + healthcheck: + test: ["CMD-SHELL", "agtool storage-report bioportal_test || exit 1"] + start_period: 30s + interval: 10s + timeout: 5s + retries: 5 + profiles: + - agraph volumes: bundle: diff --git a/run-unit-tests.sh b/run-unit-tests.sh index cc239130..476c2b83 100755 --- a/run-unit-tests.sh +++ b/run-unit-tests.sh @@ -4,8 +4,7 @@ # add config for unit testing [ -f config/config.rb ] || cp config/config.test.rb config/config.rb docker-compose build -#docker-compose up --exit-code-from unit-test docker-compose run --rm ruby bundle exec rake test TESTOPTS='-v' -#docker-compose down -docker-compose kill +#docker-compose run --rm ruby-agraph bundle exec rake test TESTOPTS='-v' +docker-compose --profile agraph --profile 4store kill From 354b388cf652e55cd534c68c9db0ccdf60bc167a Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Tue, 19 Dec 2023 17:08:37 -0800 Subject: [PATCH 37/39] minitest style change for troubleshooting purposes --- test/test_annotator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_annotator.rb b/test/test_annotator.rb index 08a3736d..755c99c1 100644 --- a/test/test_annotator.rb +++ b/test/test_annotator.rb @@ -97,7 +97,7 @@ def test_generate_dictionary_file assert @@redis.exists?(Annotator::Models::NcboAnnotator::MGREP_DICTIONARY_REFRESH_TIMESTAMP) assert @@redis.exists?(Annotator::Models::NcboAnnotator::LAST_MGREP_RESTART_TIMESTAMP) refresh_timestamp = @@redis.get(Annotator::Models::NcboAnnotator::MGREP_DICTIONARY_REFRESH_TIMESTAMP) - assert refresh_timestamp > start_timestamp + assert_operator refresh_timestamp, :>, start_timestamp end def test_mallet_recognizer From 9a037b955b1d6c3c9955250d7499afdd10d4bbd3 Mon Sep 17 00:00:00 2001 From: mdorf Date: Wed, 10 Jan 2024 12:02:24 -0800 Subject: [PATCH 38/39] Gemfile.lock update --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8c251895..0dd16913 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 6db93bb3d5095a5fe0d017e572c5a04caa34ebc6 + revision: db2b330fb6c5fd4ea9ee17d5b58ca997f304a340 branch: develop specs: goo (0.0.2) @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 9487c7f73e68abab097af523d42c1d2e106e614b + revision: e716a6d410883a8e59121e7d09d2c80a6f6ab1fc branch: develop specs: ontologies_linked_data (0.0.1) @@ -63,7 +63,7 @@ GEM cube-ruby (0.0.3) date (3.3.4) docile (1.4.0) - domain_name (0.6.20231109) + domain_name (0.6.20240107) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -95,7 +95,7 @@ GEM concurrent-ruby (~> 1.0) json (2.7.1) json_pure (2.7.1) - libxml-ruby (4.1.2) + libxml-ruby (5.0.2) logger (1.6.0) macaddr (1.7.2) systemu (~> 2.6.5) @@ -105,7 +105,7 @@ GEM net-pop net-smtp method_source (1.0.0) - mime-types (3.5.1) + mime-types (3.5.2) mime-types-data (~> 3.2015) mime-types-data (3.2023.1205) mini_mime (1.1.5) @@ -120,7 +120,7 @@ GEM net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.4.0.1) net-protocol netrc (0.11.0) oj (3.16.3) @@ -141,7 +141,7 @@ GEM addressable (>= 2.2) redis (5.0.8) redis-client (>= 0.17.0) - redis-client (0.19.0) + redis-client (0.19.1) connection_pool rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) From f60341e8426adcad447a6fc3adb5b80207c5987a Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Fri, 12 Jan 2024 15:07:26 -0800 Subject: [PATCH 39/39] Gemfile.lock update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0dd16913..412e9f9b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: e716a6d410883a8e59121e7d09d2c80a6f6ab1fc + revision: 4b6b7f42882b9ad815ff5e90c354212aca085fda branch: develop specs: ontologies_linked_data (0.0.1) @@ -113,7 +113,7 @@ GEM multi_json (1.15.0) multipart-post (2.3.0) net-http-persistent (2.9.4) - net-imap (0.3.7) + net-imap (0.4.9.1) date net-protocol net-pop (0.1.2) @@ -192,4 +192,4 @@ DEPENDENCIES sparql-client! BUNDLED WITH - 2.3.15 + 2.4.22