From 89b68775fca3ab7d6451171bc3fee7679a82a1d5 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Tue, 21 May 2024 18:01:40 -0700 Subject: [PATCH 1/6] Gemfile update --- Gemfile.lock | 22 ++++++++++++---------- docker-compose.yml | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4e13127e..ec317ca3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 33583fd1c1d72b449cd6bb91815e3422b8448983 + revision: 70007faf43d0d96292809f89f15a27a757ccaa25 branch: develop specs: goo (0.0.2) @@ -27,7 +27,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: a3f6cf0493bb595011f98acf95efda33111c537b + revision: 048087406b7e7ea6530ed3e02254544f3ca74c0f branch: develop specs: ontologies_linked_data (0.0.1) @@ -81,7 +81,7 @@ GEM public_suffix (>= 2.0.2, < 6.0) base64 (0.2.0) bcrypt (3.1.20) - bigdecimal (3.1.7) + bigdecimal (3.1.8) builder (3.2.4) coderay (1.1.3) concurrent-ruby (1.2.3) @@ -120,9 +120,9 @@ GEM google-analytics-data-v1beta (0.12.0) gapic-common (>= 0.21.1, < 2.a) google-cloud-errors (~> 1.0) - google-apis-analytics_v3 (0.15.0) - google-apis-core (>= 0.14.0, < 2.a) - google-apis-core (0.14.1) + google-apis-analytics_v3 (0.16.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-core (0.15.0) addressable (~> 2.5, >= 2.5.1) googleauth (~> 1.9) httpclient (>= 2.8.1, < 3.a) @@ -182,14 +182,14 @@ GEM method_source (1.1.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0305) + mime-types-data (3.2024.0507) mini_mime (1.1.5) minitest (4.7.5) mlanett-redis-lock (0.2.7) redis multi_json (1.15.0) net-http-persistent (2.9.4) - net-imap (0.4.10) + net-imap (0.4.11) date net-protocol net-pop (0.1.2) @@ -211,7 +211,7 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (5.0.5) - rack (3.0.10) + rack (3.0.11) rack-test (2.1.0) rack (>= 1.3) rake (13.2.1) @@ -233,7 +233,8 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) rsolr (2.6.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) @@ -256,6 +257,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.0) sys-proctable (1.3.0) ffi (~> 1.1) systemu (2.6.5) diff --git a/docker-compose.yml b/docker-compose.yml index 44c9fda4..50e83dcf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,7 +93,7 @@ services: - 4store solr-ut: - image: ontoportal/solr-ut:0.1.0 + image: ontoportal/solr-ut:0.2.0 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 @@ -105,7 +105,7 @@ services: image: ontoportal/mgrep:0.0.2 platform: linux/amd64 healthcheck: - test: ["CMD", "nc", "-z", "-v", "localhost", "55556"] + test: ["CMD", "nc", "-z", "-v", "127.0.0.1", "55556"] start_period: 3s interval: 10s timeout: 5s From 8333a71b0291c719680bdae2a40cb1b1f831c596 Mon Sep 17 00:00:00 2001 From: mdorf Date: Mon, 1 Jul 2024 11:53:26 -0700 Subject: [PATCH 2/6] fixed #81 - ncbo_ontology_pull script throws undefined method error --- Gemfile.lock | 36 ++++++++++++++++++------------------ bin/ncbo_ontology_pull | 3 +-- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ec317ca3..17b34f38 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ GIT GIT remote: https://github.com/ncbo/ontologies_linked_data.git - revision: 048087406b7e7ea6530ed3e02254544f3ca74c0f + revision: 013a322440b4cfd899908d15ff605799acf8e6ef branch: develop specs: ontologies_linked_data (0.0.1) @@ -82,9 +82,9 @@ GEM base64 (0.2.0) bcrypt (3.1.20) bigdecimal (3.1.8) - builder (3.2.4) + builder (3.3.0) coderay (1.1.3) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.3) connection_pool (2.4.1) cube-ruby (0.0.3) dante (0.2.0) @@ -105,7 +105,7 @@ GEM faraday-net_http (3.0.2) faraday-retry (2.2.1) faraday (~> 2.0) - ffi (1.16.3) + ffi (1.17.0) gapic-common (0.21.1) faraday (>= 1.9, < 3.a) faraday-retry (>= 1.0, < 3.a) @@ -138,12 +138,12 @@ GEM google-cloud-errors (1.4.0) google-protobuf (3.25.3) google-protobuf (3.25.3-x86_64-linux) - googleapis-common-protos (1.5.0) - google-protobuf (~> 3.18) + googleapis-common-protos (1.6.0) + google-protobuf (>= 3.18, < 5.a) googleapis-common-protos-types (~> 1.7) grpc (~> 1.41) - googleapis-common-protos-types (1.14.0) - google-protobuf (~> 3.18) + googleapis-common-protos-types (1.15.0) + google-protobuf (>= 3.18, < 5.a) googleauth (1.11.0) faraday (>= 1.0, < 3.a) google-cloud-env (~> 2.1) @@ -151,15 +151,15 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) - grpc (1.63.0) + grpc (1.64.0) google-protobuf (~> 3.25) googleapis-common-protos-types (~> 1.0) - grpc (1.63.0-x86_64-linux) + grpc (1.64.0-x86_64-linux) google-protobuf (~> 3.25) googleapis-common-protos-types (~> 1.0) htmlentities (4.3.4) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.6) domain_name (~> 0.5) httpclient (2.8.3) i18n (0.9.5) @@ -182,14 +182,14 @@ GEM method_source (1.1.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0507) + mime-types-data (3.2024.0604) mini_mime (1.1.5) minitest (4.7.5) mlanett-redis-lock (0.2.7) redis multi_json (1.15.0) net-http-persistent (2.9.4) - net-imap (0.4.11) + net-imap (0.4.12) date net-protocol net-pop (0.1.2) @@ -199,7 +199,7 @@ GEM net-smtp (0.5.0) net-protocol netrc (0.11.0) - oj (3.16.3) + oj (3.16.4) bigdecimal (>= 3.0) omni_logger (0.1.4) logger @@ -211,7 +211,7 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (5.0.5) - rack (3.0.11) + rack (3.1.3) rack-test (2.1.0) rack (>= 1.3) rake (13.2.1) @@ -219,7 +219,7 @@ GEM addressable (>= 2.2) redis (5.2.0) redis-client (>= 0.22.0) - redis-client (0.22.1) + redis-client (0.22.2) connection_pool representable (3.2.0) declarative (< 0.1.0) @@ -233,8 +233,8 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.2.8) - strscan (>= 3.0.9) + rexml (3.3.0) + strscan rsolr (2.6.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) diff --git a/bin/ncbo_ontology_pull b/bin/ncbo_ontology_pull index be3e08de..5cbe4359 100755 --- a/bin/ncbo_ontology_pull +++ b/bin/ncbo_ontology_pull @@ -30,9 +30,8 @@ opt_parser.parse! logger = Logger.new($stdout) logger.info "Starting ncbo pull"; logger.flush -puller = NcboCron::Models::OntologyPull.new begin - puller.do_ontology_pull(ontology_acronym, logger: logger, enable_pull_umls: true) + NcboCron::Helpers::OntologyHelper.do_ontology_pull(ontology_acronym, logger: logger, enable_pull_umls: true) rescue StandardError => e logger.error e.message logger.flush From 1fbfc8f7f3ca62de35912ec09f23cac72fea1550 Mon Sep 17 00:00:00 2001 From: mdorf Date: Mon, 1 Jul 2024 11:54:06 -0700 Subject: [PATCH 3/6] Gemfile.lock update --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 17b34f38..8749905e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,8 +77,8 @@ GEM activesupport (3.2.22.5) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) base64 (0.2.0) bcrypt (3.1.20) bigdecimal (3.1.8) @@ -166,7 +166,7 @@ GEM concurrent-ruby (~> 1.0) json (2.7.2) json_pure (2.7.2) - jwt (2.8.1) + jwt (2.8.2) base64 launchy (2.5.2) addressable (~> 2.8) @@ -189,7 +189,7 @@ GEM redis multi_json (1.15.0) net-http-persistent (2.9.4) - net-imap (0.4.12) + net-imap (0.4.14) date net-protocol net-pop (0.1.2) @@ -210,8 +210,8 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.5) - rack (3.1.3) + public_suffix (5.1.1) + rack (3.1.4) rack-test (2.1.0) rack (>= 1.3) rake (13.2.1) @@ -233,7 +233,7 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.3.0) + rexml (3.3.1) strscan rsolr (2.6.0) builder (>= 2.1.2) From e03c48179968b20a54693f876433514b8a60ff6f Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Tue, 16 Jul 2024 17:54:18 -0700 Subject: [PATCH 4/6] do not send notifications to ontology owners when running admin scripts fix https://github.com/ncbo/ncbo_cron/issues/77 --- bin/ncbo_ontology_delete | 3 +++ bin/ncbo_ontology_index | 3 +++ bin/ncbo_ontology_metrics | 4 ++++ bin/ncbo_ontology_process | 3 +++ bin/ncbo_ontology_property_index | 3 +++ bin/ncbo_ontology_pull | 3 +++ 6 files changed, 19 insertions(+) diff --git a/bin/ncbo_ontology_delete b/bin/ncbo_ontology_delete index ff36e6d6..f3bdbc16 100755 --- a/bin/ncbo_ontology_delete +++ b/bin/ncbo_ontology_delete @@ -12,6 +12,9 @@ config_exists = File.exist?(File.expand_path('../../config/config.rb', __FILE__) abort("Please create a config/config.rb file using the config/config.rb.sample as a template") unless config_exists require_relative '../config/config' +# do not send notifications to ontology owners when running this script +LinkedData.settings.enable_notifications = false + require 'optparse' options = {} opt_parser = OptionParser.new do |opts| diff --git a/bin/ncbo_ontology_index b/bin/ncbo_ontology_index index 746d8d95..706b0741 100755 --- a/bin/ncbo_ontology_index +++ b/bin/ncbo_ontology_index @@ -12,6 +12,9 @@ config_exists = File.exist?(File.expand_path('../../config/config.rb', __FILE__) abort("Please create a config/config.rb file using the config/config.rb.sample as a template") unless config_exists require_relative '../config/config' +# do not send notifications to ontology owners when running this script +LinkedData.settings.enable_notifications = false + platform = "local" if LinkedData.settings.goo_host.include? "stage" platform = "stage" diff --git a/bin/ncbo_ontology_metrics b/bin/ncbo_ontology_metrics index 6497314b..ca714ba5 100755 --- a/bin/ncbo_ontology_metrics +++ b/bin/ncbo_ontology_metrics @@ -12,6 +12,10 @@ config_exists = File.exist?(File.expand_path('../../config/config.rb', __FILE__) abort("Please create a config/config.rb file using the config/config.rb.sample as a template") unless config_exists require_relative '../config/config' +# do not send notifications to ontology owners when running this script +LinkedData.settings.enable_notifications = false + + platform = "local" if LinkedData.settings.goo_host.include? "stage" platform = "stage" diff --git a/bin/ncbo_ontology_process b/bin/ncbo_ontology_process index 879e749d..4c0a8957 100755 --- a/bin/ncbo_ontology_process +++ b/bin/ncbo_ontology_process @@ -13,6 +13,9 @@ abort("Please create a config/config.rb file using the config/config.rb.sample a require_relative '../config/config' require 'optparse' +# do not send notifications to ontology owners when running this script +LinkedData.settings.enable_notifications = false + options = {all: false} opt_parser = OptionParser.new do |opts| # Set a banner, displayed at the top of the help screen. diff --git a/bin/ncbo_ontology_property_index b/bin/ncbo_ontology_property_index index 0d908777..12eb05e1 100755 --- a/bin/ncbo_ontology_property_index +++ b/bin/ncbo_ontology_property_index @@ -12,6 +12,9 @@ config_exists = File.exist?(File.expand_path('../../config/config.rb', __FILE__) abort("Please create a config/config.rb file using the config/config.rb.sample as a template") unless config_exists require_relative '../config/config' +# do not send notifications to ontology owners when running this script +LinkedData.settings.enable_notifications = false + platform = "local" if LinkedData.settings.goo_host.include? "stage" platform = "stage" diff --git a/bin/ncbo_ontology_pull b/bin/ncbo_ontology_pull index 5cbe4359..45720492 100755 --- a/bin/ncbo_ontology_pull +++ b/bin/ncbo_ontology_pull @@ -14,6 +14,9 @@ require_relative '../lib/ncbo_cron' require_relative '../config/config' require 'optparse' +# do not send notifications to ontology owners when running this script +LinkedData.settings.enable_notifications = false + ontology_acronym = '' opt_parser = OptionParser.new do |opts| opts.on('-o', '--ontology ACRONYM', 'Ontology acronym to pull if new version exist') do |acronym| From f403169603ada9e22cbdd5d5086c3e003564d95d Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 26 Aug 2024 16:46:20 -0700 Subject: [PATCH 5/6] use docker compose instead of docker-compose --- .github/workflows/ruby-unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby-unit-tests.yml b/.github/workflows/ruby-unit-tests.yml index df4372fa..8b75e9ce 100644 --- a/.github/workflows/ruby-unit-tests.yml +++ b/.github/workflows/ruby-unit-tests.yml @@ -20,7 +20,7 @@ jobs: - name: Run unit tests run: | ci_env=`bash <(curl -s https://codecov.io/env)` - docker-compose run $ci_env -e CI --rm ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v' + docker compose run $ci_env -e CI --rm ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v' - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: From 3bb491139267efc37d3b752888824ca3dd976e85 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Mon, 26 Aug 2024 16:48:47 -0700 Subject: [PATCH 6/6] use docker compose instead of docker-compose --- .github/workflows/ruby-unit-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby-unit-tests.yml b/.github/workflows/ruby-unit-tests.yml index 8b75e9ce..ba9979f8 100644 --- a/.github/workflows/ruby-unit-tests.yml +++ b/.github/workflows/ruby-unit-tests.yml @@ -15,8 +15,8 @@ jobs: - uses: actions/checkout@v4 - name: copy config.rb file from template run: cp config/config.test.rb config/config.rb - - name: Build docker-compose - run: docker-compose build + - name: Build docker compose + run: docker compose build - name: Run unit tests run: | ci_env=`bash <(curl -s https://codecov.io/env)`