Skip to content

Commit

Permalink
Merge branch 'master' into ecoportal
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Nov 5, 2024
2 parents 1570cbc + 37a9573 commit aa6ce04
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
7 changes: 3 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 Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/lifewatch-eric/ontologies_linked_data.git
revision: 32ee5870e220b62678b8dd81e6f29087678b9446
revision: 89bc24128720537282fcae975f90e237812d11d6
branch: master
specs:
ontologies_linked_data (0.0.1)
Expand Down Expand Up @@ -131,7 +131,7 @@ GEM
googleapis-common-protos-types (>= 1.11.0, < 2.a)
googleauth (~> 1.9)
grpc (~> 1.59)
google-analytics-data (0.6.1)
google-analytics-data (0.6.0)
google-analytics-data-v1beta (>= 0.11, < 2.a)
google-cloud-core (~> 1.6)
google-analytics-data-v1beta (0.13.1)
Expand All @@ -153,8 +153,8 @@ GEM
google-cloud-env (2.1.1)
faraday (>= 1.0, < 3.a)
google-cloud-errors (1.4.0)
google-protobuf (3.25.5-x86_64-darwin)
google-protobuf (3.25.5-x86_64-linux)
google-protobuf (3.25.3-x86_64-darwin)
google-protobuf (3.25.3-x86_64-linux)
googleapis-common-protos (1.6.0)
google-protobuf (>= 3.18, < 5.a)
googleapis-common-protos-types (~> 1.7)
Expand All @@ -181,7 +181,7 @@ GEM
httpclient (2.8.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.7.4)
json (2.7.6)
json-canonicalization (0.4.0)
json-ld (3.2.5)
htmlentities (~> 4.3)
Expand Down Expand Up @@ -220,7 +220,7 @@ GEM
net-ssh (>= 5.0.0, < 8.0.0)
net-ssh (7.3.0)
netrc (0.11.0)
oj (3.16.6)
oj (3.16.7)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omni_logger (0.1.4)
Expand Down Expand Up @@ -326,17 +326,17 @@ DEPENDENCIES
cube-ruby
ed25519 (>= 1.2, < 2.0)
email_spec
ffi
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 All @@ -353,4 +353,4 @@ DEPENDENCIES
test-unit-minitest

BUNDLED WITH
2.4.22
2.3.23
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 aa6ce04

Please sign in to comment.