Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual preflabels: Additional fixes to obscure unit test failures #224

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ group :development do
gem 'rubocop', require: false
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 'goo', github: 'ncbo/goo', branch: 'develop'
gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop'
36 changes: 18 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GIT
remote: https://github.com/ncbo/goo.git
revision: 3c3ab5ae2824e9a1149b907b01a6c0c461a347e3
branch: master
revision: 35721855ba808517698d8b94eb38d4553001c4b6
branch: develop
specs:
goo (0.0.2)
addressable (~> 2.8)
Expand All @@ -16,8 +16,8 @@ GIT

GIT
remote: https://github.com/ncbo/sparql-client.git
revision: e89c26aa96f184dbe9b52d51e04fb3d9ba998dbc
branch: master
revision: 1657f0dd69fd4b522d3549a6848670175f5e98cc
branch: develop
specs:
sparql-client (1.0.1)
json_pure (>= 1.4)
Expand Down Expand Up @@ -47,7 +47,7 @@ GEM
connection_pool (2.4.1)
cube-ruby (0.0.3)
daemons (1.4.1)
date (3.3.4)
date (3.4.0)
docile (1.4.1)
domain_name (0.6.20240107)
email_spec (2.3.0)
Expand All @@ -71,8 +71,8 @@ GEM
domain_name (~> 0.5)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.7.2)
json_pure (2.7.2)
json (2.8.1)
json_pure (2.8.1)
language_server-protocol (3.17.0.3)
launchy (3.0.1)
addressable (~> 2.8)
Expand All @@ -90,7 +90,7 @@ GEM
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1001)
mime-types-data (3.2024.1105)
mini_mime (1.1.5)
minitest (4.7.5)
minitest-reporters (0.14.24)
Expand All @@ -99,10 +99,10 @@ GEM
minitest (>= 2.12, < 5.0)
powerbar
multi_json (1.15.0)
net-http (0.4.1)
net-http (0.5.0)
uri
net-http-persistent (2.9.4)
net-imap (0.4.17)
net-imap (0.4.18)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -112,14 +112,14 @@ GEM
net-smtp (0.5.0)
net-protocol
netrc (0.11.0)
oj (3.16.6)
oj (3.16.7)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omni_logger (0.1.4)
logger
ostruct (0.6.0)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.5.0)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
pony (1.13.1)
Expand Down Expand Up @@ -150,11 +150,11 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.8)
rexml (3.3.9)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
rubocop (1.67.0)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -164,7 +164,7 @@ GEM
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
rubocop-ast (1.36.1)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
rubyzip (1.3.0)
Expand All @@ -183,10 +183,10 @@ GEM
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thread_safe (0.3.6)
timeout (0.4.1)
timeout (0.4.2)
tzinfo (0.3.62)
unicode-display_width (2.6.0)
uri (0.13.1)
uri (1.0.1)
uuid (2.3.9)
macaddr (~> 1.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ def generate_missing_labels_each(artifacts = {}, logger, paging, page_classes, p

if prefLabel_lang.nil? || no_default_prefLabel
lang_rdfs_labels = c.label(include_languages: true)

lang_rdfs_labels = {none: []} if lang_rdfs_labels.to_a.empty? ||
(no_default_prefLabel && (lang_rdfs_labels.keys & [portal_lang, :none]).empty?)
lang_rdfs_labels.is_a?(Array) ||
(no_default_prefLabel && lang_rdfs_labels.is_a?(Hash) && (lang_rdfs_labels.keys & [portal_lang, :none]).empty?)

lang_rdfs_labels.each do |lang, rdfs_labels|
if rdfs_labels && rdfs_labels.length > 1 && c.synonym.length > 0
Expand Down
1 change: 1 addition & 0 deletions lib/ontologies_linked_data/utils/ontology_csv_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def write_header(ont)
end

def write_class(ont_class)
ont_class.bring_remaining
row = CSV::Row.new(@headers, Array.new(@headers.size), false)

# ID
Expand Down