Skip to content

Commit

Permalink
Gemfile.lock update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskr committed Sep 23, 2024
2 parents 427e9dc + c30887e commit 8f63d6b
Show file tree
Hide file tree
Showing 48 changed files with 384,266 additions and 1,916 deletions.
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
3 changes: 2 additions & 1 deletion 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: 'develop'
gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop'
10 changes: 8 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ GEM
faraday-net_http (3.3.0)
net-http
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
hashie (5.0.0)
htmlentities (4.3.4)
http-accept (1.7.0)
Expand Down Expand Up @@ -190,7 +192,10 @@ GEM

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

DEPENDENCIES
activesupport (~> 4)
Expand All @@ -211,6 +216,7 @@ DEPENDENCIES
rack
rack-test (~> 0.6)
rake (~> 10.0)
request_store
rest-client
rsolr
rubocop
Expand All @@ -221,4 +227,4 @@ DEPENDENCIES
thin

BUNDLED WITH
2.5.19
2.4.22
1,010 changes: 520 additions & 490 deletions config/solr/term_search/schema.xml

Large diffs are not rendered by default.

37 changes: 30 additions & 7 deletions lib/ontologies_linked_data.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require "goo"
require 'goo'

# Make sure we're in the load path
lib_dir = File.dirname(__FILE__)+"/../lib"
lib_dir = "#{File.dirname(__FILE__)}/../lib"
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?(lib_dir)

# Setup Goo (repo connection and namespaces)
require "ontologies_linked_data/config/config"
require 'ontologies_linked_data/config/config'

# Include other dependent code
require "ontologies_linked_data/security/authorization"
Expand All @@ -31,27 +31,50 @@
require "ontologies_linked_data/metrics/metrics"

# Require base model
require "ontologies_linked_data/models/base"
require 'ontologies_linked_data/models/base'

# Require all models
# Require all models and services
project_root = File.dirname(File.absolute_path(__FILE__))

require 'ontologies_linked_data/services/submission_process/submission_process'
models = Dir.glob("#{project_root}/ontologies_linked_data/concerns/**/*.rb").sort
models.each do |m|
require m
end



# We need to require deterministic - that is why we have the sort.

models = Dir.glob("#{project_root}/ontologies_linked_data/services/**/*.rb").sort
models.each do |m|
require m
end

# We need to require deterministic - that is why we have the sort.
models = Dir.glob("#{project_root}/ontologies_linked_data/models/concerns//**/*.rb").sort
models.each do |m|
require m
end

models = Dir.glob("#{project_root}/ontologies_linked_data/concerns/**/*.rb").sort
models.each do |m|
require m
end
# We need to require deterministic - that is why we have the sort.
models = Dir.glob(project_root + '/ontologies_linked_data/models/**/*.rb').sort
models = Dir.glob("#{project_root}/ontologies_linked_data/models/**/*.rb").sort
models.each do |m|
require m
end



module LinkedData
def rootdir
File.dirname(File.absolute_path(__FILE__))
end

def bindir
File.expand_path(rootdir + '/../bin')
File.expand_path("#{rootdir}/../bin")
end
end
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
41 changes: 22 additions & 19 deletions lib/ontologies_linked_data/diff/bubastis_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class InputFileNotFoundError < Diff::DiffException
class DiffFileNotGeneratedException < Diff::DiffException
end

class BubastisDiffCommand
class BubastisDiffCommand < DiffTool

# Bubastis version 1.2
# 18th December 2014
Expand All @@ -37,15 +37,33 @@ class BubastisDiffCommand
# 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(input_fileOld, input_fileNew, output_repo)
def initialize(old_file_path, new_file_path, output_repo)
@bubastis_jar_path = LinkedData.bindir + "/bubastis.jar"
@input_fileOld = input_fileOld
@input_fileNew = input_fileNew
@input_fileOld = old_file_path
@input_fileNew = new_file_path
@output_repo = output_repo
@file_diff_path = nil
@java_heap_size = LinkedData.settings.java_max_heap_size
end


def file_diff_path
@file_diff_path
end

def diff
setup_environment
call_bubastis_java_cmd
if @file_diff_path.nil?
raise DiffFileNotGeneratedException, "Diff file nil"
elsif not File.exist?(@file_diff_path)
raise DiffFileNotGeneratedException, "Diff file not found in #{@file_diff_path}"
end
return @file_diff_path
end

private

def setup_environment
if @input_fileOld.nil? or (not File.exist?(@input_fileOld))
raise InputFileNotFoundError, "#{@input_fileOld} not found."
Expand Down Expand Up @@ -105,21 +123,6 @@ def call_bubastis_java_cmd
end
return @file_diff_path
end

def file_diff_path
@file_diff_path
end

def diff
setup_environment
call_bubastis_java_cmd
if @file_diff_path.nil?
raise DiffFileNotGeneratedException, "Diff file nil"
elsif not File.exist?(@file_diff_path)
raise DiffFileNotGeneratedException, "Diff file not found in #{@file_diff_path}"
end
return @file_diff_path
end
end
end
end
14 changes: 13 additions & 1 deletion lib/ontologies_linked_data/diff/diff.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
module LinkedData
module Diff
class <<self
class << self
attr_accessor :logger
end

class DiffTool
def initialize(old_file_path, new_file_path)
@old_file_path = old_file_path
@new_file_path = new_file_path
end

# @return String generated path file
def diff
raise NotImplementedError
end
end
class DiffException < Exception
end
class MkdirException < DiffException
Expand Down
Loading

0 comments on commit 8f63d6b

Please sign in to comment.