uc3-dmp-id 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/augmenter.rb +12 -11
- data/lib/uc3-dmp-id/comparator.rb +1 -1
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ae3b97965d06d3157328d0c23441eb32b63013b52d78f631cb8bd5a9459eebd
|
|
4
|
+
data.tar.gz: 4d731209d7649e2ed868d00cb7f69b061545edd75f36b73e7e0356aadae34a41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 236e174f59feb0b53bf812c7baf81eaa505e041e01fc9e5b5a689f402b746c9b53652aff506742a1210b9265e5341119d1e52d816e2fce99fac58e59132cf427
|
|
7
|
+
data.tar.gz: 3daabef6a600a9b490100b6a09db742c7e44e28368a9e936914371b34d25c8f2df996fbe3a19577cb64973c8f5a38a4c2d784563ceed4acd147779785277ee4b
|
data/lib/uc3-dmp-id/augmenter.rb
CHANGED
|
@@ -36,17 +36,18 @@ module Uc3DmpId
|
|
|
36
36
|
def add_modifications(works:)
|
|
37
37
|
mod_hash = _generate_mod_header
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
%w[publications datasets softwares].each do |work_type|
|
|
40
|
+
works.fetch(work_type, []).each do |work|
|
|
41
|
+
next if @known_works.include?(work['id'])
|
|
42
|
+
|
|
43
|
+
work_hash = _work_to_mod_entry(type: work_type[0..work_type.length - 2], work:)
|
|
44
|
+
mod_hash.fetch('dmproadmap_related_identifiers', []) << work_hash unless work_hash.nil?
|
|
45
|
+
fundings = publication.fetch('fundingReferences', [])
|
|
46
|
+
next unless fundings.any?
|
|
47
|
+
|
|
48
|
+
award_hash = fundings.map { |funding| _funding_to_mod_entry(work:, funding:) }
|
|
49
|
+
mod_hash.fetch('funding', []) << award_hash unless award_hash.nil?
|
|
50
|
+
end
|
|
50
51
|
end
|
|
51
52
|
return 0 unless mod_hash['dmproadmap_related_identifiers'].any? || mod_hash.fetch('funding', []).any?
|
|
52
53
|
|
|
@@ -143,7 +143,7 @@ module Uc3DmpId
|
|
|
143
143
|
@details_hash[:identifiers] << grant&.split('/')&.last&.downcase&.strip
|
|
144
144
|
@details_hash[:identifiers] << opportunity&.downcase&.strip
|
|
145
145
|
|
|
146
|
-
@details_hash[:funder_names] << funding['name']&.downcase&.strip
|
|
146
|
+
@details_hash[:funder_names] << funding['name']&.downcase&.split(' (').first&.strip
|
|
147
147
|
@details_hash[:funder_ids] << fundref
|
|
148
148
|
@details_hash[:opportunity_ids] << opportunity&.downcase&.strip
|
|
149
149
|
@details_hash[:grant_ids] << [grant&.downcase&.strip, grant&.split('/')&.last&.downcase&.strip]
|
data/lib/uc3-dmp-id/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: uc3-dmp-id
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Riley
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|