Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni authored Oct 31, 2024
2 parents f9bbf87 + bed0ff0 commit c15735e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ source 'https://rubygems.org'

gemspec

gem 'ffi'

# This is needed temporarily to pull the Google Universal Analytics (UA)
# data and store it in a file. See (bin/import_google_ua_analytics_data)
# The ability to pull this data from Google will cease on July 1, 2024
gem "google-apis-analytics_v3"

gem 'google-analytics-data'
gem 'google-analytics-data', '0.6.0'
gem 'google-protobuf', '3.25.3'
gem 'mail', '2.6.6'
gem 'multi_json'
gem 'oj', '~> 3.0'
gem 'oj'
gem 'parseconfig'
gem 'pony'
gem 'pry'
Expand All @@ -23,6 +22,7 @@ gem 'sys-proctable'
gem 'request_store'
gem 'parallel'
gem 'json-ld'
gem 'ffi', '~> 1.16.3'

# Monitoring
gem 'cube-ruby', require: 'cube'
Expand Down
7 changes: 4 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,18 @@ DEPENDENCIES
binding_of_caller (~> 1.0)
cube-ruby
email_spec
ffi
ffi (~> 1.16.3)
goo!
google-analytics-data
google-analytics-data (= 0.6.0)
google-apis-analytics_v3
google-protobuf (= 3.25.3)
json-ld
mail (= 2.6.6)
minitest (< 5.0)
multi_json
ncbo_annotator!
ncbo_cron!
oj (~> 3.0)
oj
ontologies_linked_data!
parallel
parseconfig
Expand Down
8 changes: 6 additions & 2 deletions bin/ncbo_ontology_import
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,16 @@ def upload_submission(sub_info, ontology)
attribute_settings = new_submission.class.attribute_settings(key.to_sym)

if attribute_settings
if attribute_settings[:enforce]&.include?(:date_time)
value = DateTime.parse(value)
if attribute_settings[:enforce]&.include?(:date_time) && attribute_settings[:enforce]&.include?(:list)
value = value.map { |v| DateTime.parse(v) rescue DateTime.now }.uniq
elsif attribute_settings[:enforce]&.include?(:date_time)
value = DateTime.parse(value) rescue DateTime.now
elsif attribute_settings[:enforce]&.include?(:uri) && attribute_settings[:enforce]&.include?(:list)
value = value.map { |v| RDF::IRI.new(v) }
elsif attribute_settings[:enforce]&.include?(:uri)
value = RDF::IRI.new(value)
elsif attribute_settings[:enforce]&.include?(:Agent)
next #TODO implement agent auto-creation
end
end

Expand Down

0 comments on commit c15735e

Please sign in to comment.