uc3-dmp-id 0.1.27 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17f46e6944531f941dd897052fcf78719c8dd5596ec829614f31fb80a5daba91
4
- data.tar.gz: b5d84feae8896a1ba0dffbefb23d213a315828330510368099a329c787b3abd8
3
+ metadata.gz: 898c616289067a9107a371e4d7450bb0c573c6c42a0f1d92c328bd7a3897d2ce
4
+ data.tar.gz: d4e8eab05067b151e13e22dc1820cd714bf94c2ee659c094894c4161671e2160
5
5
  SHA512:
6
- metadata.gz: c0ce4ad0d1a07e58cd13d25c8b8f68f7d7f71094fd73a89651c099c2d8ae2e49a71aad3556da1cbd215dcfd6d450d3dab2d6505363daea9c17565c61307b8a36
7
- data.tar.gz: 3d14bd02b6ca70548d7e0f5567df945c39693184fb5633f4191b54c84dd406de940ad2cbd1b9774aaf6e73d595d70b8f9e60dcd6c0ccce4524539143a01da729
6
+ metadata.gz: 378ddf3989c741fef2bfebe6229b9b1c0d1cec2d3d4fc8a1a93ecc1e4a323a2ce272d57818c8c20eb43d6c3f0956c8f316dedbd882c7a28234e3069e16750ace
7
+ data.tar.gz: 4bafcc99e72fcf8844c176171705197380ab43409f4998c240dbff0225b528730d4e11ed5356b592876847d2e0ad5524f7af5d1dc39817fcb4a68f6d8f0cc799
@@ -61,7 +61,7 @@ module Uc3DmpId
61
61
 
62
62
  # Compare the grant ids. If we have a match return the response immediately since that is
63
63
  # a very positive match!
64
- response = { dmp_id: dmp['_id'], confidence: 'None', score: 0, notes: [] }
64
+ response = { confidence: 'None', score: 0, notes: [] }
65
65
  response = _grants_match?(array: hash.fetch('grant_ids', []), dmp:, response:)
66
66
  scoring << respoonse if response[:confidence] != 'None'
67
67
  next if response[:confidence] != 'None'
@@ -79,11 +79,13 @@ module Uc3DmpId
79
79
  next if response[:score] <= 2
80
80
 
81
81
  # Set the confidence level based on the score
82
+ response[:dmp_id] = dmp['_id']
82
83
  response[:confidence] = if response[:score] > 10
83
84
  'High'
84
85
  else
85
86
  (response[:score] > 5 ? 'Medium' : 'Low')
86
87
  end
88
+ logger&.debug(message: "Found a match!", details: { dmp: dmp, analysis: response })
87
89
  scoring << response
88
90
  end
89
91
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.27'
4
+ VERSION = '0.1.29'
5
5
  end
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.27
4
+ version: 0.1.29
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-03-10 00:00:00.000000000 Z
11
+ date: 2024-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json