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

Develop to master merge, release v5.31.0 #210

Merged
merged 35 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5391eb6
Merge remote-tracking branch 'upstream/master' into upstream
syphax-bouazzouni May 4, 2024
37f74d3
add the serialize_defaults if attributes to load set to :all and some…
syphax-bouazzouni May 6, 2024
b6134ff
when archiving a submission delete old files and zip master file if big
syphax-bouazzouni May 6, 2024
4304cc4
refactor tests to be faster by doing the indexation step only if nedded
syphax-bouazzouni May 6, 2024
36a5b68
display the language tags when serializing the results to JSON
syphax-bouazzouni May 6, 2024
ccf753f
update the term index step to include all languages
syphax-bouazzouni May 6, 2024
fc48343
add multilingual support unit tests
syphax-bouazzouni May 6, 2024
a192308
Add GitHub and ORCID IDs to the User model
jvendetti May 7, 2024
f6764a8
Merge pull request #199 from ontoportal-lirmm/pr/sync-agroportal-ncbo
alexskr May 8, 2024
ea7b31b
reset branch specifier to develop
alexskr May 8, 2024
56fb68f
Merge pull request #201 from ncbo/feature/add-user-attributes/160
jvendetti May 8, 2024
0227d37
Add GitHub and ORCID IDs to the User model
jvendetti May 7, 2024
7431a7b
fix serialization of properties using lambda as a property attribute
syphax-bouazzouni May 10, 2024
b208745
do not send email notification when submissions are archived
alexskr May 9, 2024
29e3028
sort labels prior to selecting one from multiple options
alexskr May 13, 2024
341548e
Merge remote-tracking branch 'upstream/develop' into pr/sync-agroport…
syphax-bouazzouni May 18, 2024
6cc6cce
use goo ncbo latest version
syphax-bouazzouni May 18, 2024
066c6c5
fix context language to not by empty if submission languages values a…
syphax-bouazzouni May 18, 2024
755c8b4
request all the lanugage when generating missing labels to not genera…
syphax-bouazzouni May 18, 2024
0b0bd22
update the rdf generator code to re-apply the usage of owlapi_parser …
syphax-bouazzouni May 18, 2024
2a849c7
Merge branch 'fix/lambda-serialization' into pr/sync-agroportal-ncbo
syphax-bouazzouni May 18, 2024
c83b0d5
add context parents generation tests
syphax-bouazzouni May 18, 2024
ffc648f
complete metadata extraction test
syphax-bouazzouni May 18, 2024
33af750
Merge branch 'feature/multilingual-support-add-search-and-languages-s…
syphax-bouazzouni May 18, 2024
3b9d3f1
add test for the not sending submission process when archived
syphax-bouazzouni May 18, 2024
f14a7eb
Merge branch 'pr/sync-agroportal-ncbo' of github.com:ontoportal-lirmm…
syphax-bouazzouni May 18, 2024
a4bfc7f
re-implemented the missing changes removed by the multi-lingual PRs
mdorf May 20, 2024
829e0ea
re-implemented the missing changes removed by the multi-lingual PRs
mdorf May 20, 2024
6dc0ab9
fixed failing unit tests
mdorf May 21, 2024
112e39b
Merge pull request #204 from ontoportal-lirmm/pr/sync-agroportal-ncbo
alexskr May 21, 2024
47fa900
Merge branch 'feature/multilingual-support-add-search-and-languages-s…
alexskr May 21, 2024
c2beff6
Merge pull request #205 from ncbo/develop
alexskr May 21, 2024
b9a6a9d
Merge pull request #206 from ncbo/feature/multilingual-support-add-se…
alexskr May 21, 2024
0480874
Gemfile.lock update
mdorf May 21, 2024
013a322
add :ontologies to the serialize_default of the group model
alexskr May 22, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.bundle/
*.swp
*.gemtags
.bundle
Expand Down
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ gem 'rest-client'
gem 'rsolr'
gem 'rubyzip', '~> 1.0'
gem 'thin'
gem 'request_store'


# Testing
group :test do
Expand All @@ -31,7 +33,6 @@ end
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'
29 changes: 17 additions & 12 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: ef2d816df2d263c905bd034efd449a964fa4890f
branch: master
revision: 70007faf43d0d96292809f89f15a27a757ccaa25
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 All @@ -39,7 +39,7 @@ GEM
ast (2.4.2)
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)
Expand Down Expand Up @@ -84,7 +84,7 @@ 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)
minitest-reporters (0.14.24)
Expand All @@ -94,7 +94,7 @@ GEM
powerbar
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)
Expand All @@ -120,7 +120,7 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.5)
racc (1.7.3)
racc (1.8.0)
rack (2.2.9)
rack-test (0.8.3)
rack (>= 1.0, < 3)
Expand All @@ -132,19 +132,20 @@ GEM
redis-client (>= 0.22.0)
redis-client (0.22.1)
connection_pool
regexp_parser (2.9.0)
regexp_parser (2.9.2)
request_store (1.7.0)
rack (>= 1.4)
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.6)
rexml (3.2.8)
strscan (>= 3.0.9)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
rubocop (1.63.4)
rubocop (1.63.5)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -169,6 +170,7 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
systemu (2.6.5)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
Expand All @@ -182,8 +184,10 @@ GEM
macaddr (~> 1.0)

