commonmeta-py 0.81__py3-none-any.whl → 0.83__py3-none-any.whl
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.
- commonmeta/__init__.py +1 -1
- commonmeta/author_utils.py +1 -1
- commonmeta/readers/csl_reader.py +2 -2
- commonmeta/readers/json_feed_reader.py +2 -1
- commonmeta/resources/commonmeta_v0.16.json +602 -0
- commonmeta/schema_utils.py +1 -1
- commonmeta/writers/csl_writer.py +1 -1
- commonmeta/writers/inveniordm_writer.py +1 -0
- {commonmeta_py-0.81.dist-info → commonmeta_py-0.83.dist-info}/METADATA +2 -2
- {commonmeta_py-0.81.dist-info → commonmeta_py-0.83.dist-info}/RECORD +13 -12
- {commonmeta_py-0.81.dist-info → commonmeta_py-0.83.dist-info}/WHEEL +0 -0
- {commonmeta_py-0.81.dist-info → commonmeta_py-0.83.dist-info}/entry_points.txt +0 -0
- {commonmeta_py-0.81.dist-info → commonmeta_py-0.83.dist-info}/licenses/LICENSE +0 -0
commonmeta/__init__.py
CHANGED
commonmeta/author_utils.py
CHANGED
commonmeta/readers/csl_reader.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"""CSL-JSON reader for commonmeta-py"""
|
2
|
-
from ..utils import dict_to_spdx, from_csl, normalize_id, name_to_fos
|
2
|
+
from ..utils import dict_to_spdx, from_csl, normalize_id, name_to_fos, issn_as_url
|
3
3
|
from ..base_utils import wrap, compact, sanitize, presence
|
4
4
|
from ..author_utils import get_authors
|
5
5
|
from ..date_utils import get_date_from_date_parts
|
@@ -18,7 +18,7 @@ def read_csl(data: dict, **kwargs) -> Commonmeta:
|
|
18
18
|
|
19
19
|
read_options = kwargs or {}
|
20
20
|
|
21
|
-
_id = normalize_id(meta.get("id", None) or meta.get("DOI", None))
|
21
|
+
_id = normalize_id(meta.get("id", None) or meta.get("DOI", None)) or meta.get("id", None)
|
22
22
|
_type = CSL_TO_CM_TRANSLATIONS.get(meta.get("type", None), "Other")
|
23
23
|
|
24
24
|
# optionally generate a DOI if missing but a DOI prefix is provided
|
@@ -92,10 +92,11 @@ def read_json_feed_item(data: Optional[dict], **kwargs) -> Commonmeta:
|
|
92
92
|
)
|
93
93
|
container = compact(
|
94
94
|
{
|
95
|
-
"type": "
|
95
|
+
"type": "Blog",
|
96
96
|
"title": py_.get(meta, "blog.title", None),
|
97
97
|
"identifier": issn or blog_url,
|
98
98
|
"identifierType": "ISSN" if issn else "URL",
|
99
|
+
"platform": py_.get(meta, "blog.generator", None),
|
99
100
|
}
|
100
101
|
)
|
101
102
|
publisher = (
|
@@ -0,0 +1,602 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"$id": "https://commonmeta.org/commonmeta_v0.16.json",
|
4
|
+
"title": "Commonmeta v0.16",
|
5
|
+
"description": "JSON representation of the Commonmeta schema.",
|
6
|
+
"commonmeta": {
|
7
|
+
"anyOf": [
|
8
|
+
{ "$ref": "#/definitions/commonmeta"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"type": "array",
|
12
|
+
"description": "An array of commonmeta objects.",
|
13
|
+
"items": { "$ref": "#/definitions/commonmeta" }
|
14
|
+
}
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"definitions": {
|
18
|
+
"affiliations": {
|
19
|
+
"type": "array",
|
20
|
+
"items": {
|
21
|
+
"type": "object",
|
22
|
+
"properties": {
|
23
|
+
"organization": { "$ref": "#/definitions/organization" }
|
24
|
+
}
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"commonmeta": {
|
28
|
+
"description": "A commonmeta object.",
|
29
|
+
"type": "object",
|
30
|
+
"additionalProperties": false,
|
31
|
+
"properties": {
|
32
|
+
"id": { "$ref": "#/definitions/id" },
|
33
|
+
"type": { "$ref": "#/definitions/type" },
|
34
|
+
"additionalType": {
|
35
|
+
"description": "The additional type of the resource.",
|
36
|
+
"type": "string"
|
37
|
+
},
|
38
|
+
"archiveLocations": {
|
39
|
+
"description": "The location where content is archived.",
|
40
|
+
"type": "array",
|
41
|
+
"items": {
|
42
|
+
"type": "string",
|
43
|
+
"enum": [
|
44
|
+
"CLOCKSS",
|
45
|
+
"LOCKSS",
|
46
|
+
"Portico",
|
47
|
+
"KB",
|
48
|
+
"Internet Archive",
|
49
|
+
"DWT"
|
50
|
+
]
|
51
|
+
}
|
52
|
+
},
|
53
|
+
"container": {
|
54
|
+
"description": "The container of the resource.",
|
55
|
+
"type": "object",
|
56
|
+
"properties": {
|
57
|
+
"identifier": {
|
58
|
+
"description": "The identifier for the container.",
|
59
|
+
"type": "string"
|
60
|
+
},
|
61
|
+
"identifierType": {
|
62
|
+
"description": "The identifierType for the container.",
|
63
|
+
"type": "string"
|
64
|
+
},
|
65
|
+
"type": {
|
66
|
+
"description": "The type of the container.",
|
67
|
+
"type": "string",
|
68
|
+
"enum": [
|
69
|
+
"Blog",
|
70
|
+
"Book",
|
71
|
+
"BookSeries",
|
72
|
+
"Journal",
|
73
|
+
"Proceedings",
|
74
|
+
"ProceedingsSeries",
|
75
|
+
"Repository",
|
76
|
+
"DataRepository",
|
77
|
+
"Periodical",
|
78
|
+
"Series"
|
79
|
+
]
|
80
|
+
},
|
81
|
+
"title": {
|
82
|
+
"description": "The title of the container.",
|
83
|
+
"type": "string"
|
84
|
+
},
|
85
|
+
"description": {
|
86
|
+
"description": "The description of the container.",
|
87
|
+
"type": "string"
|
88
|
+
},
|
89
|
+
"language": {
|
90
|
+
"description": "The language of the container. Use one of the language codes from the IETF BCP 47 standard.",
|
91
|
+
"type": "string"
|
92
|
+
},
|
93
|
+
"license": {
|
94
|
+
"description": "The license for the container. Use one of the SPDX license identifiers.",
|
95
|
+
"type": "object",
|
96
|
+
"properties": {
|
97
|
+
"id": { "type": "string" },
|
98
|
+
"url": { "type": "string", "format": "uri" }
|
99
|
+
}
|
100
|
+
},
|
101
|
+
"platform": {
|
102
|
+
"description": "The platform of the container.",
|
103
|
+
"type": "string"
|
104
|
+
},
|
105
|
+
"favicon": {
|
106
|
+
"description": "The icon of the container.",
|
107
|
+
"type": "string",
|
108
|
+
"format": "uri"
|
109
|
+
},
|
110
|
+
"firstPage": {
|
111
|
+
"description": "The first page of the resource.",
|
112
|
+
"type": "string"
|
113
|
+
},
|
114
|
+
"lastPage": {
|
115
|
+
"description": "The last page of the resource.",
|
116
|
+
"type": "string"
|
117
|
+
},
|
118
|
+
"volume": {
|
119
|
+
"description": "The volume of the resource.",
|
120
|
+
"type": "string"
|
121
|
+
},
|
122
|
+
"issue": {
|
123
|
+
"description": "The issue of the resource.",
|
124
|
+
"type": "string"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
},
|
128
|
+
"contributors": {
|
129
|
+
"description": "The contributors to the resource.",
|
130
|
+
"type": "array",
|
131
|
+
"items": {
|
132
|
+
"type": "object",
|
133
|
+
"properties": {
|
134
|
+
"organization": { "$ref": "#/definitions/organization" },
|
135
|
+
"person": { "$ref": "#/definitions/person" },
|
136
|
+
"contributorRoles": {
|
137
|
+
"description": "List of roles assumed by the contributor when working on the resource.",
|
138
|
+
"items": {
|
139
|
+
"$ref": "#/definitions/contributorRole"
|
140
|
+
},
|
141
|
+
"type": "array"
|
142
|
+
}
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"minItems": 1
|
146
|
+
},
|
147
|
+
"date": {
|
148
|
+
"description": "The dates for the resource.",
|
149
|
+
"$comment": "The date fields are not required. Dates should be formatted as ISO 8601 dates.",
|
150
|
+
"type": "object",
|
151
|
+
"properties": {
|
152
|
+
"created": {
|
153
|
+
"description": "The date the resource was created.",
|
154
|
+
"type": "string"
|
155
|
+
},
|
156
|
+
"submitted": {
|
157
|
+
"description": "The date the resource was submitted.",
|
158
|
+
"type": "string"
|
159
|
+
},
|
160
|
+
"accepted": {
|
161
|
+
"description": "The date the resource was accepted.",
|
162
|
+
"type": "string"
|
163
|
+
},
|
164
|
+
"published": {
|
165
|
+
"description": "The date the resource was published.",
|
166
|
+
"type": "string"
|
167
|
+
},
|
168
|
+
"updated": {
|
169
|
+
"description": "The date the resource was updated.",
|
170
|
+
"type": "string"
|
171
|
+
},
|
172
|
+
"accessed": {
|
173
|
+
"description": "The date the resource was accessed.",
|
174
|
+
"type": "string"
|
175
|
+
},
|
176
|
+
"available": {
|
177
|
+
"description": "The date the resource was made available.",
|
178
|
+
"type": "string"
|
179
|
+
},
|
180
|
+
"withdrawn": {
|
181
|
+
"description": "The date the resource was withdrawn.",
|
182
|
+
"type": "string"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
},
|
186
|
+
"descriptions": {
|
187
|
+
"description": "The descriptions of the resource.",
|
188
|
+
"type": "array",
|
189
|
+
"items": {
|
190
|
+
"type": "object",
|
191
|
+
"properties": {
|
192
|
+
"description": {
|
193
|
+
"description": "The description of the resource.",
|
194
|
+
"type": "string"
|
195
|
+
},
|
196
|
+
"type": {
|
197
|
+
"description": "The type of the description.",
|
198
|
+
"type": "string",
|
199
|
+
"enum": ["Abstract", "Summary", "Methods", "TechnicalInfo", "Other"]
|
200
|
+
},
|
201
|
+
"language": {
|
202
|
+
"description": "The language of the title. Use one of the language codes from the IETF BCP 47 standard.",
|
203
|
+
"type": "string"
|
204
|
+
}
|
205
|
+
},
|
206
|
+
"required": ["description"]
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"files": {
|
210
|
+
"description": "The downloadable files for the resource.",
|
211
|
+
"type": "array",
|
212
|
+
"items": {
|
213
|
+
"type": "object",
|
214
|
+
"properties": {
|
215
|
+
"bucket": { "type": "string" },
|
216
|
+
"key": { "type": "string" },
|
217
|
+
"checksum": { "type": "string" },
|
218
|
+
"url": { "type": "string", "format": "uri" },
|
219
|
+
"size": { "type": "integer" },
|
220
|
+
"mimeType": { "type": "string" }
|
221
|
+
},
|
222
|
+
"required": ["url"]
|
223
|
+
},
|
224
|
+
"minItems": 1
|
225
|
+
},
|
226
|
+
"fundingReferences": {
|
227
|
+
"description": "The funding references for the resource.",
|
228
|
+
"type": "array",
|
229
|
+
"items": {
|
230
|
+
"type": "object",
|
231
|
+
"properties": {
|
232
|
+
"funderIdentifier": { "type": "string" },
|
233
|
+
"funderIdentifierType": {
|
234
|
+
"type": "string",
|
235
|
+
"enum": [
|
236
|
+
"Crossref Funder ID",
|
237
|
+
"ROR",
|
238
|
+
"GRID",
|
239
|
+
"ISNI",
|
240
|
+
"Ringgold",
|
241
|
+
"Other"
|
242
|
+
]
|
243
|
+
},
|
244
|
+
"funderName": { "type": "string" },
|
245
|
+
"awardNumber": { "type": "string" },
|
246
|
+
"awardTitle": { "type": "string" },
|
247
|
+
"awardUri": { "type": "string", "format": "uri" }
|
248
|
+
},
|
249
|
+
"required": ["funderName"]
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"geoLocations": {
|
253
|
+
"type": "array",
|
254
|
+
"items": {
|
255
|
+
"type": "object",
|
256
|
+
"properties": {
|
257
|
+
"geoLocationPlace": { "type": "string" },
|
258
|
+
"geoLocationPoint": { "$ref": "#/definitions/geoLocationPoint" },
|
259
|
+
"geoLocationBox": { "$ref": "#/definitions/geoLocationBox" },
|
260
|
+
"geoLocationPolygons": {
|
261
|
+
"type": "array",
|
262
|
+
"items": {
|
263
|
+
"type": "object",
|
264
|
+
"properties": {
|
265
|
+
"polygonPoints": {
|
266
|
+
"type": "array",
|
267
|
+
"items": { "$ref": "#/definitions/geoLocationPoint" },
|
268
|
+
"minItems": 4
|
269
|
+
},
|
270
|
+
"inPolygonPoint": { "$ref": "#/definitions/geoLocationPoint" }
|
271
|
+
},
|
272
|
+
"required": ["polygonPoints"]
|
273
|
+
},
|
274
|
+
"uniqueItems": true
|
275
|
+
}
|
276
|
+
}
|
277
|
+
},
|
278
|
+
"uniqueItems": true
|
279
|
+
},
|
280
|
+
"identifiers": {
|
281
|
+
"description": "Identifiers for the resource, including the id.",
|
282
|
+
"type": "array",
|
283
|
+
"items": {
|
284
|
+
"type": "object",
|
285
|
+
"properties": {
|
286
|
+
"identifier": { "type": "string" },
|
287
|
+
"identifierType": {
|
288
|
+
"type": "string",
|
289
|
+
"enum": [
|
290
|
+
"ARK",
|
291
|
+
"arXiv",
|
292
|
+
"Bibcode",
|
293
|
+
"DOI",
|
294
|
+
"Handle",
|
295
|
+
"ISBN",
|
296
|
+
"ISSN",
|
297
|
+
"PMID",
|
298
|
+
"PMCID",
|
299
|
+
"PURL",
|
300
|
+
"URL",
|
301
|
+
"URN",
|
302
|
+
"UUID",
|
303
|
+
"GUID",
|
304
|
+
"Other"
|
305
|
+
]
|
306
|
+
}
|
307
|
+
},
|
308
|
+
"required": ["identifier", "identifierType"]
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"language": {
|
312
|
+
"description": "The language of the resource. Use one of the language codes from the IETF BCP 47 standard.",
|
313
|
+
"type": "string"
|
314
|
+
},
|
315
|
+
"license": {
|
316
|
+
"description": "The license for the resource. Use one of the SPDX license identifiers.",
|
317
|
+
"type": "object",
|
318
|
+
"properties": {
|
319
|
+
"id": { "type": "string" },
|
320
|
+
"url": { "type": "string", "format": "uri" }
|
321
|
+
}
|
322
|
+
},
|
323
|
+
"provider": {
|
324
|
+
"description": "The provider of the resource. This can be a DOI registration agency or a repository.",
|
325
|
+
"type": "string",
|
326
|
+
"enum": ["Crossref", "DataCite", "GitHub", "JaLC", "KISTI", "mEDRA", "OP"]
|
327
|
+
},
|
328
|
+
"publisher": {
|
329
|
+
"description": "The publisher of the resource.",
|
330
|
+
"type": "object",
|
331
|
+
"properties": {
|
332
|
+
"organization": { "$ref": "#/definitions/organization" }
|
333
|
+
}
|
334
|
+
},
|
335
|
+
"relations": {
|
336
|
+
"description": "Other resolvable persistent unique IDs related to the resource.",
|
337
|
+
"type": "array",
|
338
|
+
"items": {
|
339
|
+
"type": "object",
|
340
|
+
"properties": {
|
341
|
+
"id": {
|
342
|
+
"type": "string",
|
343
|
+
"format": "uri"
|
344
|
+
},
|
345
|
+
"type": {
|
346
|
+
"type": "string",
|
347
|
+
"enum": [
|
348
|
+
"IsNewVersionOf",
|
349
|
+
"IsPreviousVersionOf",
|
350
|
+
"IsVersionOf",
|
351
|
+
"HasVersion",
|
352
|
+
"IsPartOf",
|
353
|
+
"HasPart",
|
354
|
+
"IsVariantFormOf",
|
355
|
+
"IsOriginalFormOf",
|
356
|
+
"IsIdenticalTo",
|
357
|
+
"IsTranslationOf",
|
358
|
+
"HasTranslation",
|
359
|
+
"IsReviewedBy",
|
360
|
+
"Reviews",
|
361
|
+
"HasReview",
|
362
|
+
"IsPreprintOf",
|
363
|
+
"HasPreprint",
|
364
|
+
"IsSupplementTo",
|
365
|
+
"IsSupplementedBy"
|
366
|
+
]
|
367
|
+
}
|
368
|
+
},
|
369
|
+
"required": ["id", "type"]
|
370
|
+
},
|
371
|
+
"minItems": 1
|
372
|
+
},
|
373
|
+
"references": {
|
374
|
+
"type": "array",
|
375
|
+
"items": {
|
376
|
+
"type": "object",
|
377
|
+
"properties": {
|
378
|
+
"id": { "$ref": "#/definitions/id" },
|
379
|
+
"type": { "$ref": "#/definitions/type" },
|
380
|
+
"key": { "type": "string" },
|
381
|
+
"contributor": { "type": "string" },
|
382
|
+
"title": { "type": "string" },
|
383
|
+
"publisher": { "type": "string" },
|
384
|
+
"publicationYear": { "type": "string" },
|
385
|
+
"volume": { "type": "string" },
|
386
|
+
"issue": { "type": "string" },
|
387
|
+
"firstPage": { "type": "string" },
|
388
|
+
"lastPage": { "type": "string" },
|
389
|
+
"containerTitle": { "type": "string" },
|
390
|
+
"edition": { "type": "string" },
|
391
|
+
"unstructured": { "type": "string" }
|
392
|
+
},
|
393
|
+
"required": ["key"]
|
394
|
+
}
|
395
|
+
},
|
396
|
+
"subjects": {
|
397
|
+
"type": "array",
|
398
|
+
"items": {
|
399
|
+
"type": "object",
|
400
|
+
"properties": {
|
401
|
+
"subject": { "type": "string" },
|
402
|
+
"language": {
|
403
|
+
"description": "The language of the subject. Use one of the language codes from the IETF BCP 47 standard.",
|
404
|
+
"type": "string"
|
405
|
+
}
|
406
|
+
},
|
407
|
+
"required": ["subject"]
|
408
|
+
}
|
409
|
+
},
|
410
|
+
"titles": {
|
411
|
+
"description": "The titles of the resource.",
|
412
|
+
"type": "array",
|
413
|
+
"items": {
|
414
|
+
"type": "object",
|
415
|
+
"properties": {
|
416
|
+
"title": {
|
417
|
+
"description": "The title of the resource.",
|
418
|
+
"type": "string"
|
419
|
+
},
|
420
|
+
"type": {
|
421
|
+
"description": "The type of the title.",
|
422
|
+
"type": "string",
|
423
|
+
"enum": ["AlternativeTitle", "Subtitle", "TranslatedTitle"]
|
424
|
+
},
|
425
|
+
"language": {
|
426
|
+
"description": "The language of the title. Use one of the language codes from the IETF BCP 47 standard.",
|
427
|
+
"type": "string"
|
428
|
+
}
|
429
|
+
},
|
430
|
+
"required": ["title"]
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"url": {
|
434
|
+
"description": "The URL of the resource.",
|
435
|
+
"type": "string",
|
436
|
+
"format": "uri"
|
437
|
+
},
|
438
|
+
"version": {
|
439
|
+
"description": "The version of the resource.",
|
440
|
+
"type": "string"
|
441
|
+
}
|
442
|
+
},
|
443
|
+
"required": ["id", "type"]
|
444
|
+
},
|
445
|
+
"contributorRole": {
|
446
|
+
"description": "The type of contribution made by a contributor",
|
447
|
+
"enum": [
|
448
|
+
"Author",
|
449
|
+
"Editor",
|
450
|
+
"Chair",
|
451
|
+
"Reviewer",
|
452
|
+
"ReviewAssistant",
|
453
|
+
"StatsReviewer",
|
454
|
+
"ReviewerExternal",
|
455
|
+
"Reader",
|
456
|
+
"Translator",
|
457
|
+
"ContactPerson",
|
458
|
+
"DataCollector",
|
459
|
+
"DataManager",
|
460
|
+
"Distributor",
|
461
|
+
"HostingInstitution",
|
462
|
+
"Producer",
|
463
|
+
"ProjectLeader",
|
464
|
+
"ProjectManager",
|
465
|
+
"ProjectMember",
|
466
|
+
"RegistrationAgency",
|
467
|
+
"RegistrationAuthority",
|
468
|
+
"RelatedPerson",
|
469
|
+
"ResearchGroup",
|
470
|
+
"RightsHolder",
|
471
|
+
"Researcher",
|
472
|
+
"Sponsor",
|
473
|
+
"WorkPackageLeader",
|
474
|
+
"Conceptualization",
|
475
|
+
"DataCuration",
|
476
|
+
"FormalAnalysis",
|
477
|
+
"FundingAcquisition",
|
478
|
+
"Investigation",
|
479
|
+
"Methodology",
|
480
|
+
"ProjectAdministration",
|
481
|
+
"Resources",
|
482
|
+
"Software",
|
483
|
+
"Supervision",
|
484
|
+
"Validation",
|
485
|
+
"Visualization",
|
486
|
+
"WritingOriginalDraft",
|
487
|
+
"WritingReviewEditing",
|
488
|
+
"Maintainer",
|
489
|
+
"Other"
|
490
|
+
],
|
491
|
+
"type": "string"
|
492
|
+
},
|
493
|
+
"geoLocationBox": {
|
494
|
+
"type": "object",
|
495
|
+
"properties": {
|
496
|
+
"westBoundLongitude": { "$ref": "#/definitions/longitude" },
|
497
|
+
"eastBoundLongitude": { "$ref": "#/definitions/longitude" },
|
498
|
+
"southBoundLatitude": { "$ref": "#/definitions/latitude" },
|
499
|
+
"northBoundLatitude": { "$ref": "#/definitions/latitude" }
|
500
|
+
}
|
501
|
+
},
|
502
|
+
"geoLocationPoint": {
|
503
|
+
"type": "object",
|
504
|
+
"properties": {
|
505
|
+
"pointLongitude": { "$ref": "#/definitions/longitude" },
|
506
|
+
"pointLatitude": { "$ref": "#/definitions/latitude" }
|
507
|
+
}
|
508
|
+
},
|
509
|
+
"id": {
|
510
|
+
"description": "The unique identifier for the resource.",
|
511
|
+
"type": "string",
|
512
|
+
"format": "uri"
|
513
|
+
},
|
514
|
+
"latitude": {
|
515
|
+
"type": "number",
|
516
|
+
"minimum": -90,
|
517
|
+
"maximum": 90
|
518
|
+
},
|
519
|
+
"longitude": {
|
520
|
+
"type": "number",
|
521
|
+
"minimum": -180,
|
522
|
+
"maximum": 180
|
523
|
+
},
|
524
|
+
"organization": {
|
525
|
+
"type": "object",
|
526
|
+
"properties": {
|
527
|
+
"id": {
|
528
|
+
"description": "The unique identifier for the organization.",
|
529
|
+
"type": "string",
|
530
|
+
"format": "uri"
|
531
|
+
},
|
532
|
+
"type": { "type": "string", "const": "Organization" },
|
533
|
+
"name": {
|
534
|
+
"description": "The name of the organization.",
|
535
|
+
"type": "string"
|
536
|
+
}
|
537
|
+
},
|
538
|
+
"required": ["name", "type"]
|
539
|
+
},
|
540
|
+
"person": {
|
541
|
+
"type": "object",
|
542
|
+
"properties": {
|
543
|
+
"id": { "type": "string", "format": "uri" },
|
544
|
+
"type": { "type": "string", "const": "Person" },
|
545
|
+
"givenName": {
|
546
|
+
"description": "The given name of the person.",
|
547
|
+
"type": "string"
|
548
|
+
},
|
549
|
+
"familyName": {
|
550
|
+
"description": "The family name of the person.",
|
551
|
+
"type": "string"
|
552
|
+
},
|
553
|
+
"affiliation": { "$ref": "#/definitions/affiliations" }
|
554
|
+
},
|
555
|
+
"required": ["familyName", "type"]
|
556
|
+
},
|
557
|
+
"type": {
|
558
|
+
"type": "string",
|
559
|
+
"enum": [
|
560
|
+
"Article",
|
561
|
+
"Audiovisual",
|
562
|
+
"BlogPost",
|
563
|
+
"BookChapter",
|
564
|
+
"BookPart",
|
565
|
+
"BookSection",
|
566
|
+
"BookSeries",
|
567
|
+
"BookSet",
|
568
|
+
"Book",
|
569
|
+
"Collection",
|
570
|
+
"Component",
|
571
|
+
"Database",
|
572
|
+
"Dataset",
|
573
|
+
"Dissertation",
|
574
|
+
"Document",
|
575
|
+
"Entry",
|
576
|
+
"Event",
|
577
|
+
"Grant",
|
578
|
+
"Image",
|
579
|
+
"Instrument",
|
580
|
+
"InteractiveResource",
|
581
|
+
"JournalArticle",
|
582
|
+
"JournalIssue",
|
583
|
+
"JournalVolume",
|
584
|
+
"Journal",
|
585
|
+
"PeerReview",
|
586
|
+
"PhysicalObject",
|
587
|
+
"Presentation",
|
588
|
+
"ProceedingsArticle",
|
589
|
+
"ProceedingsSeries",
|
590
|
+
"Proceedings",
|
591
|
+
"ReportComponent",
|
592
|
+
"ReportSeries",
|
593
|
+
"Report",
|
594
|
+
"Software",
|
595
|
+
"Standard",
|
596
|
+
"StudyRegistration",
|
597
|
+
"WebPage",
|
598
|
+
"Other"
|
599
|
+
]
|
600
|
+
}
|
601
|
+
}
|
602
|
+
}
|
commonmeta/schema_utils.py
CHANGED
@@ -7,7 +7,7 @@ from jsonschema import Draft202012Validator, ValidationError
|
|
7
7
|
def json_schema_errors(instance, schema: str = "commonmeta"):
|
8
8
|
"""validate against JSON schema"""
|
9
9
|
schema_map = {
|
10
|
-
"commonmeta": "commonmeta_v0.
|
10
|
+
"commonmeta": "commonmeta_v0.16",
|
11
11
|
"datacite": "datacite-v4.5",
|
12
12
|
"crossref": "crossref-v0.2",
|
13
13
|
"csl": "csl-data",
|
commonmeta/writers/csl_writer.py
CHANGED
@@ -64,7 +64,7 @@ def write_csl_item(metadata) -> Optional[dict]:
|
|
64
64
|
"container-title": container.get("title", None),
|
65
65
|
"volume": container.get("volume", None),
|
66
66
|
"issue": container.get("issue", None),
|
67
|
-
"page": pages_as_string(container),
|
67
|
+
"page": presence(pages_as_string(container)),
|
68
68
|
"publisher": publisher.get("name", None),
|
69
69
|
"title": parse_attributes(metadata.titles, content="title", first=True),
|
70
70
|
"copyright": metadata.license.get("id", None) if metadata.license else None,
|
@@ -136,6 +136,7 @@ def write_inveniordm(metadata):
|
|
136
136
|
"journal:journal": compact({"title": journal, "issn": issn}),
|
137
137
|
"rs:content_text": presence(metadata.content),
|
138
138
|
"rs:image": presence(metadata.image),
|
139
|
+
"rs:generator": container.get("platform", None),
|
139
140
|
}
|
140
141
|
),
|
141
142
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: commonmeta-py
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.83
|
4
4
|
Summary: Library for conversions to/from the Commonmeta scholarly metadata format
|
5
5
|
Project-URL: Homepage, https://python.commonmeta.org
|
6
6
|
Project-URL: Repository, https://github.com/front-matter/commonmeta-py
|
@@ -17,7 +17,7 @@ Requires-Dist: base32-lib~=1.0
|
|
17
17
|
Requires-Dist: beautifulsoup4~=4.11
|
18
18
|
Requires-Dist: bibtexparser~=1.4
|
19
19
|
Requires-Dist: citeproc-py-styles>0.1
|
20
|
-
Requires-Dist: citeproc-py<0.
|
20
|
+
Requires-Dist: citeproc-py<0.8,>=0.6
|
21
21
|
Requires-Dist: click<9,>=8.1.7
|
22
22
|
Requires-Dist: datacite~=1.1
|
23
23
|
Requires-Dist: dateparser<2,>=1.1.7
|
@@ -1,6 +1,6 @@
|
|
1
|
-
commonmeta/__init__.py,sha256=
|
1
|
+
commonmeta/__init__.py,sha256=vJ0pyWqYKkC9bJvdQFwaRcnJXg8mBcKastayvMRG2cM,1894
|
2
2
|
commonmeta/api_utils.py,sha256=-ZHGVZZhJqnjnsLtp4-PoeHYbDqL0cQme7W70BEjo4U,2677
|
3
|
-
commonmeta/author_utils.py,sha256=
|
3
|
+
commonmeta/author_utils.py,sha256=1oQQfxaq7aMQI3rLt8XMufksuBeC8Zht96aJ8vz09Ug,8459
|
4
4
|
commonmeta/base_utils.py,sha256=AsUElA5kT2fw_Osy7Uaj2F6MKeq9yB7d5f2V-h2lh7c,3750
|
5
5
|
commonmeta/cli.py,sha256=sOI9BJTePnljVcXcZ95N7TKXDT283XpjUaak7bMnbr0,6076
|
6
6
|
commonmeta/constants.py,sha256=50ubqc34mqDPXp_bI--rEOoXFiNF4mz_V66lk8FsxL4,18348
|
@@ -8,7 +8,7 @@ commonmeta/crossref_utils.py,sha256=ijcdAdV2HHUXP2twIKIQP9Ln2xsysU3n9nwQDg-ZAxU,
|
|
8
8
|
commonmeta/date_utils.py,sha256=rJRV4YmWKQWU__iAV8www3cqwaefC0iRKyHwvxrr_XY,6316
|
9
9
|
commonmeta/doi_utils.py,sha256=s2J95V9rWPbGsh5oNXht3yJkJ0NmVLRlOXDPXjnN-Ck,9152
|
10
10
|
commonmeta/metadata.py,sha256=cjvCcxW1FMtKCbNKan0zXX0FN6z5orHFGPYsgkp6fSI,12480
|
11
|
-
commonmeta/schema_utils.py,sha256=
|
11
|
+
commonmeta/schema_utils.py,sha256=2DmwMAcasmNa0xBdxxeS6bIvoHz63sODk_ja5UYFTqk,915
|
12
12
|
commonmeta/translators.py,sha256=RpGJtKNLjmz41VREZDY7KyyE2eXOi8j7m-da4jHmknI,1362
|
13
13
|
commonmeta/utils.py,sha256=nWSdkc1jNkhSnv46MKScExOUlD--wMP_QCRpy8Rnq_g,44989
|
14
14
|
commonmeta/readers/__init__.py,sha256=vOf7UsOKNoh_ZCuyexxhAmPMt8wjB-pF_CfpWRaN8pk,45
|
@@ -18,11 +18,11 @@ commonmeta/readers/codemeta_reader.py,sha256=efv2V1WPfdrKLQNxgSvoripdWqS2M6CwXWS
|
|
18
18
|
commonmeta/readers/commonmeta_reader.py,sha256=gNjdsJ-671-pXmBdzy1NybkQ29q9_qtorFoK2D-zStA,302
|
19
19
|
commonmeta/readers/crossref_reader.py,sha256=msx127UIcu6ksFd8Wiay4YXK6dEKFO0kOFJS8_r9Nw0,12560
|
20
20
|
commonmeta/readers/crossref_xml_reader.py,sha256=yZOh66_4tVS5i0TdEyOa48ckpl7_cj69hfZnaA9pjM8,18723
|
21
|
-
commonmeta/readers/csl_reader.py,sha256=
|
21
|
+
commonmeta/readers/csl_reader.py,sha256=ynqJeqK9TlHFsmgMREPmKGlcj6tVycpnqDN0N0LjIpw,3201
|
22
22
|
commonmeta/readers/datacite_reader.py,sha256=CdOtxhthrakBoQMsLTdPx6sUCmqtEWo5ICYE6ZsWDdo,12026
|
23
23
|
commonmeta/readers/datacite_xml_reader.py,sha256=nhnO92fZihr1HZlbXjyem-HJXc9_DWLgJ2zeltuPMIg,13041
|
24
24
|
commonmeta/readers/inveniordm_reader.py,sha256=uS92St68UkO4Adh3PsCu9ox81aO0kek3Y0vneBSDkts,7584
|
25
|
-
commonmeta/readers/json_feed_reader.py,sha256=
|
25
|
+
commonmeta/readers/json_feed_reader.py,sha256=x29DpOXaHqtYTTow7fnx3TVBcI_585VA3OMucqlKu94,13443
|
26
26
|
commonmeta/readers/kbase_reader.py,sha256=ehKXQsJyPCtaq2FmBxNb2Jb5Nktpx8pNscpmEM6N0A4,6763
|
27
27
|
commonmeta/readers/ris_reader.py,sha256=v6qOd-i2OcMTEFy5RGd3MlYthJcYSU6yzmZ5yHDzmII,3677
|
28
28
|
commonmeta/readers/schema_org_reader.py,sha256=biN5SZFl744mpoSWh-kIOiJPkAVrdythzs_m4P6t5VM,17159
|
@@ -31,6 +31,7 @@ commonmeta/resources/commonmeta_v0.12.json,sha256=HUSNReXh2JN3Q6YWSt7CE69js8dh50
|
|
31
31
|
commonmeta/resources/commonmeta_v0.13.json,sha256=2-WSZGijR13zVu97S_YHXr-cyeLW7hzHXYMlr6nIjdw,15787
|
32
32
|
commonmeta/resources/commonmeta_v0.14.json,sha256=nACmkTe4IrZkygd5AeJnAv9P4EWfzCwW9oL5AhubvnE,17657
|
33
33
|
commonmeta/resources/commonmeta_v0.15.json,sha256=kC9xmtIwrGpl7V1vcXKWthWejYvtKfqOqenBCRSjANc,17753
|
34
|
+
commonmeta/resources/commonmeta_v0.16.json,sha256=uncnHMlGfMozKOixHjII4WTOqcU_wxbbKEwRTnjL2vY,18737
|
34
35
|
commonmeta/resources/crossref-v0.2.json,sha256=THbFem4IDSE-TFNOtP1-NOmZhED2dlLBso9RdGMbGIY,1431
|
35
36
|
commonmeta/resources/csl-data.json,sha256=I7LAYtdSYGD0YxuwS0s7ojfkiEhCU-MnvQD6aRhhuBE,12222
|
36
37
|
commonmeta/resources/datacite-v4.5.json,sha256=ocpQNSbORPJf5Ogidy6M6EHundgv7DSgIqRco02KgM4,18970
|
@@ -64,13 +65,13 @@ commonmeta/writers/bibtex_writer.py,sha256=s3hIJIgWvSG7TAriZMRQEAyuitw6ebwWSI1Yc
|
|
64
65
|
commonmeta/writers/citation_writer.py,sha256=RjaNh9EALxq6gfODLRWVJxGxPArGd6ZiHUlkYnCT6MA,2355
|
65
66
|
commonmeta/writers/commonmeta_writer.py,sha256=mu-yXQvQs_xdYM4MxbTTxxYB5n0lJA5BqiYfRPV562Q,1870
|
66
67
|
commonmeta/writers/crossref_xml_writer.py,sha256=0Ds494RnXfdfjWw5CLX1kwV2zP7gqffdVqO-X74Uc6c,492
|
67
|
-
commonmeta/writers/csl_writer.py,sha256=
|
68
|
+
commonmeta/writers/csl_writer.py,sha256=W3lryCg4TwXEoBuNhEc2GdU6fe1OrDZ37s1-0h1IGzc,2807
|
68
69
|
commonmeta/writers/datacite_writer.py,sha256=UpDp4Brg5xrmS5T3QYoNi6PPXKdRxAo254eTqnlmNyQ,6304
|
69
|
-
commonmeta/writers/inveniordm_writer.py,sha256=
|
70
|
+
commonmeta/writers/inveniordm_writer.py,sha256=HGls-uIiljJXnfqmv6argWgDLbCNLEI2gEa6bdAvj7s,11507
|
70
71
|
commonmeta/writers/ris_writer.py,sha256=AcnCszS3WY9lF594NbFBtLylsA8ownnYp_XLQJ84Ios,2093
|
71
72
|
commonmeta/writers/schema_org_writer.py,sha256=5j002uCNLdlScZMNQmPjodcVWqaBh2z38zL1H4lo2hY,5741
|
72
|
-
commonmeta_py-0.
|
73
|
-
commonmeta_py-0.
|
74
|
-
commonmeta_py-0.
|
75
|
-
commonmeta_py-0.
|
76
|
-
commonmeta_py-0.
|
73
|
+
commonmeta_py-0.83.dist-info/METADATA,sha256=xZgK19olj55b6rCCbT0b9TYtSVabgVXUJcj26nV-h3I,7739
|
74
|
+
commonmeta_py-0.83.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
75
|
+
commonmeta_py-0.83.dist-info/entry_points.txt,sha256=U4w4BoRuS3rN5t5Y-uYSyOeU5Lh_VRVMS9OIDzIgw4w,50
|
76
|
+
commonmeta_py-0.83.dist-info/licenses/LICENSE,sha256=746hEF2wZCKkcckk5-_DcBLtHewfaEMS4iXTlA1PVwk,1074
|
77
|
+
commonmeta_py-0.83.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|