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

Sync: BioPortal v5.33.4 release #8

Merged
merged 27 commits into from
Dec 4, 2024
Merged
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b5422b1
Gemfile.lock update
alexskr Oct 15, 2024
fd54ad2
changes required to support ncbo/ontologies_linked_data#220
mdorf Oct 19, 2024
d8d7233
Gemfile.lock update
mdorf Oct 21, 2024
d06a9f4
Merge branch 'develop' into multilingual_preflabels
alexskr Oct 21, 2024
106143a
Merge pull request #169 from ncbo/multilingual_preflabels
alexskr Oct 21, 2024
609f2af
reset branch specifier to develop
alexskr Oct 21, 2024
37deda2
add x86_64-linux platform
alexskr Oct 21, 2024
8d3d031
Merge branch 'master' into develop
alexskr Oct 22, 2024
ae2d27d
Merge pull request #170 from ncbo/develop
alexskr Oct 22, 2024
8fee0e2
reset branch specifier to master
alexskr Oct 22, 2024
db7b020
Gemfile.lock update
alexskr Nov 14, 2024
792e257
Gemfile.lock update
alexskr Nov 19, 2024
c1c0494
Gemfile.lock update
alexskr Nov 19, 2024
7640ade
Gemfile.lock
mdorf Nov 20, 2024
030e291
additional unit tests to verify the fix for ncbo/ontologies_linked_da…
mdorf Nov 21, 2024
6e2e4f0
Gemfile.lock update
mdorf Nov 21, 2024
9f9b8f1
fixed failing unit tests as a result of modifying the test ontologies
mdorf Nov 21, 2024
637eed0
another fix to the metrics unit tests that were faling
mdorf Nov 22, 2024
e0e4ab9
another fix to the metrics unit tests that were failing
mdorf Nov 22, 2024
2ce0957
Merge branch 'multilingual_preflabels' of github.com:ncbo/ontologies_…
mdorf Nov 22, 2024
f765dbd
some tests still failed due to the changes to the test ontology
mdorf Nov 22, 2024
8a0d1dd
Merge pull request #171 from ncbo/multilingual_preflabels
alexskr Nov 22, 2024
0488f52
Gemfile.lock update
alexskr Nov 22, 2024
4cfee2a
Merge branch 'master' into develop
alexskr Nov 22, 2024
6175af0
Merge pull request #172 from ncbo/develop
alexskr Nov 26, 2024
e50ca26
reset branch specifier to master
alexskr Nov 27, 2024
78e6e0d
Gemfile.lock update
alexskr Nov 27, 2024
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
13 changes: 6 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -41,14 +41,13 @@ gem 'unicorn-worker-killer'
gem 'haml', '~> 5.2.2' # pin see https://github.com/ncbo/ontologies_api/pull/107
gem 'redcarpet'


# NCBO gems (can be from a local dev path or from rubygems/git)
gem 'ncbo_annotator', github: 'ncbo/ncbo_annotator', branch: 'master'
gem 'ncbo_cron', github: 'ncbo/ncbo_cron', branch: 'master'
gem 'ncbo_ontology_recommender', github: 'ncbo/ncbo_ontology_recommender', branch: 'master'
gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master'
gem 'goo', github: 'ncbo/goo', branch: 'master'
gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'master'
gem 'ncbo_annotator', github: 'ncbo/ncbo_annotator', branch: 'develop'
gem 'ncbo_cron', github: 'ncbo/ncbo_cron', branch: 'develop'
gem 'ncbo_ontology_recommender', github: 'ncbo/ncbo_ontology_recommender', branch: 'develop'
gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop'
gem 'goo', github: 'ncbo/goo', branch: 'multilingual_preflabels'
gem 'ontologies_linked_data', github: 'ncbo/ontologies_linked_data', branch: 'develop'


