toccatore 0.3.9 → 0.4.15
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 +5 -5
- data/Gemfile.lock +76 -54
- data/README.md +1 -1
- data/lib/toccatore/base.rb +15 -4
- data/lib/toccatore/cli.rb +12 -0
- data/lib/toccatore/datacite_related.rb +18 -3
- data/lib/toccatore/orcid_update.rb +6 -2
- data/lib/toccatore/queue.rb +56 -0
- data/lib/toccatore/usage_update.rb +183 -0
- data/lib/toccatore/version.rb +1 -1
- data/lib/toccatore.rb +2 -0
- data/spec/base_spec.rb +4 -4
- data/spec/cli_spec.rb +36 -3
- data/spec/datacite_related_spec.rb +10 -10
- data/spec/factories/default.rb +22 -0
- data/spec/fixtures/event_data_resp_1 +2 -0
- data/spec/fixtures/event_data_resp_2 +4 -0
- data/spec/fixtures/events_empty.json +33 -0
- data/spec/fixtures/usage_event.json +1 -0
- data/spec/fixtures/usage_event_fail.json +17 -0
- data/spec/fixtures/usage_events.json +63 -0
- data/spec/fixtures/usage_update.json +101 -0
- data/spec/fixtures/usage_update_1.json +36738 -0
- data/spec/fixtures/usage_update_2.json +171 -0
- data/spec/fixtures/usage_update_3.json +176 -0
- data/spec/fixtures/usage_update_4.json +101 -0
- data/spec/fixtures/usage_update_nil.json +6 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/get_doi_ra/crossref.yml +21 -45
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/get_doi_ra/datacite.yml +23 -47
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/datacite_related.yml +14 -12
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/datacite_related_no_works.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/orcid_update.yml +14 -12
- data/spec/fixtures/vcr_cassettes/Toccatore_Base/send_notification_to_slack/orcid_update_no_works.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_fail.yml +345 -852
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_query_by_DOI.yml +327 -409
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_query_by_related_identifier.yml +140 -117
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_succeed.yml +1267 -2068
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/datacite_related/should_succeed_with_no_works.yml +31 -25
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_fail.yml +47 -39
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_query_by_DOI.yml +673 -855
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_query_by_ORCID_ID.yml +1885 -2419
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_succeed.yml +1555 -1991
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/orcid_update/should_succeed_with_no_works.yml +31 -27
- data/spec/fixtures/vcr_cassettes/Toccatore_CLI/usage_update/no_reports_in_the_queue/should_succeed_with_no_works.yml +196 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_allow_queries_by_DOI_of_the_Datacite_Metadata_Search_API.yml +16 -12
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_allow_queries_by_related_identifier_of_the_Datacite_Metadata_Search_API.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_report_if_there_are_no_works_returned_by_the_Datacite_Metadata_Search_API.yml +16 -12
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +16 -14
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_total/with_no_works.yml +15 -11
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/get_total/with_works.yml +16 -12
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/parse_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +437 -869
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/push_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +1240 -1662
- data/spec/fixtures/vcr_cassettes/Toccatore_DataciteRelated/push_data/should_work_with_DataCite_Event_Data.yml +4026 -6556
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_allow_queries_by_DOI_of_the_Datacite_Metadata_Search_API.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_allow_queries_by_ORCID_ID_of_the_Datacite_Metadata_Search_API.yml +15 -11
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_report_if_there_are_no_works_returned_by_the_Datacite_Metadata_Search_API.yml +15 -11
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_total/with_no_works.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/get_total/with_works.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/push_data/should_delete_claims.yml +25 -32
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/push_data/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +1347 -1791
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/queue_jobs/should_report_if_there_are_no_works_returned_by_the_Datacite_Metadata_Search_API.yml +14 -10
- data/spec/fixtures/vcr_cassettes/Toccatore_OrcidUpdate/queue_jobs/should_report_if_there_are_works_returned_by_the_Datacite_Metadata_Search_API.yml +29 -25
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_are_messages/should_return_the_data_for_one_message.yml +73 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_data/when_there_is_ONE_message/should_return_the_data_for_one_message.yml +73 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_no_meessage_when_the_queue_is_empty.yml +95 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_message/should_return_one_message_when_there_are_multiple_messages.yml +95 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/get_total/when_is_working_with_AWS.yml +187 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_empty.yml +169 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_fail_if_format_of_the_event_is_wrong.yml +667 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/push_data/should_work_with_a_single_item.yml +169 -0
- data/spec/fixtures/vcr_cassettes/Toccatore_UsageUpdate/queue_url/should_return_always_correct_queue_url.yml +49 -0
- data/spec/orcid_update_spec.rb +1 -1
- data/spec/queue_spec.rb +47 -0
- data/spec/spec_helper.rb +23 -1
- data/spec/usage_update_spec.rb +146 -0
- data/toccatore.gemspec +11 -5
- metadata +109 -26
data/spec/cli_spec.rb
CHANGED
|
@@ -8,7 +8,7 @@ describe Toccatore::CLI do
|
|
|
8
8
|
|
|
9
9
|
describe "version" do
|
|
10
10
|
it 'has version' do
|
|
11
|
-
expect { subject.__print_version }.to output("0.
|
|
11
|
+
expect { subject.__print_version }.to output("0.4.15\n").to_stdout
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
@@ -77,7 +77,7 @@ describe Toccatore::CLI do
|
|
|
77
77
|
|
|
78
78
|
it 'should succeed' do
|
|
79
79
|
subject.options = cli_options
|
|
80
|
-
expect { subject.datacite_related }.to output(/https:\/\/doi.org\/10.
|
|
80
|
+
expect { subject.datacite_related }.to output(/https:\/\/doi.org\/10.15468\/dl.mb4das references https:\/\/doi.org\/10.3897\/phytokeys.12.2849 pushed to Event Data service.\n/).to_stdout
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
it 'should query by DOI' do
|
|
@@ -86,7 +86,7 @@ describe Toccatore::CLI do
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
it 'should query by related_identifier' do
|
|
89
|
-
subject.options = cli_options.merge(related_identifier: "10.7554/elife.01567", from_date: "2013-01-01", until_date: "
|
|
89
|
+
subject.options = cli_options.merge(related_identifier: "10.7554/elife.01567", from_date: "2013-01-01", until_date: "2018-12-31")
|
|
90
90
|
expect { subject.datacite_related }.to output(/https:\/\/doi.org\/10.5061\/dryad.b835k is_referenced_by https:\/\/doi.org\/10.7554\/elife.01567 pushed to Event Data service.\n/).to_stdout
|
|
91
91
|
end
|
|
92
92
|
|
|
@@ -106,4 +106,37 @@ describe Toccatore::CLI do
|
|
|
106
106
|
expect { subject.datacite_related }.to output(/An error occured: Access token missing.\n/).to_stdout
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
|
+
|
|
110
|
+
describe "usage_update", vcr: true, :order => :defined do
|
|
111
|
+
let(:push_url) { ENV['LAGOTTINO_URL'] }
|
|
112
|
+
let(:access_token) { ENV['LAGOTTINO_TOKEN'] }
|
|
113
|
+
let(:source_token) { ENV['SOURCE_TOKEN'] }
|
|
114
|
+
let(:slack_webhook_url) { ENV['SLACK_WEBHOOK_URL'] }
|
|
115
|
+
let(:cli_options) { { push_url: push_url,
|
|
116
|
+
slack_webhook_url: slack_webhook_url,
|
|
117
|
+
access_token: access_token,
|
|
118
|
+
source_token: source_token } }
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
context "no reports in the queue" do
|
|
122
|
+
it 'should succeed with no works' do
|
|
123
|
+
subject.options = { push_url: push_url,
|
|
124
|
+
slack_webhook_url: slack_webhook_url,
|
|
125
|
+
access_token: access_token}
|
|
126
|
+
expect { subject.usage_update }.to output("0 works processed with 0 errors for Usage Reports Queue https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage\n").to_stdout
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
context "with reports in the queue" do
|
|
131
|
+
# TO test this we need a real queue working
|
|
132
|
+
# it 'should succeed' do
|
|
133
|
+
# subject.options = cli_options
|
|
134
|
+
# expect { subject.usage_update }.to output("0 works processed with 0 errors for Usage Reports Queue https://sqs.eu-west-1.amazonaws.com/404017989009/test_usage\n").to_stdout
|
|
135
|
+
# end
|
|
136
|
+
# it 'should fail' do
|
|
137
|
+
# subject.options = cli_options.except(:access_token)
|
|
138
|
+
# expect { subject.usage_update }.to output(/An error occured: Access token missing.\n/).to_stdout
|
|
139
|
+
# end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
109
142
|
end
|
|
@@ -29,7 +29,7 @@ describe Toccatore::DataciteRelated, vcr: true do
|
|
|
29
29
|
|
|
30
30
|
context "get_total" do
|
|
31
31
|
it "with works" do
|
|
32
|
-
expect(subject.get_total(query_options)).to eq(
|
|
32
|
+
expect(subject.get_total(query_options)).to eq(640)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
it "with no works" do
|
|
@@ -57,19 +57,19 @@ describe Toccatore::DataciteRelated, vcr: true do
|
|
|
57
57
|
|
|
58
58
|
it "should report if there are works returned by the Datacite Metadata Search API" do
|
|
59
59
|
response = subject.get_data(query_options)
|
|
60
|
-
expect(response.body["data"]["response"]["numFound"]).to eq(
|
|
60
|
+
expect(response.body["data"]["response"]["numFound"]).to eq(640)
|
|
61
61
|
doc = response.body["data"]["response"]["docs"].first
|
|
62
|
-
expect(doc["doi"]).to eq("10.7480/KNOB.113.2014.3")
|
|
62
|
+
expect(doc["doi"]).to eq("10.7480/KNOB.113.2014.3.830")
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
it "should allow queries by related_identifier of the Datacite Metadata Search API" do
|
|
66
|
-
response = subject.get_data({ related_identifier: "10.
|
|
67
|
-
expect(response.body["data"]["response"]["numFound"]).to eq(
|
|
66
|
+
response = subject.get_data({ related_identifier: "10.3897/phytokeys.12.2849", from_date: "2013-01-01", until_date: "2017-12-31", rows: 1000, offset: 0 })
|
|
67
|
+
expect(response.body["data"]["response"]["numFound"]).to eq(14223)
|
|
68
68
|
doc = response.body["data"]["response"]["docs"].first
|
|
69
|
-
expect(doc["doi"]).to eq("10.
|
|
69
|
+
expect(doc["doi"]).to eq("10.15468/DL.MBSMUW")
|
|
70
70
|
related_identifiers = doc["relatedIdentifier"]
|
|
71
|
-
expect(related_identifiers.count).to eq(
|
|
72
|
-
expect(related_identifiers
|
|
71
|
+
expect(related_identifiers.count).to eq(1)
|
|
72
|
+
expect(related_identifiers.first).to eq("References:DOI:10.3897/phytokeys.12.2849")
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
it "should allow queries by DOI of the Datacite Metadata Search API" do
|
|
@@ -102,7 +102,7 @@ describe Toccatore::DataciteRelated, vcr: true do
|
|
|
102
102
|
response = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
|
|
103
103
|
|
|
104
104
|
expect(response.length).to eq(134)
|
|
105
|
-
expect(response.last.except("id")).to eq("message_action" => "create", "subj_id"=>"https://doi.org/10.17180/obs.yzeron", "obj_id"=>"https://doi.org/10.1016/j.jhydrol.2013.09.055", "relation_type_id"=>"is_referenced_by", "source_id"=>"datacite","source_token" =>
|
|
105
|
+
expect(response.last.except("id")).to eq("message_action" => "create", "subj_id"=>"https://doi.org/10.17180/obs.yzeron", "obj_id"=>"https://doi.org/10.1016/j.jhydrol.2013.09.055", "relation_type_id"=>"is_referenced_by", "source_id"=>"datacite","source_token" => ENV['SOURCE_TOKEN'], "occurred_at"=>"2015-04-07T12:22:40Z", "license" => "https://creativecommons.org/publicdomain/zero/1.0/")
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
it "should report if there are works ignored because of an IsIdenticalTo relation" do
|
|
@@ -136,7 +136,7 @@ describe Toccatore::DataciteRelated, vcr: true do
|
|
|
136
136
|
body = File.read(fixture_path + 'datacite_related.json')
|
|
137
137
|
result = OpenStruct.new(body: { "data" => JSON.parse(body) })
|
|
138
138
|
result = subject.parse_data(result, source_token: ENV['SOURCE_TOKEN'])
|
|
139
|
-
options = { push_url: ENV['
|
|
139
|
+
options = { push_url: ENV['LAGOTTINO_URL'], access_token: ENV['LAGOTTINO_TOKEN'], jsonapi: true }
|
|
140
140
|
expect { subject.push_data(result, options) }.to output(/https:\/\/doi.org\/10.15468\/dl.mb4das references https:\/\/doi.org\/10.3897\/phytokeys.12.2849 pushed to Event Data service.\n/).to_stdout
|
|
141
141
|
end
|
|
142
142
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require "faker"
|
|
2
|
+
require 'securerandom'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
FactoryBot.define do
|
|
6
|
+
factory :event , class: OpenStruct do
|
|
7
|
+
sequence(:uuid) { |n| "#{SecureRandom.uuid}-#{n}" }
|
|
8
|
+
message_action "create"
|
|
9
|
+
sequence(:obj_id) { |n| "#{Faker::Internet.url}#{n}" }
|
|
10
|
+
sequence(:subj_id) { |n| "#{Faker::Internet.url}#{n}" }
|
|
11
|
+
total Faker::Number.number(3)
|
|
12
|
+
subj {{
|
|
13
|
+
"pid" => "fdfdfd",
|
|
14
|
+
"issued" => Faker::Time.between(DateTime.now - 2, DateTime.now),
|
|
15
|
+
}}
|
|
16
|
+
relation_type_id ["total-dataset-investigations-regular","total-dataset-investigations-machine","unique-dataset-investigations-machine","total-dataset-investigations-machine"].sample
|
|
17
|
+
source_id "datacite-usage"
|
|
18
|
+
sequence(:source_token) { |n| "#{SecureRandom.uuid}-#{n}" }
|
|
19
|
+
occurred_at Faker::Time.between(DateTime.now - 2, DateTime.now)
|
|
20
|
+
license "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
https://api.test.datacite.org/reports/2018-3-Dash total-dataset-investigations-regular https://doi.org/10.7291/d1q94r pushed to Event Data service.
|
|
2
|
+
https://api.test.datacite.org/reports/2018-3-Dash unique-dataset-investigations-regular https://doi.org/10.7291/d1q94r pushed to Event Data service.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
https://api.test.datacite.org/reports/2018-3-Dash total-dataset-investigations-regular https://doi.org/10.7291/d1q94r had an error:\nthe server responded with status 500/\n
|
|
2
|
+
https://api.test.datacite.org/reports/2018-3-Dash unique-dataset-investigations-regular https://doi.org/10.7291/d1q94r had an error:\nthe server responded with status 500/\n
|
|
3
|
+
https://api.test.datacite.org/reports/2018-3-Dash Total-Dataset-Requests-Machine https://doi.org/10.6071/z7wc73 had an error:\nthe server responded with status 500/\n
|
|
4
|
+
https://api.test.datacite.org/reports/2018-3-Dash Unique-Dataset-Requests-Machine https://doi.org/10.6071/z7wc73 had an error:\nthe server responded with status 500/\n
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"uuid": "",
|
|
4
|
+
"message-action": "create",
|
|
5
|
+
"subj-id": "",
|
|
6
|
+
"subj": {
|
|
7
|
+
"pid": "",
|
|
8
|
+
"issued": ""
|
|
9
|
+
},
|
|
10
|
+
"total": 3,
|
|
11
|
+
"obj-id": "",
|
|
12
|
+
"relation-type-id": "",
|
|
13
|
+
"source-id": "datacite",
|
|
14
|
+
"source-token": "",
|
|
15
|
+
"occurred-at": "",
|
|
16
|
+
"license": ""
|
|
17
|
+
}, {
|
|
18
|
+
"uuid": "fc6860b8-4230-41bc-8b8e-21d60e9a7d9a",
|
|
19
|
+
"message-action": "create",
|
|
20
|
+
"subj-id": "https://api.test.datacite.org/reports/2018-3-Dashs",
|
|
21
|
+
"subj": {
|
|
22
|
+
"pid": "https://api.test.datacite.org/reports/2018-3-Dashs",
|
|
23
|
+
"issued": "2128-04-09"
|
|
24
|
+
},
|
|
25
|
+
"total": 3,
|
|
26
|
+
"obj-id": "https://doi.org/10.7291/d1q94r",
|
|
27
|
+
"relation-type-id": "unique-dataset-investigations-regular",
|
|
28
|
+
"source-id": "datacite",
|
|
29
|
+
"source-token": "28276d12-b320-41ba-9272-bb0adc3466ff",
|
|
30
|
+
"occurred-at": "2128-04-09",
|
|
31
|
+
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"report_id":"https://api.test.datacite.org/reports/5cac6ca0-9391-4e1d-95cf-ba2f475cbfad"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[{
|
|
2
|
+
"id": 12332423432432,
|
|
3
|
+
"message-action": "create",
|
|
4
|
+
"subj": {
|
|
5
|
+
"pid": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
6
|
+
"issued": "2128-04-09"
|
|
7
|
+
},
|
|
8
|
+
"total": "208",
|
|
9
|
+
"obj-id": "https://doi.org/10.6071/z7wc73",
|
|
10
|
+
"relation-type-id": "Unique-Dataset-Requests-Machine",
|
|
11
|
+
"source-id": "datacite",
|
|
12
|
+
"source-token": "28276d12-b320-41ba-9272-bb0adc3466ff",
|
|
13
|
+
"occurred-at": "2128-04-09",
|
|
14
|
+
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"uuid": "a17e783b-8214-451e-9b0d-077213c2acae",
|
|
4
|
+
"message-action": "create",
|
|
5
|
+
"subj-id": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
6
|
+
"subj": {
|
|
7
|
+
"pid": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
8
|
+
"issued": "2128-04-09"
|
|
9
|
+
},
|
|
10
|
+
"total": 3,
|
|
11
|
+
"obj-id": "https://doi.org/10.7291/d1q94r",
|
|
12
|
+
"relation-type-id": "total-dataset-investigations-regular",
|
|
13
|
+
"source-id": "datacite",
|
|
14
|
+
"source-token": "28276d12-b320-41ba-9272-bb0adc3466ff",
|
|
15
|
+
"occurred-at": "2128-04-09",
|
|
16
|
+
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
17
|
+
}, {
|
|
18
|
+
"uuid": "fc6860b8-4230-41bc-8b8e-21d60e9a7d9a",
|
|
19
|
+
"message-action": "create",
|
|
20
|
+
"subj-id": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
21
|
+
"subj": {
|
|
22
|
+
"pid": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
23
|
+
"issued": "2128-04-09"
|
|
24
|
+
},
|
|
25
|
+
"total": 3,
|
|
26
|
+
"obj-id": "https://doi.org/10.7291/d1q94r",
|
|
27
|
+
"relation-type-id": "unique-dataset-investigations-regular",
|
|
28
|
+
"source-id": "datacite-usage",
|
|
29
|
+
"source-token": "28276d12-b320-41ba-9272-bb0adc3466ff",
|
|
30
|
+
"occurred-at": "2128-04-09",
|
|
31
|
+
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
32
|
+
}, {
|
|
33
|
+
"uuid": "054da0ad-9821-492e-877e-5c3adbfd5ccf",
|
|
34
|
+
"message-action": "create",
|
|
35
|
+
"subj-id": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
36
|
+
"subj": {
|
|
37
|
+
"pid": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
38
|
+
"issued": "2128-04-09"
|
|
39
|
+
},
|
|
40
|
+
"total": 254,
|
|
41
|
+
"obj-id": "https://doi.org/10.6071/z7wc73",
|
|
42
|
+
"relation-type-id": "Total-Dataset-Requests-Machine",
|
|
43
|
+
"source-id": "datacite-usage",
|
|
44
|
+
"source-token": "28276d12-b320-41ba-9272-bb0adc3466ff",
|
|
45
|
+
"occurred-at": "2128-04-09",
|
|
46
|
+
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
47
|
+
}, {
|
|
48
|
+
"uuid": "6d6fd620-2123-42da-91f3-6c02e63f3cec",
|
|
49
|
+
"message-action": "create",
|
|
50
|
+
"subj-id": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
51
|
+
"subj": {
|
|
52
|
+
"pid": "https://api.test.datacite.org/reports/2018-3-Dash",
|
|
53
|
+
"issued": "2128-04-09"
|
|
54
|
+
},
|
|
55
|
+
"total": 208,
|
|
56
|
+
"obj-id": "https://doi.org/10.6071/z7wc73",
|
|
57
|
+
"relation-type-id": "Unique-Dataset-Requests-Machine",
|
|
58
|
+
"source-id": "datacite-usage",
|
|
59
|
+
"source-token": "28276d12-b320-41ba-9272-bb0adc3466ff",
|
|
60
|
+
"occurred-at": "2128-04-09",
|
|
61
|
+
"license": "https://creativecommons.org/publicdomain/zero/1.0/"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data":{
|
|
3
|
+
"report": {
|
|
4
|
+
"id": "2018-3-Dash",
|
|
5
|
+
"report-header": {
|
|
6
|
+
"report-name": "dataset report",
|
|
7
|
+
"report-id": "DSR",
|
|
8
|
+
"release": "rd1",
|
|
9
|
+
"created": "2128-04-09",
|
|
10
|
+
"created-by": "dash",
|
|
11
|
+
"report-attributes": [],
|
|
12
|
+
"report-filters": [
|
|
13
|
+
{
|
|
14
|
+
"name": "begin-date",
|
|
15
|
+
"value": "2018-03-01"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "end-date",
|
|
19
|
+
"value": "2018-03-31"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"exceptions": [
|
|
23
|
+
{
|
|
24
|
+
"code": 3040,
|
|
25
|
+
"severity": "warning",
|
|
26
|
+
"message": "partial data returned",
|
|
27
|
+
"help-url": "string",
|
|
28
|
+
"data": "usage data has not been processed for the entire reporting period"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"report-datasets": [
|
|
33
|
+
{
|
|
34
|
+
"dataset-title": "chemical shift-based methods in nmr structure determination",
|
|
35
|
+
"dataset-id": [
|
|
36
|
+
{
|
|
37
|
+
"type": "doi",
|
|
38
|
+
"value": "10.7291/d1q94r"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"dataset-contributors": [
|
|
42
|
+
{
|
|
43
|
+
"type": "name",
|
|
44
|
+
"value": "santrupti nerli"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "name",
|
|
48
|
+
"value": "andrew c. mcshan"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "name",
|
|
52
|
+
"value": "nikolaos g. sgourakis"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"dataset-dates": [
|
|
56
|
+
{
|
|
57
|
+
"type": "pub-date",
|
|
58
|
+
"value": "2018-05-01"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"platform": "dash",
|
|
62
|
+
"publisher": "uc santa cruz",
|
|
63
|
+
"publisher-id": [
|
|
64
|
+
{
|
|
65
|
+
"type": "orcid",
|
|
66
|
+
"value": "2059-4343-4343-4343"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"data-type": "dataset",
|
|
70
|
+
"yop": "2018",
|
|
71
|
+
"uri": "https://dash.library.ucsc.edu/stash/dataset/doi:10.7291/d1q94r",
|
|
72
|
+
"performance": [
|
|
73
|
+
{
|
|
74
|
+
"period": {
|
|
75
|
+
"begin-date": "2018-03-01",
|
|
76
|
+
"end-date": "2018-03-31"
|
|
77
|
+
},
|
|
78
|
+
"instance": [
|
|
79
|
+
{
|
|
80
|
+
"country": "gb",
|
|
81
|
+
"access-method": "regular",
|
|
82
|
+
"metric-type": "total-dataset-investigations",
|
|
83
|
+
"count": 3
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"country": "gb",
|
|
87
|
+
"access-method": "regular",
|
|
88
|
+
"metric-type": "unique-dataset-investigations",
|
|
89
|
+
"count": 3
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}]
|
|
95
|
+
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|