PLATFORMS
arm64-darwin-22
aarch64-linux
x86_64-darwin-21
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
activesupport (~> 4)
Expand All @@ -204,6 +208,7 @@ DEPENDENCIES
rack
rack-test (~> 0.6)
rake (~> 10.0)
request_store
rest-client
rsolr
rubocop
Expand Down
1,010 changes: 520 additions & 490 deletions config/solr/term_search/schema.xml

Large diffs are not rendered by default.

60 changes: 41 additions & 19 deletions lib/ontologies_linked_data/config/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,13 @@ def config(&block)
yield @settings, overide_connect_goo if block_given?

# Check to make sure url prefix has trailing slash
@settings.rest_url_prefix = @settings.rest_url_prefix + '/' unless @settings.rest_url_prefix[-1].eql?('/')
@settings.rest_url_prefix = "#{@settings.rest_url_prefix}/" unless @settings.rest_url_prefix[-1].eql?('/')

puts "(LD) >> Using rdf store #{@settings.goo_host}:#{@settings.goo_port}#{@settings.goo_path_query}"
puts "(LD) >> Using term search server at #{@settings.search_server_url}"
puts "(LD) >> Using property search server at #{@settings.property_search_server_url}"
puts '(LD) >> Using HTTP Redis instance at '+
"#{@settings.http_redis_host}:#{@settings.http_redis_port}"
puts '(LD) >> Using Goo Redis instance at '+
"#{@settings.goo_redis_host}:#{@settings.goo_redis_port}"
puts "(LD) >> Using HTTP Redis instance at #{@settings.http_redis_host}:#{@settings.http_redis_port}"
puts "(LD) >> Using Goo Redis instance at #{@settings.goo_redis_host}:#{@settings.goo_redis_port}"

connect_goo unless overide_connect_goo
end
Expand Down Expand Up @@ -132,15 +130,14 @@ def connect_goo
port: @settings.goo_redis_port)

if @settings.enable_monitoring
puts "(LD) >> Enable SPARQL monitoring with cube #{@settings.cube_host}:"+
"#{@settings.cube_port}"
puts "(LD) >> Enable SPARQL monitoring with cube #{@settings.cube_host}:#{@settings.cube_port}"
conf.enable_cube do |opts|
opts[:host] = @settings.cube_host
opts[:port] = @settings.cube_port
end
end
end
rescue Exception => e
rescue StandardError => e
abort("EXITING: Cannot connect to triplestore and/or search server:\n #{e}\n#{e.backtrace.join("\n")}")
end
end
Expand All @@ -153,23 +150,48 @@ def goo_namespaces
conf.add_namespace(:omv, RDF::Vocabulary.new("http://omv.ontoware.org/2005/05/ontology#"))
conf.add_namespace(:skos, RDF::Vocabulary.new("http://www.w3.org/2004/02/skos/core#"))
conf.add_namespace(:owl, RDF::Vocabulary.new("http://www.w3.org/2002/07/owl#"))
conf.add_namespace(:rdf, RDF::Vocabulary.new("http://www.w3.org/1999/02/22-rdf-syntax-ns#"))
conf.add_namespace(:rdfs, RDF::Vocabulary.new("http://www.w3.org/2000/01/rdf-schema#"))
conf.add_namespace(:metadata,
RDF::Vocabulary.new("http://data.bioontology.org/metadata/"),
default = true)
conf.add_namespace(:metadata_def,
RDF::Vocabulary.new("http://data.bioontology.org/metadata/def/"))
conf.add_namespace(:metadata, RDF::Vocabulary.new("http://data.bioontology.org/metadata/"), default = true)
conf.add_namespace(:metadata_def, RDF::Vocabulary.new("http://data.bioontology.org/metadata/def/"))
conf.add_namespace(:dc, RDF::Vocabulary.new("http://purl.org/dc/elements/1.1/"))
conf.add_namespace(:xsd, RDF::Vocabulary.new("http://www.w3.org/2001/XMLSchema#"))
conf.add_namespace(:oboinowl_gen,
RDF::Vocabulary.new("http://www.geneontology.org/formats/oboInOwl#"))
conf.add_namespace(:oboinowl_gen, RDF::Vocabulary.new("http://www.geneontology.org/formats/oboInOwl#"))
conf.add_namespace(:obo_purl, RDF::Vocabulary.new("http://purl.obolibrary.org/obo/"))
conf.add_namespace(:umls,
RDF::Vocabulary.new("http://bioportal.bioontology.org/ontologies/umls/"))
conf.id_prefix = "http://data.bioontology.org/"
conf.add_namespace(:umls, RDF::Vocabulary.new("http://bioportal.bioontology.org/ontologies/umls/"))
conf.add_namespace(:door, RDF::Vocabulary.new("http://kannel.open.ac.uk/ontology#"))
conf.add_namespace(:dct, RDF::Vocabulary.new("http://purl.org/dc/terms/"))