group :development do
26 changes: 13 additions & 13 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: f943ac33e87c55c88131c32d826ed5d39c89302c
branch: master
revision: a27d6ca79d47eb045b1bdfe311531827428aa504
branch: multilingual_preflabels
specs:
goo (0.0.2)
addressable (~> 2.8)
@@ -16,8 +16,8 @@ GIT

GIT
remote: https://github.com/ncbo/ncbo_annotator.git
revision: d46d667ec1b2343fbcdab587f1a70e763b894133
branch: master
revision: b2731c98bfef0958fecb440c8648b7755a670895
branch: develop
specs:
ncbo_annotator (0.0.1)
goo
@@ -27,8 +27,8 @@ GIT

GIT
remote: https://github.com/ncbo/ncbo_cron.git
revision: 25d54ae938e63e9d1a6f4b8eb697e0ec2ff1ef87
branch: master
revision: 4255106846207d79a41716615bc57a379256212b
branch: develop
specs:
ncbo_cron (0.0.1)
dante
@@ -45,8 +45,8 @@ GIT

GIT
remote: https://github.com/ncbo/ncbo_ontology_recommender.git
revision: 9dbd4f179e42c52095129d353a5ac584e9bd47f3
branch: master
revision: 084cfc74a78b1c6334f3b74e228ddbf80d36e30a
branch: develop
specs:
ncbo_ontology_recommender (0.0.1)
goo
@@ -56,8 +56,8 @@ GIT

GIT
remote: https://github.com/ncbo/ontologies_linked_data.git
revision: 9ab4be437ed84f5a480e7f0d8799824fcea310ae
branch: master
revision: a65341b714f2734c6ad5fd1999c9e1bf03a17585
branch: develop
specs:
ontologies_linked_data (0.0.1)
activesupport
@@ -76,8 +76,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)
@@ -456,4 +456,4 @@ DEPENDENCIES
webrick

BUNDLED WITH
2.5.7
2.5.20
39 changes: 26 additions & 13 deletions test/controllers/test_classes_controller.rb
Original file line number Diff line number Diff line change
@@ -82,7 +82,6 @@ def test_notation_lookup
assert response["@id"] == "http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Ontology_Development_and_Management"
end


def test_all_class_pages
ont = Ontology.find("TEST-ONT-0").include(:acronym).first

@@ -99,7 +98,7 @@ def test_all_class_pages
assert last_response.ok?
page_response = MultiJson.load(last_response.body)
page_response["collection"].each do |item|
assert_instance_of String, item["prefLabel"]
assert_instance_of String, item["prefLabel"], item["@id"]
assert_instance_of String, item["@id"]
assert_instance_of Hash, item["@context"]
assert_instance_of Hash, item["links"]
@@ -131,6 +130,7 @@ def test_single_cls_all
ont = Ontology.find("TEST-ONT-0").include(:acronym).first
clss_ids = [ 'http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_Interaction',
"http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Electron_Microscope" ]

clss_ids.each do |cls_id|
escaped_cls= CGI.escape(cls_id)
call = "/ontologies/#{ont.acronym}/classes/#{escaped_cls}?include=all"
@@ -149,6 +149,7 @@ def test_single_cls_properties
ont = Ontology.find("TEST-ONT-0").include(:acronym).first
clss_ids = [ 'http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_Interaction',
"http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Electron_Microscope" ]

clss_ids.each do |cls_id|
escaped_cls= CGI.escape(cls_id)
call = "/ontologies/#{ont.acronym}/classes/#{escaped_cls}?include=properties"
@@ -163,7 +164,6 @@ def test_single_cls_properties

def test_single_cls
ont = Ontology.find("TEST-ONT-0").include(:acronym).first

clss_ids = [ 'http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_Interaction',
"http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Electron_Microscope" ]

