commonmeta-py 0.23__py3-none-any.whl → 0.24__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.
Files changed (76) hide show
  1. commonmeta/__init__.py +96 -0
  2. commonmeta/api_utils.py +77 -0
  3. commonmeta/author_utils.py +260 -0
  4. commonmeta/base_utils.py +121 -0
  5. commonmeta/cli.py +200 -0
  6. commonmeta/constants.py +587 -0
  7. commonmeta/crossref_utils.py +575 -0
  8. commonmeta/date_utils.py +193 -0
  9. commonmeta/doi_utils.py +273 -0
  10. commonmeta/metadata.py +320 -0
  11. commonmeta/readers/__init__.py +1 -0
  12. commonmeta/readers/cff_reader.py +199 -0
  13. commonmeta/readers/codemeta_reader.py +112 -0
  14. commonmeta/readers/commonmeta_reader.py +13 -0
  15. commonmeta/readers/crossref_reader.py +409 -0
  16. commonmeta/readers/crossref_xml_reader.py +505 -0
  17. commonmeta/readers/csl_reader.py +98 -0
  18. commonmeta/readers/datacite_reader.py +390 -0
  19. commonmeta/readers/datacite_xml_reader.py +359 -0
  20. commonmeta/readers/inveniordm_reader.py +218 -0
  21. commonmeta/readers/json_feed_reader.py +420 -0
  22. commonmeta/readers/kbase_reader.py +205 -0
  23. commonmeta/readers/ris_reader.py +103 -0
  24. commonmeta/readers/schema_org_reader.py +506 -0
  25. commonmeta/resources/cff_v1.2.0.json +1827 -0
  26. commonmeta/resources/commonmeta_v0.12.json +601 -0
  27. commonmeta/resources/commonmeta_v0.13.json +559 -0
  28. commonmeta/resources/commonmeta_v0.14.json +573 -0
  29. commonmeta/resources/crossref/AccessIndicators.xsd +47 -0
  30. commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +10130 -0
  31. commonmeta/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +48 -0
  32. commonmeta/resources/crossref/JATS-journalpublishing1-elements.xsd +8705 -0
  33. commonmeta/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +8608 -0
  34. commonmeta/resources/crossref/JATS-journalpublishing1-mathml3.xsd +49 -0
  35. commonmeta/resources/crossref/JATS-journalpublishing1.xsd +6176 -0
  36. commonmeta/resources/crossref/clinicaltrials.xsd +61 -0
  37. commonmeta/resources/crossref/common5.3.1.xsd +1538 -0
  38. commonmeta/resources/crossref/crossref5.3.1.xsd +1949 -0
  39. commonmeta/resources/crossref/crossref_query_output3.0.xsd +1097 -0
  40. commonmeta/resources/crossref/fundref.xsd +49 -0
  41. commonmeta/resources/crossref/module-ali.xsd +39 -0
  42. commonmeta/resources/crossref/relations.xsd +444 -0
  43. commonmeta/resources/crossref-v0.2.json +60 -0
  44. commonmeta/resources/csl-data.json +538 -0
  45. commonmeta/resources/datacite-v4.5.json +829 -0
  46. commonmeta/resources/datacite-v4.5pr.json +608 -0
  47. commonmeta/resources/ietf-bcp-47.json +3025 -0
  48. commonmeta/resources/iso-8601.json +3182 -0
  49. commonmeta/resources/spdx/licenses.json +4851 -0
  50. commonmeta/resources/spdx-schema..json +903 -0
  51. commonmeta/resources/styles/apa.csl +1697 -0
  52. commonmeta/resources/styles/chicago-author-date.csl +684 -0
  53. commonmeta/resources/styles/harvard-cite-them-right.csl +321 -0
  54. commonmeta/resources/styles/ieee.csl +468 -0
  55. commonmeta/resources/styles/modern-language-association.csl +341 -0
  56. commonmeta/resources/styles/vancouver.csl +376 -0
  57. commonmeta/schema_utils.py +27 -0
  58. commonmeta/translators.py +47 -0
  59. commonmeta/utils.py +1108 -0
  60. commonmeta/writers/__init__.py +1 -0
  61. commonmeta/writers/bibtex_writer.py +149 -0
  62. commonmeta/writers/citation_writer.py +70 -0
  63. commonmeta/writers/commonmeta_writer.py +68 -0
  64. commonmeta/writers/crossref_xml_writer.py +17 -0
  65. commonmeta/writers/csl_writer.py +79 -0
  66. commonmeta/writers/datacite_writer.py +193 -0
  67. commonmeta/writers/inveniordm_writer.py +94 -0
  68. commonmeta/writers/ris_writer.py +58 -0
  69. commonmeta/writers/schema_org_writer.py +146 -0
  70. {commonmeta_py-0.23.dist-info → commonmeta_py-0.24.dist-info}/METADATA +56 -45
  71. commonmeta_py-0.24.dist-info/RECORD +75 -0
  72. {commonmeta_py-0.23.dist-info → commonmeta_py-0.24.dist-info}/WHEEL +1 -1
  73. commonmeta_py-0.24.dist-info/entry_points.txt +3 -0
  74. commonmeta_py-0.23.dist-info/RECORD +0 -5
  75. /commonmeta_py/__init__.py → /commonmeta/readers/bibtex_reader.py +0 -0
  76. {commonmeta_py-0.23.dist-info/licenses → commonmeta_py-0.24.dist-info}/LICENSE +0 -0
