Skip to content

Commit

Permalink
fix annotator after updating RDF version to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Feb 28, 2024
1 parent 9af92c0 commit 54ddd1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: create config.rb file
run: cp config/config.test.rb config/config.rb
- name: Set up solr configsets
run: ./test/solr/generate_ncbo_configsets.sh
- name: Install Dependencies
Expand Down
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: cd5bc312bd3acd2ff056a87a6f37b5419f3444dc
revision: cb03c4888cc95006e653eb70dd29ee69901dd6cd
branch: development
specs:
goo (0.0.2)
Expand Down Expand Up @@ -196,6 +196,7 @@ GEM

PLATFORMS
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
addressable (~> 2.8.0)
Expand Down
6 changes: 4 additions & 2 deletions lib/ncbo_annotator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,13 @@ def redis_last_mgrep_restart_default_timestamp()
def create_term_entry(redis, instance_prefix, ontResourceId, resourceId, label_type, val, semanticTypes)
begin
# NCBO-696 - Remove case-sensitive variations on terms in annotator dictionary
val.upcase!()
val = val.dup.upcase
rescue ArgumentError => e
binding.pry
val = val.dup

Check warning on line 739 in lib/ncbo_annotator.rb

View check run for this annotation

Codecov / codecov/patch

lib/ncbo_annotator.rb#L738-L739

Added lines #L738 - L739 were not covered by tests
# NCBO-832 - SCTSPA Annotator Cache building error (UTF-8)
val = val.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
val.upcase!()
val = val.upcase

Check warning on line 742 in lib/ncbo_annotator.rb

View check run for this annotation

Codecov / codecov/patch

lib/ncbo_annotator.rb#L742

Added line #L742 was not covered by tests
end

# exclude single-character or empty/null values
Expand Down

0 comments on commit 54ddd1e

Please sign in to comment.