@@ -208,7 +208,7 @@ def test_roots_for_cls
roots = MultiJson.load(last_response.body)
assert_equal 9, roots.length
roots.each do |r|
assert_instance_of String, r["prefLabel"]
assert_instance_of String, r["prefLabel"], r["@id"]
assert_instance_of String, r["@id"]
assert r.include?"hasChildren"
#By definition roots have no parents
@@ -221,7 +221,6 @@ def test_roots_for_cls
end

def test_classes_for_not_parsed_ontology

ont = Ontology.find("TEST-ONT-0").include(:acronym).first

#first submission was not parsed
@@ -232,7 +231,6 @@ def test_classes_for_not_parsed_ontology
end

def test_tree

ont = Ontology.find("TEST-ONT-0").include(:acronym).first

clss_ids = [ 'http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_Interaction',
@@ -251,7 +249,6 @@ def test_tree
end

def test_path_to_root_for_cls

ont = Ontology.find("TEST-ONT-0").include(:acronym).first
clss_ids = [ 'http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_Interaction',
"http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Electron_Microscope" ]
@@ -264,7 +261,6 @@ def test_path_to_root_for_cls
end

def test_ancestors_for_cls

ont = Ontology.find("TEST-ONT-0").include(:acronym).first
ancestors_data = {}
ancestors_data['http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_Interaction'] =[
@@ -454,7 +450,6 @@ def test_calls_not_found
end

def test_children_for_cls_round_trip

clss_ids = [ 'http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Molecular_and_Cellular_Data',
"http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Microscope" ]

@@ -511,7 +506,7 @@ def test_class_page_with_metric_count
assert last_response.ok?
page_response = MultiJson.load(last_response.body)
page_response["collection"].each do |item|
assert_instance_of String, item["prefLabel"]
assert_instance_of String, item["prefLabel"], item["@id"]
assert_instance_of String, item["@id"]
assert_instance_of Hash, item["@context"]
assert_instance_of Hash, item["links"]
@@ -536,22 +531,40 @@ def test_default_multilingual
sub = ont.latest_submission
sub.bring_remaining

get "/ontologies/#{ont.acronym}/classes/#{CGI.escape('http://bioontology.org/ontologies/Activity.owl#Biospecimen_Management')}"
# rdfs:label is NOT present and the prefLabel is NOT defined for the ontology or portal language
sub.naturalLanguage = ['es']
sub.save
get "/ontologies/#{ont.acronym}/classes/#{CGI.escape('http://bioontology.org/ontologies/Activity.owl#Community_Engagement')}"
assert last_response.ok?
page_response = MultiJson.load(last_response.body)
# does not contain a value in english show the generated one
assert_equal 'Community_Engagement', page_response["prefLabel"]

# rdfs:label is present but NOT for either the ontology or portal language
get "/ontologies/#{ont.acronym}/classes/#{CGI.escape('http://bioontology.org/ontologies/Activity.owl#Biospecimen_Management')}"
assert last_response.ok?
page_response = MultiJson.load(last_response.body)
# does not contain a value in english show the generated one
assert_equal 'Biospecimen_Management', page_response["prefLabel"]

# prefLabel NOT present, rdfs:label is present but NOT for either the ontology or portal language
get "/ontologies/#{ont.acronym}/classes/#{CGI.escape('http://bioontology.org/ontologies/Activity.owl#Gene_Therapy')}"
assert last_response.ok?
page_response = MultiJson.load(last_response.body)
# does not contain a value in english show the generated one
assert_equal 'Gene_Therapy', page_response["prefLabel"]

# prefLabel is present in the ontology language
sub.naturalLanguage = ['fr']
sub.save

get "/ontologies/#{ont.acronym}/classes/#{CGI.escape('http://bioontology.org/ontologies/Activity.owl#Biospecimen_Management')}"
assert last_response.ok?
page_response = MultiJson.load(last_response.body)

# show french value as specified in submission naturalLanguage
assert_equal 'Biospecimen Management', page_response["prefLabel"]

sub.naturalLanguage = []
sub.save
end

end