conf.add_namespace(:void, RDF::Vocabulary.new("http://rdfs.org/ns/void#"))
conf.add_namespace(:foaf, RDF::Vocabulary.new("http://xmlns.com/foaf/0.1/"))
conf.add_namespace(:vann, RDF::Vocabulary.new("http://purl.org/vocab/vann/"))
conf.add_namespace(:adms, RDF::Vocabulary.new("http://www.w3.org/ns/adms#"))
conf.add_namespace(:voaf, RDF::Vocabulary.new("http://purl.org/vocommons/voaf#"))
conf.add_namespace(:dcat, RDF::Vocabulary.new("http://www.w3.org/ns/dcat#"))
conf.add_namespace(:mod, RDF::Vocabulary.new("http://www.isibang.ac.in/ns/mod#"))
conf.add_namespace(:prov, RDF::Vocabulary.new("http://www.w3.org/ns/prov#"))
conf.add_namespace(:cc, RDF::Vocabulary.new("http://creativecommons.org/ns#"))
conf.add_namespace(:schema, RDF::Vocabulary.new("http://schema.org/"))
conf.add_namespace(:doap, RDF::Vocabulary.new("http://usefulinc.com/ns/doap#"))
conf.add_namespace(:bibo, RDF::Vocabulary.new("http://purl.org/ontology/bibo/"))
conf.add_namespace(:wdrs, RDF::Vocabulary.new("http://www.w3.org/2007/05/powder-s#"))
conf.add_namespace(:cito, RDF::Vocabulary.new("http://purl.org/spar/cito/"))
conf.add_namespace(:pav, RDF::Vocabulary.new("http://purl.org/pav/"))
conf.add_namespace(:oboInOwl, RDF::Vocabulary.new("http://www.geneontology.org/formats/oboInOwl#"))
conf.add_namespace(:idot, RDF::Vocabulary.new("http://identifiers.org/idot/"))
conf.add_namespace(:sd, RDF::Vocabulary.new("http://www.w3.org/ns/sparql-service-description#"))
conf.add_namespace(:org, RDF::Vocabulary.new("http://www.w3.org/ns/org#"))
conf.add_namespace(:cclicense, RDF::Vocabulary.new("http://creativecommons.org/licenses/"))
conf.add_namespace(:nkos, RDF::Vocabulary.new("http://w3id.org/nkos#"))
conf.add_namespace(:skosxl, RDF::Vocabulary.new("http://www.w3.org/2008/05/skos-xl#"))
conf.add_namespace(:dcterms, RDF::Vocabulary.new("http://purl.org/dc/terms/"))
conf.add_namespace(:uneskos, RDF::Vocabulary.new("http://purl.org/umu/uneskos#"))


conf.id_prefix = 'http://data.bioontology.org/'
conf.pluralize_models(true)
end
end
self.goo_namespaces
goo_namespaces

end
4 changes: 2 additions & 2 deletions lib/ontologies_linked_data/diff/bubastis_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class BubastisDiffCommand < DiffTool
# Loading one file locally and one from the web and outputting results to plain text:
# java -jar bubastis_1_2.jar -ontology1 "H://disease_ontology_version_1.owl" -ontology2 "http://www.disease.org/diseaseontology_latest.owl" -output "C://my_diff.txt"

def initialize(old_file_path, new_file_path)
def initialize(old_file_path, new_file_path, output_repo)
@bubastis_jar_path = LinkedData.bindir + "/bubastis.jar"
@input_fileOld = old_file_path
@input_fileNew = new_file_path
@output_repo = File.expand_path(@input_fileNew).gsub(File.basename(@input_fileNew),'')
@output_repo = output_repo
@file_diff_path = nil
@java_heap_size = LinkedData.settings.java_max_heap_size
end
Expand Down
22 changes: 11 additions & 11 deletions lib/ontologies_linked_data/models/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
raise ArgumentError, "`attributes` should be an array" unless attributes.is_a?(Array)

# Get attributes, either provided, all, or default
if !attributes.empty?
if attributes.first == :all
default_attrs = self.attributes
else
default_attrs = attributes
end
elsif self.hypermedia_settings[:serialize_default].empty?
default_attrs = self.attributes
else
default_attrs = self.hypermedia_settings[:serialize_default].dup
end
default_attrs = if !attributes.empty?
if attributes.first == :all
(self.attributes + self.hypermedia_settings[:serialize_default]).uniq

Check warning on line 47 in lib/ontologies_linked_data/models/base.rb

View check run for this annotation

Codecov / codecov/patch

lib/ontologies_linked_data/models/base.rb#L46-L47

Added lines #L46 - L47 were not covered by tests
else
attributes

Check warning on line 49 in lib/ontologies_linked_data/models/base.rb

View check run for this annotation

Codecov / codecov/patch

lib/ontologies_linked_data/models/base.rb#L49

Added line #L49 was not covered by tests
end
elsif self.hypermedia_settings[:serialize_default].empty?
self.attributes
else
self.hypermedia_settings[:serialize_default].dup
end

embed_attrs = {}
extra_attrs = []
Expand Down
Loading