@@ -0,0 +1,559 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://commonmeta.org/commonmeta_v0.13.json",
4
+ "title": "Commonmeta v0.13",
5
+ "description": "JSON representation of the Commonmeta schema.",
6
+ "additionalProperties": false,
7
+ "definitions": {
8
+ "affiliations": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "organization": { "$ref": "#/definitions/organization" }
14
+ }
15
+ }
16
+ },
17
+ "contributorRole": {
18
+ "description": "The type of contribution made by a contributor",
19
+ "enum": [
20
+ "Author",
21
+ "Editor",
22
+ "Chair",
23
+ "Reviewer",
24
+ "ReviewAssistant",
25
+ "StatsReviewer",
26
+ "ReviewerExternal",
27
+ "Reader",
28
+ "Translator",
29
+ "ContactPerson",
30
+ "DataCollector",
31
+ "DataManager",
32
+ "Distributor",
33
+ "HostingInstitution",
34
+ "Producer",
35
+ "ProjectLeader",
36
+ "ProjectManager",
37
+ "ProjectMember",
38
+ "RegistrationAgency",
39
+ "RegistrationAuthority",
40
+ "RelatedPerson",
41
+ "ResearchGroup",
42
+ "RightsHolder",
43
+ "Researcher",
44
+ "Sponsor",
45
+ "WorkPackageLeader",
46
+ "Conceptualization",
47
+ "DataCuration",
48
+ "FormalAnalysis",
49
+ "FundingAcquisition",
50
+ "Investigation",
51
+ "Methodology",
52
+ "ProjectAdministration",
53
+ "Resources",
54
+ "Software",
55
+ "Supervision",
56
+ "Validation",
57
+ "Visualization",
58
+ "WritingOriginalDraft",
59
+ "WritingReviewEditing",
60
+ "Maintainer",
61
+ "Other"
62
+ ],
63
+ "type": "string"
64
+ },
65
+ "geoLocationBox": {
66
+ "type": "object",
67
+ "properties": {
68
+ "westBoundLongitude": { "$ref": "#/definitions/longitude" },
69
+ "eastBoundLongitude": { "$ref": "#/definitions/longitude" },
70
+ "southBoundLatitude": { "$ref": "#/definitions/latitude" },
71
+ "northBoundLatitude": { "$ref": "#/definitions/latitude" }
72
+ }
73
+ },
74
+ "geoLocationPoint": {
75
+ "type": "object",
76
+ "properties": {
77
+ "pointLongitude": { "$ref": "#/definitions/longitude" },
78
+ "pointLatitude": { "$ref": "#/definitions/latitude" }
79
+ }
80
+ },
81
+ "id": {
82
+ "description": "The unique identifier for the resource.",
83
+ "type": "string",
84
+ "format": "uri"
85
+ },
86
+ "latitude": {
87
+ "type": "number",
88
+ "minimum": -90,
89
+ "maximum": 90
90
+ },
91
+ "longitude": {
92
+ "type": "number",
93
+ "minimum": -180,
94
+ "maximum": 180
95
+ },
96
+ "organization": {
97
+ "type": "object",
98
+ "properties": {
99
+ "id": {
100
+ "description": "The unique identifier for the organization.",
101
+ "type": "string",
102
+ "format": "uri"
103
+ },
104
+ "type": { "type": "string", "const": "Organization" },
105
+ "name": {
106
+ "description": "The name of the organization.",
107
+ "type": "string"
108
+ }
109
+ },
110
+ "required": ["name", "type"]
111
+ },
112
+ "person": {
113
+ "type": "object",
114
+ "properties": {
115
+ "id": { "type": "string", "format": "uri" },
116
+ "type": { "type": "string", "const": "Person" },
117
+ "givenName": {
118
+ "description": "The given name of the person.",
119
+ "type": "string"
120
+ },
121
+ "familyName": {
122
+ "description": "The family name of the person.",
123
+ "type": "string"
124
+ },
125
+ "affiliation": { "$ref": "#/definitions/affiliations" }
126
+ },
127
+ "required": ["familyName", "type"]
128
+ },
129
+ "type": {
130
+ "type": "string",
131
+ "enum": [
132
+ "Article",
133
+ "Audiovisual",
134
+ "BookChapter",
135
+ "BookPart",
136
+ "BookSection",
137
+ "BookSeries",
138
+ "BookSet",
139
+ "Book",
140
+ "Collection",
141
+ "Component",
142
+ "Database",
143
+ "Dataset",
144
+ "Dissertation",
145
+ "Document",
146
+ "Entry",
147
+ "Event",
148
+ "Grant",
149
+ "Image",
150
+ "Instrument",
151
+ "InteractiveResource",
152
+ "JournalArticle",
153
+ "JournalIssue",
154
+ "JournalVolume",
155
+ "Journal",
156
+ "PeerReview",
157
+ "PhysicalObject",
158
+ "Presentation",
159
+ "ProceedingsArticle",
160
+ "ProceedingsSeries",
161
+ "Proceedings",
162
+ "ReportComponent",
163
+ "ReportSeries",
164
+ "Report",
165
+ "Software",
166
+ "Standard",
167
+ "StudyRegistration",
168
+ "WebPage",
169
+ "Other"
170
+ ]
171
+ }
172
+ },
173
+ "type": "object",
174
+ "properties": {
175
+ "id": { "$ref": "#/definitions/id" },
176
+ "type": { "$ref": "#/definitions/type" },
177
+ "additionalType": {
178
+ "description": "The additional type of the resource.",
179
+ "type": "string"
180
+ },
181
+ "archiveLocations": {
182
+ "description": "The location where content is archived.",
183
+ "type": "array",
184
+ "items": {
185
+ "type": "string",
186
+ "enum": [
187
+ "CLOCKSS",
188
+ "LOCKSS",
189
+ "Portico",
190
+ "KB",
191
+ "Internet Archive",
192
+ "DWT"
193
+ ]
194
+ }
195
+ },
196
+ "container": {
197
+ "description": "The container of the resource.",
198
+ "type": "object",
199
+ "properties": {
200
+ "identifier": {
201
+ "description": "The identifier for the container.",
202
+ "type": "string"
203
+ },
204
+ "identifierType": {
205
+ "description": "The identifierType for the container.",
206
+ "type": "string"
207
+ },
208
+ "type": {
209
+ "description": "The type of the container.",
210
+ "type": "string",
211
+ "enum": [
212
+ "Book",
213
+ "BookSeries",
214
+ "Journal",
215
+ "Proceedings",
216
+ "ProceedingsSeries",
217
+ "Repository",
218
+ "DataRepository",
219
+ "Periodical",
220
+ "Series"
221
+ ]
222
+ },
223
+ "title": {
224
+ "description": "The title of the container.",
225
+ "type": "string"
226
+ },
227
+ "firstPage": {
228
+ "description": "The first page of the resource.",
229
+ "type": "string"
230
+ },
231
+ "lastPage": {
232
+ "description": "The last page of the resource.",
233
+ "type": "string"
234
+ },
235
+ "volume": {
236
+ "description": "The volume of the resource.",
237
+ "type": "string"
238
+ },
239
+ "issue": {
240
+ "description": "The issue of the resource.",
241
+ "type": "string"
242
+ }
243
+ }
244
+ },
245
+ "contributors": {
246
+ "description": "The contributors to the resource.",
247
+ "type": "array",
248
+ "items": {
249
+ "type": "object",
250
+ "properties": {
251
+ "organization": { "$ref": "#/definitions/organization" },
252
+ "person": { "$ref": "#/definitions/person" },
253
+ "contributorRoles": {
254
+ "description": "List of roles assumed by the contributor when working on the resource.",
255
+ "items": {
256
+ "$ref": "#/definitions/contributorRole"
257
+ },
258
+ "type": "array"
259
+ }
260
+ }
261
+ },
262
+ "minItems": 1
263
+ },
264
+ "date": {
265
+ "description": "The dates for the resource.",
266
+ "$comment": "The date fields are not required. Dates should be formatted as ISO 8601 dates.",
267
+ "type": "object",
268
+ "properties": {
269
+ "created": {
270
+ "description": "The date the resource was created.",
271
+ "type": "string"
272
+ },
273
+ "submitted": {
274
+ "description": "The date the resource was submitted.",
275
+ "type": "string"
276
+ },
277
+ "accepted": {
278
+ "description": "The date the resource was accepted.",
279
+ "type": "string"
280
+ },
281
+ "published": {
282
+ "description": "The date the resource was published.",
283
+ "type": "string"
284
+ },
285
+ "updated": {
286
+ "description": "The date the resource was updated.",
287
+ "type": "string"
288
+ },
289
+ "accessed": {
290
+ "description": "The date the resource was accessed.",
291
+ "type": "string"
292
+ },
293
+ "available": {
294
+ "description": "The date the resource was made available.",
295
+ "type": "string"
296
+ },
297
+ "withdrawn": {
298
+ "description": "The date the resource was withdrawn.",
299
+ "type": "string"
300
+ }
301
+ }
302
+ },
303
+ "descriptions": {
304
+ "description": "The descriptions of the resource.",
305
+ "type": "array",
306
+ "items": {
307
+ "type": "object",
308
+ "properties": {
309
+ "description": {
310
+ "description": "The description of the resource.",
311
+ "type": "string"
312
+ },
313
+ "type": {
314
+ "description": "The type of the description.",
315
+ "type": "string",
316
+ "enum": ["Abstract", "Summary", "Methods", "TechnicalInfo", "Other"]
317
+ },
318
+ "language": {
319
+ "description": "The language of the title. Use one of the language codes from the IETF BCP 47 standard.",
320
+ "type": "string"
321
+ }
322
+ },
323
+ "required": ["description"]
324
+ }
325
+ },
326
+ "files": {
327
+ "description": "The downloadable files for the resource.",
328
+ "type": "array",
329
+ "items": {
330
+ "type": "object",
331
+ "properties": {
332
+ "bucket": { "type": "string" },
333
+ "key": { "type": "string" },
334
+ "checksum": { "type": "string" },
335
+ "url": { "type": "string", "format": "uri" },
336
+ "size": { "type": "integer" },
337
+ "mimeType": { "type": "string" }
338
+ },
339
+ "required": ["url"]
340
+ },
341
+ "minItems": 1
342
+ },
343
+ "fundingReferences": {
344
+ "description": "The funding references for the resource.",
345
+ "type": "array",
346
+ "items": {
347
+ "type": "object",
348
+ "properties": {
349
+ "funderIdentifier": { "type": "string" },
350
+ "funderIdentifierType": {
351
+ "type": "string",
352
+ "enum": [
353
+ "Crossref Funder ID",
354
+ "ROR",
355
+ "GRID",
356
+ "ISNI",
357
+ "Ringgold",
358
+ "Other"
359
+ ]
360
+ },
361
+ "funderName": { "type": "string" },
362
+ "awardNumber": { "type": "string" },
363
+ "awardUri": { "type": "string", "format": "uri" }
364
+ },
365
+ "required": ["funderName"]
366
+ }
367
+ },
368
+ "geoLocations": {
369
+ "type": "array",
370
+ "items": {
371
+ "type": "object",
372
+ "properties": {
373
+ "geoLocationPlace": { "type": "string" },
374
+ "geoLocationPoint": { "$ref": "#/definitions/geoLocationPoint" },
375
+ "geoLocationBox": { "$ref": "#/definitions/geoLocationBox" },
376
+ "geoLocationPolygons": {
377
+ "type": "array",
378
+ "items": {
379
+ "type": "object",
380
+ "properties": {
381
+ "polygonPoints": {
382
+ "type": "array",
383
+ "items": { "$ref": "#/definitions/geoLocationPoint" },
384
+ "minItems": 4
385
+ },
386
+ "inPolygonPoint": { "$ref": "#/definitions/geoLocationPoint" }
387
+ },
388
+ "required": ["polygonPoints"]
389
+ },
390
+ "uniqueItems": true
391
+ }
392
+ }
393
+ },
394
+ "uniqueItems": true
395
+ },
396
+ "identifiers": {
397
+ "description": "Identifiers for the resource, including the id.",
398
+ "type": "array",
399
+ "items": {
400
+ "type": "object",
401
+ "properties": {
402
+ "identifier": { "type": "string" },
403
+ "identifierType": {
404
+ "type": "string",
405
+ "enum": [
406
+ "ARK",
407
+ "arXiv",
408
+ "Bibcode",
409
+ "DOI",
410
+ "Handle",
411
+ "ISBN",
412
+ "ISSN",
413
+ "PMID",
414
+ "PMCID",
415
+ "PURL",
416
+ "URL",
417
+ "URN",
418
+ "UUID",
419
+ "Other"
420
+ ]
421
+ }
422
+ },
423
+ "required": ["identifier", "identifierType"]
424
+ }
425
+ },
426
+ "language": {
427
+ "description": "The language of the resource. Use one of the language codes from the IETF BCP 47 standard.",
428
+ "type": "string"
429
+ },
430
+ "license": {
431
+ "description": "The license for the resource. Use one of the SPDX license identifiers.",
432
+ "type": "object",
433
+ "properties": {
434
+ "id": { "type": "string" },
435
+ "url": { "type": "string", "format": "uri" }
436
+ }
437
+ },
438
+ "provider": {
439
+ "description": "The provider of the resource. This can be a DOI registration agency or a repository.",
440
+ "type": "string",
441
+ "enum": ["Crossref", "DataCite", "GitHub", "JaLC", "KISTI", "mEDRA", "OP"]
442
+ },
443
+ "publisher": {
444
+ "description": "The publisher of the resource.",
445
+ "type": "object",
446
+ "properties": {
447
+ "organization": { "$ref": "#/definitions/organization" }
448
+ }
449
+ },
450
+ "relations": {
451
+ "description": "Other resolvable persistent unique IDs related to the resource.",
452
+ "type": "array",
453
+ "items": {
454
+ "type": "object",
455
+ "properties": {
456
+ "id": {
457
+ "type": "string",
458
+ "format": "uri"
459
+ },
460
+ "type": {
461
+ "type": "string",
462
+ "enum": [
463
+ "IsNewVersionOf",
464
+ "IsPreviousVersionOf",
465
+ "IsVersionOf",
466
+ "HasVersion",
467
+ "IsPartOf",
468
+ "HasPart",
469
+ "IsVariantFormOf",
470
+ "IsOriginalFormOf",
471
+ "IsIdenticalTo",
472
+ "IsTranslationOf",
473
+ "HasTranslation",
474
+ "IsReviewedBy",
475
+ "Reviews",
476
+ "HasReview",
477
+ "IsPreprintOf",
478
+ "HasPreprint",
479
+ "IsSupplementTo",
480
+ "IsSupplementedBy"
481
+ ]
482
+ }
483
+ },
484
+ "required": ["id", "type"]
485
+ },
486
+ "minItems": 1
487
+ },
488
+ "references": {
489
+ "type": "array",
490
+ "items": {
491
+ "type": "object",
492
+ "properties": {
493
+ "id": { "$ref": "#/definitions/id" },
494
+ "type": { "$ref": "#/definitions/type" },
495
+ "key": { "type": "string" },
496
+ "contributor": { "type": "string" },
497
+ "title": { "type": "string" },
498
+ "publisher": { "type": "string" },
499
+ "publicationYear": { "type": "string" },
500
+ "volume": { "type": "string" },
501
+ "issue": { "type": "string" },
502
+ "firstPage": { "type": "string" },
503
+ "lastPage": { "type": "string" },
504
+ "containerTitle": { "type": "string" },
505
+ "edition": { "type": "string" },
506
+ "unstructured": { "type": "string" }
507
+ },
508
+ "required": ["key"]
509
+ }
510
+ },
511
+ "subjects": {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "object",
515
+ "properties": {
516
+ "subject": { "type": "string" },
517
+ "language": {
518
+ "description": "The language of the subject. Use one of the language codes from the IETF BCP 47 standard.",
519
+ "type": "string"
520
+ }
521
+ },
522
+ "required": ["subject"]
523
+ }
524
+ },
525
+ "titles": {
526
+ "description": "The titles of the resource.",
527
+ "type": "array",
528
+ "items": {
529
+ "type": "object",
530
+ "properties": {
531
+ "title": {
532
+ "description": "The title of the resource.",
533
+ "type": "string"
534
+ },
535
+ "type": {
536
+ "description": "The type of the title.",
537
+ "type": "string",
538
+ "enum": ["AlternativeTitle", "Subtitle", "TranslatedTitle"]
539
+ },
540
+ "language": {
541
+ "description": "The language of the title. Use one of the language codes from the IETF BCP 47 standard.",
542
+ "type": "string"
543
+ }
544
+ },
545
+ "required": ["title"]
546
+ }
547
+ },
548
+ "url": {
549
+ "description": "The URL of the resource.",
550
+ "type": "string",
551
+ "format": "uri"
552
+ },
553
+ "version": {
554
+ "description": "The version of the resource.",
555
+ "type": "string"
556
+ }
557
+ },
558
+ "required": ["id", "type"]
559
+ }