uc3-dmp-id 0.1.34 → 0.1.35
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/comparator.rb +2 -4
- data/lib/uc3-dmp-id/finder.rb +1 -0
- data/lib/uc3-dmp-id/updater.rb +1 -0
- 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: 5828afe1afaf7214cdea0e02ed8b834587068be56f1f1a060050c7768c4d19a8
|
|
4
|
+
data.tar.gz: 10c0bb60320d71414959a9623e435d71ab52b74b758a38fc23cb7fad68f5bd3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4195fb80461a995b42d10e41ff6828aa79692d3cf92c7ce942f71f830c74d2544806a4c0ada2924d0aa7bf8c310c8b8f03a63eeacbd8754d4262aeb343f7dba
|
|
7
|
+
data.tar.gz: a1108d2311d8c8331b2b176278ae10d9283bdcbb0f4568c0b7d488e22268293b0356c36a51937857f709c64be89edcf2c8a8f98d74d98a66eda3c08f9ef0dea2
|
|
@@ -56,9 +56,7 @@ module Uc3DmpId
|
|
|
56
56
|
scoring = []
|
|
57
57
|
return scoring unless hash.is_a?(Hash) && !hash['title'].nil?
|
|
58
58
|
|
|
59
|
-
@dmps.each do |
|
|
60
|
-
dmp = entry.fetch('_source', {})
|
|
61
|
-
|
|
59
|
+
@dmps.each do |dmp|
|
|
62
60
|
# Compare the grant ids. If we have a match return the response immediately since that is
|
|
63
61
|
# a very positive match!
|
|
64
62
|
response = { confidence: 'None', score: 0, notes: [] }
|
|
@@ -79,7 +77,7 @@ module Uc3DmpId
|
|
|
79
77
|
next if response[:score] <= 2
|
|
80
78
|
|
|
81
79
|
# Set the confidence level based on the score
|
|
82
|
-
response[:dmp_id] =
|
|
80
|
+
response[:dmp_id] = "DMP##{dmp['dmp_id']}"
|
|
83
81
|
response[:confidence] = if response[:score] > 10
|
|
84
82
|
'High'
|
|
85
83
|
else
|
data/lib/uc3-dmp-id/finder.rb
CHANGED
|
@@ -246,6 +246,7 @@ module Uc3DmpId
|
|
|
246
246
|
|
|
247
247
|
# Change the name of the `logic` array to `notes`
|
|
248
248
|
rec['notes'] = rec['logic']
|
|
249
|
+
rec['score'] = rec['score'].to_s
|
|
249
250
|
# For `work-type` that equal `outputmanagementplan`, change it to `output_management_plan`
|
|
250
251
|
rec['work_type'] = 'output_management_plan' if rec['work_type'] == 'outputmanagementplan'
|
|
251
252
|
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
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.35
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Riley
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|