commonmeta-ruby 3.4.3 → 3.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/commonmeta/crossref_utils.rb +21 -18
- data/lib/commonmeta/readers/json_feed_reader.rb +34 -5
- data/lib/commonmeta/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_related_identifiers_and_funding.yml +580 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_relations_and_funding.yml +580 -0
- data/spec/readers/json_feed_reader_spec.rb +26 -1
- data/spec/writers/crossref_xml_writer_spec.rb +36 -0
- metadata +4 -2
@@ -0,0 +1,580 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://rogue-scholar.org/api/posts/e58dc9c8-b870-4db2-8896-238b3246c551
|
6
|
+
body:
|
7
|
+
encoding: ASCII-8BIT
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Connection:
|
11
|
+
- close
|
12
|
+
Host:
|
13
|
+
- rogue-scholar.org
|
14
|
+
User-Agent:
|
15
|
+
- http.rb/5.1.1
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Age:
|
22
|
+
- '0'
|
23
|
+
Cache-Control:
|
24
|
+
- public, max-age=0, must-revalidate
|
25
|
+
Content-Length:
|
26
|
+
- '8364'
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Thu, 07 Sep 2023 17:35:58 GMT
|
31
|
+
Etag:
|
32
|
+
- '"181gxnqe7gh6g9"'
|
33
|
+
Server:
|
34
|
+
- Vercel
|
35
|
+
Strict-Transport-Security:
|
36
|
+
- max-age=63072000
|
37
|
+
X-Matched-Path:
|
38
|
+
- "/api/posts/[[...params]]"
|
39
|
+
X-Vercel-Cache:
|
40
|
+
- MISS
|
41
|
+
X-Vercel-Id:
|
42
|
+
- fra1::iad1::6b96j-1694108158420-aa1044525442
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"id":"e58dc9c8-b870-4db2-8896-238b3246c551","doi":"https://doi.org/10.53731/r79s4nh-97aq74v-ag4t1","url":"https://blog.front-matter.io/posts/tracking-the-growth-of-the-pid-graph","title":"Tracking
|
48
|
+
the Growth of the PID Graph","summary":"The connections between scholarly
|
49
|
+
resources generated by persistent identifiers (PIDs) and associated metadata
|
50
|
+
form a graph: the PID Graph [Fenner & Aryani (2019)]. We developed this PID
|
51
|
+
Graph concept in the EC-funded FREYA project, and have identified important
|
52
|
+
use cases and technical requirements.","content_html":" <p><img src=\"https://blog.front-matter.io/content/images/2022/08/download-19-.jpeg\"
|
53
|
+
/></p><p>The connections between scholarly resources generated by persistent
|
54
|
+
identifiers (PIDs) and associated metadata form a graph: the PID Graph [Fenner
|
55
|
+
& Aryani (<a href=\"https://blog.datacite.org/tracking-the-growth-of-the-pid-graph/#ref-https://doi.org/10.5438/jwvf-8a66\">2019</a>)].
|
56
|
+
We developed this PID Graph concept in the EC-funded <a href=\"https://www.project-freya.eu/en\">FREYA
|
57
|
+
project</a>, and have identified important use cases and technical requirements.
|
58
|
+
In May, DataCite introduced a GraphQL API to standardize and simplify how
|
59
|
+
users can contribute to and consume the PID Graph [Fenner (<a href=\"https://blog.datacite.org/tracking-the-growth-of-the-pid-graph/#ref-https://doi.org/10.5438/qab1-n315\">2019b</a>)].
|
60
|
+
Today we are announcing another important milestone: we added the required
|
61
|
+
functionality to the DataCite GraphQL API that allows us to keep track of
|
62
|
+
the growth of the PID Graph in terms of nodes (resources) and edges (connections).
|
63
|
+
As before, we are using a Jupyter notebook to analyze and visualize the data.</p>\n<p>The
|
64
|
+
graph visualizes the main resources currently available via the DataCite GraphQL
|
65
|
+
API, and their connections. The required data are fetched via a single GraphQL
|
66
|
+
API call:</p>\n<pre><code>{\n publications {\n totalCount\n publicationConnectionCount\n datasetConnectionCount\n softwareConnectionCount\n researcherConnectionCount\n funderConnectionCount\n }\n datasets
|
67
|
+
{\n totalCount\n datasetConnectionCount\n softwareConnectionCount\n researcherConnectionCount\n funderConnectionCount\n }\n softwares
|
68
|
+
{\n totalCount\n softwareConnectionCount\n researcherConnectionCount\n funderConnectionCount\n }\n researchers
|
69
|
+
{\n totalCount\n }\n funders {\n totalCount\n }\n}</code></pre>\n<p>The
|
70
|
+
numbers reflect what is currently available via the DataCite GraphQL API,
|
71
|
+
not the total number of publications, datasets, etc. with persistent identifiers
|
72
|
+
and linking metadata. This includes all publications, datasets and software
|
73
|
+
with DataCite DOIs, all funders in the <a href=\"https://support.crossref.org/hc/en-us/articles/214360886-The-Open-Funder-Registry\">Crossref
|
74
|
+
Open Funder Registry</a>, publications with Crossref DOIs linked to at least
|
75
|
+
one DataCite DOI, and all researchers with an ORCID identifier linked to at
|
76
|
+
least one DataCite DOI. A lot of work remains to be done to include the other
|
77
|
+
resources with persistent identifiers made available by FREYA partners, including
|
78
|
+
Crossref, ORCID and EMBL-EBI, as well as their connections. With this new
|
79
|
+
API functionality we can now track the growth of the PID Graph with the key
|
80
|
+
performance indicators (KPIs) number of <strong>nodes</strong> and number
|
81
|
+
of <strong>connections</strong>.</p>\n<p>A few interesting observations can
|
82
|
+
be made from the visualization: not surprisingly, given that datasets currently
|
83
|
+
make up the largest number of resources in the PID Graph, by far the largest
|
84
|
+
number of connections (9.4 million) is between datasets and other datasets.
|
85
|
+
Looking at the relation type of these connections in the Event Data API, most
|
86
|
+
of them (8.5 million) don''t describe versioning or granularity (HasPart/IsPartOf
|
87
|
+
relations), but use the relation type <strong>references</strong> between
|
88
|
+
two <a href=\"https://www.gbif.org/en/\">GBIF</a> DOIs. This reflects the
|
89
|
+
main <a href=\"https://www.gbif.org/en/document/81771/gbif-overview-powerpoint-slides\">use
|
90
|
+
case for DOIs at GBIF</a>, tracking occurrences of species.</p>\n<p>The graph
|
91
|
+
shows 1.5 million connections between publications and datasets, representing
|
92
|
+
the data citations made available via the <a href=\"https://www.eventdata.crossref.org/guide/app-scholix/\">Crossref/DataCite
|
93
|
+
Event Data Scholix API endpoint</a>. Twenty-five percent of datasets with
|
94
|
+
DataCite DOIs have been referenced in the scholarly literature, according
|
95
|
+
to this graph. We also see the number of software citations using DataCite
|
96
|
+
DOIs for software found in the scholarly literature, and we can use this API
|
97
|
+
call to keep track of them. Similarly, we can track the number of datasets,
|
98
|
+
publications, and software linked to researchers (via their ORCID ID), and
|
99
|
+
funding (via the Crossref Funder ID), but keep in mind that connections to
|
100
|
+
researchers and funding via Crossref are still missing.</p>\n<p>The Jupyter
|
101
|
+
notebook used to generate the visualization shown here is available via GitHub,
|
102
|
+
where we store all PID Graph notebooks in a <a href=\"https://github.com/datacite/notebooks\">central
|
103
|
+
repository</a>. Starting with this notebook [Fenner (<a href=\"https://blog.datacite.org/tracking-the-growth-of-the-pid-graph/#ref-https://doi.org/10.14454/3bpw-w381\">2019a</a>)]
|
104
|
+
we are also issuing DOIs for the notebooks, which we generate using a <a href=\"https://codemeta.github.io/\">codemeta</a>
|
105
|
+
file hosted in the same folder as the notebook. This should make these notebooks
|
106
|
+
easier to discover, and they also become part of the PID Graph.</p>\n<p>Going
|
107
|
+
forward we want to refine the GraphQL API to provide the numbers of <strong>nodes</strong>
|
108
|
+
and <strong>connections</strong> as they change over time, making it easier
|
109
|
+
to track progress. And of course, we will be adding more resource types and
|
110
|
+
information from other FREYA partners. Keep an eye on this blog for further
|
111
|
+
updates!</p>\n<h2>Acknowledgments</h2>\n<p>This blog post was <a href=\"https://doi.org/10.5438/bv9z-dc66\">originally
|
112
|
+
published</a> on the DataCite Blog. This work was funded by the European Union’s
|
113
|
+
Horizon 2020 research and innovation programme under <a href=\"https://doi.org/10.3030/777523\">grant
|
114
|
+
agreement No. 777523</a>.</p>\n<h2>References</h2>\n<p>Fenner M. Jupyter Notebook
|
115
|
+
FREYA PID Graph Key Performance Indicators (KPIs). Published online June 30,
|
116
|
+
2019. doi:<a href=\"https://doi.org/10.14454/3BPW-W381\">10.14454/3BPW-W381</a></p>\n<p>Fenner
|
117
|
+
M. The DataCite GraphQL API is now open for (pre-release) business. Published
|
118
|
+
online May 15, 2019. doi:<a href=\"https://doi.org/10.53731/r79sa71-97aq74v-ag4vc\">10.53731/r79sa71-97aq74v-ag4vc</a></p>\n<p>Fenner
|
119
|
+
M, Aryani A. Introducing the PID Graph. Published online 2019. doi:<a href=\"https://doi.org/10.5438/JWVF-8A66\">10.5438/JWVF-8A66</a></p>
|
120
|
+
","published_at":1561939200,"updated_at":1694087432,"indexed_at":1694097846,"authors":[{"url":"https://orcid.org/0000-0003-1419-2405","name":"Martin
|
121
|
+
Fenner"}],"image":"https://blog.front-matter.io/content/images/2022/08/download-19-.jpeg","tags":["Feature"],"language":"en","reference":[{"doi":"https://doi.org/10.14454/3BPW-W381","key":"ref1"},{"doi":"https://doi.org/10.53731/r79sa71-97aq74v-ag4vc","key":"ref2"},{"doi":"https://doi.org/10.5438/JWVF-8A66","key":"ref3"}],"relationships":[{"url":"https://doi.org/10.5438/bv9z-dc66","type":"IsIdenticalTo"},{"url":"https://doi.org/10.3030/777523","type":"HasAward"}],"blog_id":"f0m0e38","blog_name":"Front
|
122
|
+
Matter","blog_slug":"front_matter","blog":{"id":"f0m0e38","title":"Front Matter","description":"The
|
123
|
+
Front Matter Blog covers the intersection of science and technology since
|
124
|
+
2007.","language":"en","favicon":"https://blog.front-matter.io/favicon.png","feed_url":"https://blog.front-matter.io/atom-complete/","home_page_url":"https://blog.front-matter.io","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-01-02","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
|
125
|
+
5.52","category":"computerAndInformationSciences","prefix":"10.53731","modified_at":"2023-09-05T21:35:21+00:00","version":"https://jsonfeed.org/version/1.1","current_feed_url":"https://blog.front-matter.io/atom/","status":"active","issn":"2749-9952","backlog":0,"authors":null,"plan":"Team","slug":"front_matter","use_mastodon":true}}'
|
126
|
+
recorded_at: Thu, 07 Sep 2023 17:35:58 GMT
|
127
|
+
- request:
|
128
|
+
method: get
|
129
|
+
uri: https://doi.org/10.14454/3BPW-W381
|
130
|
+
body:
|
131
|
+
encoding: ASCII-8BIT
|
132
|
+
string: ''
|
133
|
+
headers:
|
134
|
+
Accept:
|
135
|
+
- application/vnd.citationstyles.csl+json
|
136
|
+
Connection:
|
137
|
+
- close
|
138
|
+
Host:
|
139
|
+
- doi.org
|
140
|
+
User-Agent:
|
141
|
+
- http.rb/5.1.1
|
142
|
+
response:
|
143
|
+
status:
|
144
|
+
code: 302
|
145
|
+
message: Found
|
146
|
+
headers:
|
147
|
+
Date:
|
148
|
+
- Thu, 07 Sep 2023 17:35:59 GMT
|
149
|
+
Content-Type:
|
150
|
+
- text/html;charset=utf-8
|
151
|
+
Content-Length:
|
152
|
+
- '179'
|
153
|
+
Connection:
|
154
|
+
- close
|
155
|
+
Location:
|
156
|
+
- https://data.crosscite.org/10.14454%2F3BPW-W381
|
157
|
+
Vary:
|
158
|
+
- Accept
|
159
|
+
Expires:
|
160
|
+
- Thu, 07 Sep 2023 18:20:43 GMT
|
161
|
+
Permissions-Policy:
|
162
|
+
- interest-cohort=(),browsing-topics=()
|
163
|
+
Cf-Cache-Status:
|
164
|
+
- DYNAMIC
|
165
|
+
Report-To:
|
166
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=JO9%2FIFndFeZ2K2zpt9byJjRA0zd7q%2F9jaXD5ShspvZ8Ib0%2B0hLDzxEnh0ddTCXQeWtubipbUsIv3%2BMkYgqunoJxUw%2FqPxLiN7sgw6wyOlXOfX15rvYPVCjhtDTS7aKbEQN6qe2w%3D"}],"group":"cf-nel","max_age":604800}'
|
167
|
+
Nel:
|
168
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
169
|
+
Strict-Transport-Security:
|
170
|
+
- max-age=31536000; includeSubDomains; preload
|
171
|
+
Server:
|
172
|
+
- cloudflare
|
173
|
+
Cf-Ray:
|
174
|
+
- 8030b61af93cb894-AMS
|
175
|
+
Alt-Svc:
|
176
|
+
- h3=":443"; ma=86400
|
177
|
+
body:
|
178
|
+
encoding: UTF-8
|
179
|
+
string: |-
|
180
|
+
<html><head><title>Handle Redirect</title></head>
|
181
|
+
<body><a href="https://data.crosscite.org/10.14454%2F3BPW-W381">https://data.crosscite.org/10.14454%2F3BPW-W381</a></body></html>
|
182
|
+
recorded_at: Thu, 07 Sep 2023 17:35:59 GMT
|
183
|
+
- request:
|
184
|
+
method: get
|
185
|
+
uri: https://data.crosscite.org/10.14454%2F3BPW-W381
|
186
|
+
body:
|
187
|
+
encoding: ASCII-8BIT
|
188
|
+
string: ''
|
189
|
+
headers:
|
190
|
+
Accept:
|
191
|
+
- application/vnd.citationstyles.csl+json
|
192
|
+
Connection:
|
193
|
+
- close
|
194
|
+
User-Agent:
|
195
|
+
- http.rb/5.1.1
|
196
|
+
Host:
|
197
|
+
- data.crosscite.org
|
198
|
+
response:
|
199
|
+
status:
|
200
|
+
code: 200
|
201
|
+
message: OK
|
202
|
+
headers:
|
203
|
+
Date:
|
204
|
+
- Thu, 07 Sep 2023 17:35:59 GMT
|
205
|
+
Content-Type:
|
206
|
+
- application/vnd.citationstyles.csl+json; charset=utf-8
|
207
|
+
Transfer-Encoding:
|
208
|
+
- chunked
|
209
|
+
Connection:
|
210
|
+
- close
|
211
|
+
Status:
|
212
|
+
- 200 OK
|
213
|
+
Cache-Control:
|
214
|
+
- max-age=0, private, must-revalidate
|
215
|
+
Vary:
|
216
|
+
- Accept-Encoding, Origin
|
217
|
+
Etag:
|
218
|
+
- W/"e5a505a4330ff4865cb47565f20f9119"
|
219
|
+
X-Runtime:
|
220
|
+
- '0.021097'
|
221
|
+
X-Request-Id:
|
222
|
+
- a848d20b-dd5f-4dd3-b50f-78d175a050aa
|
223
|
+
X-Powered-By:
|
224
|
+
- Phusion Passenger(R) 6.0.13
|
225
|
+
Server:
|
226
|
+
- nginx/1.18.0 + Phusion Passenger(R) 6.0.13
|
227
|
+
body:
|
228
|
+
encoding: UTF-8
|
229
|
+
string: |-
|
230
|
+
{
|
231
|
+
"type": "article",
|
232
|
+
"id": "https://doi.org/10.14454/3bpw-w381",
|
233
|
+
"categories": [
|
234
|
+
"pid graph",
|
235
|
+
"graphql",
|
236
|
+
"kpi",
|
237
|
+
"freya",
|
238
|
+
"eosc",
|
239
|
+
"FOS: Computer and information sciences"
|
240
|
+
],
|
241
|
+
"author": [
|
242
|
+
{
|
243
|
+
"family": "Fenner",
|
244
|
+
"given": "Martin"
|
245
|
+
}
|
246
|
+
],
|
247
|
+
"issued": {
|
248
|
+
"date-parts": [
|
249
|
+
[
|
250
|
+
2019,
|
251
|
+
6,
|
252
|
+
30
|
253
|
+
]
|
254
|
+
]
|
255
|
+
},
|
256
|
+
"DOI": "10.14454/3BPW-W381",
|
257
|
+
"publisher": "DataCite",
|
258
|
+
"title": "Jupyter Notebook FREYA PID Graph Key Performance Indicators (KPIs)",
|
259
|
+
"URL": "https://github.com/datacite/pidgraph-notebooks-r/tree/master/kpi",
|
260
|
+
"copyright": "MIT License",
|
261
|
+
"version": "1.1.0"
|
262
|
+
}
|
263
|
+
recorded_at: Thu, 07 Sep 2023 17:35:59 GMT
|
264
|
+
- request:
|
265
|
+
method: get
|
266
|
+
uri: https://doi.org/10.53731/r79sa71-97aq74v-ag4vc
|
267
|
+
body:
|
268
|
+
encoding: ASCII-8BIT
|
269
|
+
string: ''
|
270
|
+
headers:
|
271
|
+
Accept:
|
272
|
+
- application/vnd.citationstyles.csl+json
|
273
|
+
Connection:
|
274
|
+
- close
|
275
|
+
Host:
|
276
|
+
- doi.org
|
277
|
+
User-Agent:
|
278
|
+
- http.rb/5.1.1
|
279
|
+
response:
|
280
|
+
status:
|
281
|
+
code: 302
|
282
|
+
message: Found
|
283
|
+
headers:
|
284
|
+
Date:
|
285
|
+
- Thu, 07 Sep 2023 17:35:59 GMT
|
286
|
+
Content-Type:
|
287
|
+
- text/html;charset=utf-8
|
288
|
+
Content-Length:
|
289
|
+
- '237'
|
290
|
+
Connection:
|
291
|
+
- close
|
292
|
+
Location:
|
293
|
+
- https://api.crossref.org/v1/works/10.53731%2Fr79sa71-97aq74v-ag4vc/transform
|
294
|
+
Vary:
|
295
|
+
- Accept
|
296
|
+
Expires:
|
297
|
+
- Thu, 07 Sep 2023 18:28:54 GMT
|
298
|
+
Permissions-Policy:
|
299
|
+
- interest-cohort=(),browsing-topics=()
|
300
|
+
Cf-Cache-Status:
|
301
|
+
- DYNAMIC
|
302
|
+
Report-To:
|
303
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=72Cl0jH%2BOz1nIwSmGNy5SSx3d26Xp%2BVZWZ1NhQMY03KbhAHs6OyccJpDWtBulFKggufOh2GinpZMCalbIGPdYoKz8u4nLUIiGcctAP%2FHcFlm9eZcYipkdO5X%2FVGVZBnR%2BoZxutY%3D"}],"group":"cf-nel","max_age":604800}'
|
304
|
+
Nel:
|
305
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
306
|
+
Strict-Transport-Security:
|
307
|
+
- max-age=31536000; includeSubDomains; preload
|
308
|
+
Server:
|
309
|
+
- cloudflare
|
310
|
+
Cf-Ray:
|
311
|
+
- 8030b61e68a4b748-AMS
|
312
|
+
Alt-Svc:
|
313
|
+
- h3=":443"; ma=86400
|
314
|
+
body:
|
315
|
+
encoding: UTF-8
|
316
|
+
string: |-
|
317
|
+
<html><head><title>Handle Redirect</title></head>
|
318
|
+
<body><a href="https://api.crossref.org/v1/works/10.53731%2Fr79sa71-97aq74v-ag4vc/transform">https://api.crossref.org/v1/works/10.53731%2Fr79sa71-97aq74v-ag4vc/transform</a></body></html>
|
319
|
+
recorded_at: Thu, 07 Sep 2023 17:35:59 GMT
|
320
|
+
- request:
|
321
|
+
method: get
|
322
|
+
uri: https://api.crossref.org/v1/works/10.53731%2Fr79sa71-97aq74v-ag4vc/transform
|
323
|
+
body:
|
324
|
+
encoding: ASCII-8BIT
|
325
|
+
string: ''
|
326
|
+
headers:
|
327
|
+
Accept:
|
328
|
+
- application/vnd.citationstyles.csl+json
|
329
|
+
Connection:
|
330
|
+
- close
|
331
|
+
User-Agent:
|
332
|
+
- http.rb/5.1.1
|
333
|
+
Host:
|
334
|
+
- api.crossref.org
|
335
|
+
response:
|
336
|
+
status:
|
337
|
+
code: 200
|
338
|
+
message: OK
|
339
|
+
headers:
|
340
|
+
Date:
|
341
|
+
- Thu, 07 Sep 2023 17:36:00 GMT
|
342
|
+
Content-Type:
|
343
|
+
- application/vnd.citationstyles.csl+json
|
344
|
+
Transfer-Encoding:
|
345
|
+
- chunked
|
346
|
+
Vary:
|
347
|
+
- Accept
|
348
|
+
Link:
|
349
|
+
- <http://dx.doi.org/10.53731/r79sa71-97aq74v-ag4vc>; rel="canonical", <https://blog.front-matter.io/posts/the-datacite-graphql-api-is-now-open-for-pre-release-business>;
|
350
|
+
version="vor"; type="text/html"; rel="item", <https://creativecommons.org/licenses/by/4.0/legalcode>;
|
351
|
+
version="vor"; rel="license", <https://creativecommons.org/licenses/by/4.0/legalcode>;
|
352
|
+
version="tdm"; rel="license", <http://orcid.org/0000-0003-1419-2405>; title="Martin
|
353
|
+
Fenner"; rel="author"
|
354
|
+
Access-Control-Expose-Headers:
|
355
|
+
- Link
|
356
|
+
Access-Control-Allow-Headers:
|
357
|
+
- X-Requested-With, Accept, Accept-Encoding, Accept-Charset, Accept-Language,
|
358
|
+
Accept-Ranges, Cache-Control
|
359
|
+
Access-Control-Allow-Origin:
|
360
|
+
- "*"
|
361
|
+
Server:
|
362
|
+
- Jetty(9.4.40.v20210413)
|
363
|
+
X-Ratelimit-Limit:
|
364
|
+
- '50'
|
365
|
+
X-Ratelimit-Interval:
|
366
|
+
- 1s
|
367
|
+
X-Api-Pool:
|
368
|
+
- public
|
369
|
+
X-Rate-Limit-Limit:
|
370
|
+
- '50'
|
371
|
+
X-Rate-Limit-Interval:
|
372
|
+
- 1s
|
373
|
+
Permissions-Policy:
|
374
|
+
- interest-cohort=()
|
375
|
+
Connection:
|
376
|
+
- close
|
377
|
+
body:
|
378
|
+
encoding: ASCII-8BIT
|
379
|
+
string: '{"institution":[{"name":"Front Matter"}],"indexed":{"date-parts":[[2023,8,4]],"date-time":"2023-08-04T11:10:44Z","timestamp":1691147444368},"posted":{"date-parts":[[2019,5,15]]},"group-title":"Engineeringandtechnology","reference-count":1,"publisher":"Front
|
380
|
+
Matter","license":[{"start":{"date-parts":[[2019,5,15]],"date-time":"2019-05-15T00:00:00Z","timestamp":1557878400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"},{"start":{"date-parts":[[2019,5,15]],"date-time":"2019-05-15T00:00:00Z","timestamp":1557878400000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"content-domain":{"domain":[],"crossmark-restriction":false},"abstract":"<p>DataCite
|
381
|
+
DOIs describe resources such as datasets, samples, software and publications
|
382
|
+
with rich metadata. An important part of this metadata is the description
|
383
|
+
of connections between resources that use persistent identifiers (PIDs) provided
|
384
|
+
by DataCite and others (Crossref, ORCID, ROR, ISNI, IGSN, etc.). Together
|
385
|
+
these resources and their connections form a graph, the PID Graph (Fenner
|
386
|
+
&amp; Aryani, 2019).Accessing information available in this PID Graph,
|
387
|
+
while preserving the rich connections...<\/p>","DOI":"10.53731\/r79sa71-97aq74v-ag4vc","type":"posted-content","created":{"date-parts":[[2021,10,17]],"date-time":"2021-10-17T19:03:27Z","timestamp":1634497407000},"source":"Crossref","is-referenced-by-count":2,"title":"The
|
388
|
+
DataCite GraphQL API is now open for (pre-release) business","prefix":"10.53731","author":[{"ORCID":"http:\/\/orcid.org\/0000-0003-1419-2405","authenticated-orcid":false,"given":"Martin","family":"Fenner","sequence":"first","affiliation":[]}],"member":"31795","reference":[{"key":"ref1","doi-asserted-by":"publisher","article-title":"Introducing
|
389
|
+
the PID Graph","year":"2019","DOI":"10.5438\/jwvf-8a66"}],"container-title":[],"original-title":[],"link":[{"URL":"https:\/\/blog.front-matter.io\/posts\/the-datacite-graphql-api-is-now-open-for-pre-release-business","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"}],"deposited":{"date-parts":[[2023,8,4]],"date-time":"2023-08-04T10:35:54Z","timestamp":1691145354000},"score":1,"resource":{"primary":{"URL":"https:\/\/blog.front-matter.io\/posts\/the-datacite-graphql-api-is-now-open-for-pre-release-business"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,5,15]]},"references-count":1,"URL":"http:\/\/dx.doi.org\/10.53731\/r79sa71-97aq74v-ag4vc","relation":{},"published":{"date-parts":[[2019,5,15]]},"subtype":"other"}'
|
390
|
+
recorded_at: Thu, 07 Sep 2023 17:36:00 GMT
|
391
|
+
- request:
|
392
|
+
method: get
|
393
|
+
uri: https://doi.org/10.5438/JWVF-8A66
|
394
|
+
body:
|
395
|
+
encoding: ASCII-8BIT
|
396
|
+
string: ''
|
397
|
+
headers:
|
398
|
+
Accept:
|
399
|
+
- application/vnd.citationstyles.csl+json
|
400
|
+
Connection:
|
401
|
+
- close
|
402
|
+
Host:
|
403
|
+
- doi.org
|
404
|
+
User-Agent:
|
405
|
+
- http.rb/5.1.1
|
406
|
+
response:
|
407
|
+
status:
|
408
|
+
code: 302
|
409
|
+
message: Found
|
410
|
+
headers:
|
411
|
+
Date:
|
412
|
+
- Thu, 07 Sep 2023 17:36:00 GMT
|
413
|
+
Content-Type:
|
414
|
+
- text/html;charset=utf-8
|
415
|
+
Content-Length:
|
416
|
+
- '177'
|
417
|
+
Connection:
|
418
|
+
- close
|
419
|
+
Location:
|
420
|
+
- https://data.crosscite.org/10.5438%2FJWVF-8A66
|
421
|
+
Vary:
|
422
|
+
- Accept
|
423
|
+
Expires:
|
424
|
+
- Thu, 07 Sep 2023 17:44:34 GMT
|
425
|
+
Permissions-Policy:
|
426
|
+
- interest-cohort=(),browsing-topics=()
|
427
|
+
Cf-Cache-Status:
|
428
|
+
- DYNAMIC
|
429
|
+
Report-To:
|
430
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=3iB1uDywSqUNWpodUeC3dOAys%2FNu8cFyAxhk5J3f3EyhZCXux0KKLqRcLXYwWnSNxCHATPkCFP31CPPslxRGFXA0plD5Ixt3eT3G4s3XjvqgSjXAnYluuHwK7Ak7beRPIU84NPM%3D"}],"group":"cf-nel","max_age":604800}'
|
431
|
+
Nel:
|
432
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
433
|
+
Strict-Transport-Security:
|
434
|
+
- max-age=31536000; includeSubDomains; preload
|
435
|
+
Server:
|
436
|
+
- cloudflare
|
437
|
+
Cf-Ray:
|
438
|
+
- 8030b623beb4d0d1-AMS
|
439
|
+
Alt-Svc:
|
440
|
+
- h3=":443"; ma=86400
|
441
|
+
body:
|
442
|
+
encoding: UTF-8
|
443
|
+
string: |-
|
444
|
+
<html><head><title>Handle Redirect</title></head>
|
445
|
+
<body><a href="https://data.crosscite.org/10.5438%2FJWVF-8A66">https://data.crosscite.org/10.5438%2FJWVF-8A66</a></body></html>
|
446
|
+
recorded_at: Thu, 07 Sep 2023 17:36:00 GMT
|
447
|
+
- request:
|
448
|
+
method: get
|
449
|
+
uri: https://data.crosscite.org/10.5438%2FJWVF-8A66
|
450
|
+
body:
|
451
|
+
encoding: ASCII-8BIT
|
452
|
+
string: ''
|
453
|
+
headers:
|
454
|
+
Accept:
|
455
|
+
- application/vnd.citationstyles.csl+json
|
456
|
+
Connection:
|
457
|
+
- close
|
458
|
+
User-Agent:
|
459
|
+
- http.rb/5.1.1
|
460
|
+
Host:
|
461
|
+
- data.crosscite.org
|
462
|
+
response:
|
463
|
+
status:
|
464
|
+
code: 200
|
465
|
+
message: OK
|
466
|
+
headers:
|
467
|
+
Date:
|
468
|
+
- Thu, 07 Sep 2023 17:36:00 GMT
|
469
|
+
Content-Type:
|
470
|
+
- application/vnd.citationstyles.csl+json; charset=utf-8
|
471
|
+
Transfer-Encoding:
|
472
|
+
- chunked
|
473
|
+
Connection:
|
474
|
+
- close
|
475
|
+
Status:
|
476
|
+
- 200 OK
|
477
|
+
Cache-Control:
|
478
|
+
- max-age=0, private, must-revalidate
|
479
|
+
Vary:
|
480
|
+
- Accept-Encoding, Origin
|
481
|
+
Etag:
|
482
|
+
- W/"9f25c07c85d932482bc11873f11231a1"
|
483
|
+
X-Runtime:
|
484
|
+
- '0.015986'
|
485
|
+
X-Request-Id:
|
486
|
+
- 667d6811-e325-47f9-85ec-9242f46ec29f
|
487
|
+
X-Powered-By:
|
488
|
+
- Phusion Passenger(R) 6.0.13
|
489
|
+
Server:
|
490
|
+
- nginx/1.18.0 + Phusion Passenger(R) 6.0.13
|
491
|
+
body:
|
492
|
+
encoding: UTF-8
|
493
|
+
string: |-
|
494
|
+
{
|
495
|
+
"type": "article-journal",
|
496
|
+
"id": "https://doi.org/10.5438/jwvf-8a66",
|
497
|
+
"categories": [
|
498
|
+
"pid graph",
|
499
|
+
"freya",
|
500
|
+
"FOS: Computer and information sciences"
|
501
|
+
],
|
502
|
+
"author": [
|
503
|
+
{
|
504
|
+
"family": "Fenner",
|
505
|
+
"given": "Martin"
|
506
|
+
},
|
507
|
+
{
|
508
|
+
"family": "Aryani",
|
509
|
+
"given": "Amir"
|
510
|
+
}
|
511
|
+
],
|
512
|
+
"issued": {
|
513
|
+
"date-parts": [
|
514
|
+
[
|
515
|
+
2019
|
516
|
+
]
|
517
|
+
]
|
518
|
+
},
|
519
|
+
"abstract": "<em>This post has been cross-posted from the FREYA blog.</em> Persistent identifiers (PIDs) are not only important to uniquely identify a publication, dataset, or person, but the metadata for these persistent identifiers can provide unambiguous linking between...",
|
520
|
+
"DOI": "10.5438/JWVF-8A66",
|
521
|
+
"publisher": "DataCite",
|
522
|
+
"title": "Introducing the PID Graph",
|
523
|
+
"URL": "https://datacite.org/blog/introducing-the-pid-graph/",
|
524
|
+
"copyright": "Creative Commons Attribution 4.0 International",
|
525
|
+
"version": "1.0"
|
526
|
+
}
|
527
|
+
recorded_at: Thu, 07 Sep 2023 17:36:00 GMT
|
528
|
+
- request:
|
529
|
+
method: head
|
530
|
+
uri: https://doi.org/10.5438/bv9z-dc66
|
531
|
+
body:
|
532
|
+
encoding: ASCII-8BIT
|
533
|
+
string: ''
|
534
|
+
headers:
|
535
|
+
Connection:
|
536
|
+
- close
|
537
|
+
Host:
|
538
|
+
- doi.org
|
539
|
+
User-Agent:
|
540
|
+
- http.rb/5.1.1
|
541
|
+
response:
|
542
|
+
status:
|
543
|
+
code: 302
|
544
|
+
message: Found
|
545
|
+
headers:
|
546
|
+
Date:
|
547
|
+
- Thu, 07 Sep 2023 17:36:01 GMT
|
548
|
+
Content-Type:
|
549
|
+
- text/html;charset=utf-8
|
550
|
+
Content-Length:
|
551
|
+
- '211'
|
552
|
+
Connection:
|
553
|
+
- close
|
554
|
+
Location:
|
555
|
+
- https://datacite.org/blog/tracking-the-growth-of-the-pid-graph/
|
556
|
+
Vary:
|
557
|
+
- Accept
|
558
|
+
Expires:
|
559
|
+
- Thu, 07 Sep 2023 18:20:43 GMT
|
560
|
+
Permissions-Policy:
|
561
|
+
- interest-cohort=(),browsing-topics=()
|
562
|
+
Cf-Cache-Status:
|
563
|
+
- DYNAMIC
|
564
|
+
Report-To:
|
565
|
+
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=k0kAB%2FD%2FpNiog%2Fn6sdV6VQ6b3a4z24FrTtoi0cKEQ3I4EiSg9s55jSykSMil1Hu1ie%2BqBTyCT%2F4EgGKcbef1uI3TvRPipYxdBOdS9NCCxtbYSt4wgqvMNJxkby%2FSV8OXGDKbEJc%3D"}],"group":"cf-nel","max_age":604800}'
|
566
|
+
Nel:
|
567
|
+
- '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}'
|
568
|
+
Strict-Transport-Security:
|
569
|
+
- max-age=31536000; includeSubDomains; preload
|
570
|
+
Server:
|
571
|
+
- cloudflare
|
572
|
+
Cf-Ray:
|
573
|
+
- 8030b6271f24b8e4-AMS
|
574
|
+
Alt-Svc:
|
575
|
+
- h3=":443"; ma=86400
|
576
|
+
body:
|
577
|
+
encoding: UTF-8
|
578
|
+
string: ''
|
579
|
+
recorded_at: Thu, 07 Sep 2023 17:36:01 GMT
|
580
|
+
recorded_with: VCR 6.2.0
|
@@ -79,6 +79,31 @@ describe Commonmeta::Metadata, vcr: true do
|
|
79
79
|
expect(subject.container).to eq("identifier" => "https://blog.front-matter.io", "identifierType" => "URL", "title" => "Front Matter", "type" => "Periodical")
|
80
80
|
end
|
81
81
|
|
82
|
+
it "ghost post with related_identifiers and funding" do
|
83
|
+
input = "https://rogue-scholar.org/api/posts/e58dc9c8-b870-4db2-8896-238b3246c551"
|
84
|
+
subject = described_class.new(input: input)
|
85
|
+
expect(subject.valid?).to be true
|
86
|
+
expect(subject.id).to eq("https://doi.org/10.53731/r79s4nh-97aq74v-ag4t1")
|
87
|
+
expect(subject.url).to eq("https://blog.front-matter.io/posts/tracking-the-growth-of-the-pid-graph")
|
88
|
+
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "e58dc9c8-b870-4db2-8896-238b3246c551", "alternateIdentifierType" => "UUID" }])
|
89
|
+
expect(subject.type).to eq("Article")
|
90
|
+
expect(subject.creators.length).to eq(1)
|
91
|
+
expect(subject.creators.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName" => "Fenner", "givenName" => "Martin", "type" => "Person")
|
92
|
+
expect(subject.titles).to eq([{ "title" => "Tracking the Growth of the PID Graph" }])
|
93
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
94
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
95
|
+
expect(subject.date).to eq("published" => "2019-07-01", "updated" => "2023-09-07")
|
96
|
+
expect(subject.descriptions.first["description"]).to start_with("The connections between scholarly resources generated by persistent identifiers (PIDs)")
|
97
|
+
expect(subject.publisher).to eq("name" => "Front Matter")
|
98
|
+
expect(subject.funding_references).to eq([{ "awardNumber" => "777523", "funderIdentifier"=>"http://doi.org/10.13039/501100000780", "funderName" => "European Commission" }])
|
99
|
+
expect(subject.related_identifiers).to eq([{ "id" => "https://doi.org/10.5438/bv9z-dc66", "type" => "IsIdenticalTo" }])
|
100
|
+
expect(subject.subjects).to eq([{ "subject" => "Computer and information sciences" },
|
101
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
102
|
+
"subject" => "FOS: Computer and information sciences",
|
103
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
104
|
+
expect(subject.language).to eq("en")
|
105
|
+
expect(subject.container).to eq("identifier" => "https://blog.front-matter.io", "identifierType" => "URL", "title" => "Front Matter", "type" => "Periodical")
|
106
|
+
end
|
82
107
|
it "ghost post without doi" do
|
83
108
|
input = "https://rogue-scholar.org/api/posts/c3095752-2af0-40a4-a229-3ceb7424bce2"
|
84
109
|
subject = described_class.new(input: input)
|
@@ -285,7 +310,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
285
310
|
expect(subject.type).to eq("Article")
|
286
311
|
expect(subject.creators.length).to eq(1)
|
287
312
|
expect(subject.creators.first).to eq("familyName" => "Karcher", "givenName" => "Sebastian",
|
288
|
-
|
313
|
+
"id" => "https://orcid.org/0000-0001-8249-7388", "type" => "Person")
|
289
314
|
expect(subject.titles).to eq([{ "title" => "Seeking Public Comment on CSL 1.0.2 Release" }])
|
290
315
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
291
316
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -323,6 +323,42 @@ describe Commonmeta::Metadata, vcr: true do
|
|
323
323
|
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
324
324
|
end
|
325
325
|
|
326
|
+
it "json_feed_item from rogue scholar with relations and funding" do
|
327
|
+
input = "https://rogue-scholar.org/api/posts/e58dc9c8-b870-4db2-8896-238b3246c551"
|
328
|
+
subject = described_class.new(input: input, doi: "10.53731/r79s4nh-97aq74v-ag4t1")
|
329
|
+
|
330
|
+
expect(subject.valid?).to be true
|
331
|
+
expect(subject.id).to eq("https://doi.org/10.53731/r79s4nh-97aq74v-ag4t1")
|
332
|
+
expect(subject.url).to eq("https://blog.front-matter.io/posts/tracking-the-growth-of-the-pid-graph")
|
333
|
+
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "e58dc9c8-b870-4db2-8896-238b3246c551", "alternateIdentifierType" => "UUID" }])
|
334
|
+
expect(subject.type).to eq("Article")
|
335
|
+
expect(subject.creators.length).to eq(1)
|
336
|
+
expect(subject.creators.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName" => "Fenner", "givenName" => "Martin", "type" => "Person")
|
337
|
+
expect(subject.titles).to eq([{ "title" => "Tracking the Growth of the PID Graph" }])
|
338
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
339
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
340
|
+
expect(subject.date).to eq("published" => "2019-07-01", "updated" => "2023-09-07")
|
341
|
+
expect(subject.descriptions.first["description"]).to start_with("The connections between scholarly resources generated by persistent identifiers (PIDs)")
|
342
|
+
expect(subject.publisher).to eq("name" => "Front Matter")
|
343
|
+
expect(subject.funding_references).to eq([{ "awardNumber" => "777523", "funderIdentifier"=>"http://doi.org/10.13039/501100000780", "funderName" => "European Commission" }])
|
344
|
+
expect(subject.related_identifiers).to eq([{ "id" => "https://doi.org/10.5438/bv9z-dc66", "type" => "IsIdenticalTo" }])
|
345
|
+
expect(subject.subjects).to eq([{ "subject" => "Computer and information sciences" },
|
346
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
347
|
+
"subject" => "FOS: Computer and information sciences",
|
348
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
349
|
+
expect(subject.language).to eq("en")
|
350
|
+
expect(subject.container).to eq("identifier" => "https://blog.front-matter.io", "identifierType" => "URL", "title" => "Front Matter", "type" => "Periodical")
|
351
|
+
# puts subject.crossref_xml
|
352
|
+
crossref_xml = Hash.from_xml(subject.crossref_xml).dig("doi_batch", "body", "posted_content")
|
353
|
+
expect(Array.wrap(crossref_xml.dig("contributors", "person_name")).length).to eq(1)
|
354
|
+
expect(Array.wrap(crossref_xml.dig("contributors",
|
355
|
+
"person_name")).first).to eq({"ORCID"=>"https://orcid.org/0000-0003-1419-2405", "contributor_role"=>"author", "given_name"=>"Martin", "sequence"=>"first", "surname"=>"Fenner"})
|
356
|
+
expect(crossref_xml.dig("titles",
|
357
|
+
"title")).to eq("Tracking the Growth of the PID Graph")
|
358
|
+
expect(crossref_xml.dig("item_number")).to eq("__content__" => "e58dc9c8b8704db28896238b3246c551", "item_number_type" => "uuid")
|
359
|
+
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
360
|
+
end
|
361
|
+
|
326
362
|
it "json_feed_item from rogue scholar with anonymous author" do
|
327
363
|
input = "https://rogue-scholar.org/api/posts/a163e340-5b3c-4736-9ab0-8c54fdff6a3c"
|
328
364
|
subject = described_class.new(input: input, doi: "10.59350/9ry27-7cz42")
|