datacite 1.4.0__tar.gz → 1.4.2__tar.gz

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 (231) hide show
  1. datacite-1.4.2/.gitignore +61 -0
  2. datacite-1.4.2/PKG-INFO +103 -0
  3. datacite-1.4.2/datacite/__init__.py +14 -0
  4. {datacite-1.4.0 → datacite-1.4.2}/datacite/client.py +2 -9
  5. {datacite-1.4.0 → datacite-1.4.2}/datacite/errors.py +2 -9
  6. {datacite-1.4.0 → datacite-1.4.2}/datacite/jsonutils.py +3 -10
  7. {datacite-1.4.0 → datacite-1.4.2}/datacite/request.py +3 -10
  8. {datacite-1.4.0 → datacite-1.4.2}/datacite/rest_client.py +10 -13
  9. {datacite-1.4.0 → datacite-1.4.2}/datacite/schema40.py +2 -9
  10. {datacite-1.4.0 → datacite-1.4.2}/datacite/schema41.py +2 -9
  11. {datacite-1.4.0 → datacite-1.4.2}/datacite/schema42.py +3 -10
  12. {datacite-1.4.0 → datacite-1.4.2}/datacite/schema43.py +3 -10
  13. {datacite-1.4.0 → datacite-1.4.2}/datacite/schema45.py +4 -11
  14. {datacite-1.4.0 → datacite-1.4.2}/datacite/xmlutils.py +2 -9
  15. datacite-1.4.2/pyproject.toml +78 -0
  16. datacite-1.4.0/.coveragerc +0 -10
  17. datacite-1.4.0/.editorconfig +0 -30
  18. datacite-1.4.0/.git-blame-ignore-revs +0 -1
  19. datacite-1.4.0/.github/workflows/github-release.yml +0 -26
  20. datacite-1.4.0/.github/workflows/pypi-release.yml +0 -43
  21. datacite-1.4.0/.github/workflows/tests.yml +0 -54
  22. datacite-1.4.0/.readthedocs.yaml +0 -18
  23. datacite-1.4.0/CHANGES.rst +0 -112
  24. datacite-1.4.0/CONTRIBUTING.rst +0 -19
  25. datacite-1.4.0/MANIFEST.in +0 -37
  26. datacite-1.4.0/PKG-INFO +0 -214
  27. datacite-1.4.0/datacite/__init__.py +0 -20
  28. datacite-1.4.0/datacite.egg-info/PKG-INFO +0 -214
  29. datacite-1.4.0/datacite.egg-info/SOURCES.txt +0 -226
  30. datacite-1.4.0/datacite.egg-info/dependency_links.txt +0 -1
  31. datacite-1.4.0/datacite.egg-info/not-zip-safe +0 -1
  32. datacite-1.4.0/datacite.egg-info/requires.txt +0 -19
  33. datacite-1.4.0/datacite.egg-info/top_level.txt +0 -1
  34. datacite-1.4.0/docs/Makefile +0 -185
  35. datacite-1.4.0/docs/conf.py +0 -284
  36. datacite-1.4.0/docs/index.rst +0 -113
  37. datacite-1.4.0/docs/requirements.txt +0 -1
  38. datacite-1.4.0/pyproject.toml +0 -4
  39. datacite-1.4.0/run-tests-pw.sh +0 -20
  40. datacite-1.4.0/run-tests.sh +0 -19
  41. datacite-1.4.0/setup.cfg +0 -65
  42. datacite-1.4.0/setup.py +0 -16
  43. datacite-1.4.0/tests/conftest.py +0 -272
  44. datacite-1.4.0/tests/data/4.0/datacite-contributorType-v4.xsd +0 -35
  45. datacite-1.4.0/tests/data/4.0/datacite-dateType-v4.xsd +0 -21
  46. datacite-1.4.0/tests/data/4.0/datacite-descriptionType-v4.xsd +0 -19
  47. datacite-1.4.0/tests/data/4.0/datacite-funderIdentifierType-v4.xsd +0 -15
  48. datacite-1.4.0/tests/data/4.0/datacite-relatedIdentifierType-v4.xsd +0 -32
  49. datacite-1.4.0/tests/data/4.0/datacite-relationType-v4.xsd +0 -39
  50. datacite-1.4.0/tests/data/4.0/datacite-resourceType-v4.xsd +0 -26
  51. datacite-1.4.0/tests/data/4.0/datacite-titleType-v4.xsd +0 -14
  52. datacite-1.4.0/tests/data/4.0/include/datacite-contributorType-v4.xsd +0 -35
  53. datacite-1.4.0/tests/data/4.0/include/datacite-dateType-v4.xsd +0 -25
  54. datacite-1.4.0/tests/data/4.0/include/datacite-descriptionType-v4.xsd +0 -19
  55. datacite-1.4.0/tests/data/4.0/include/datacite-funderIdentifierType-v4.xsd +0 -15
  56. datacite-1.4.0/tests/data/4.0/include/datacite-nameType-v4.xsd +0 -10
  57. datacite-1.4.0/tests/data/4.0/include/datacite-relatedIdentifierType-v4.xsd +0 -34
  58. datacite-1.4.0/tests/data/4.0/include/datacite-relationType-v4.xsd +0 -49
  59. datacite-1.4.0/tests/data/4.0/include/datacite-resourceType-v4.xsd +0 -28
  60. datacite-1.4.0/tests/data/4.0/include/datacite-titleType-v4.xsd +0 -14
  61. datacite-1.4.0/tests/data/4.0/include/xml.xsd +0 -286
  62. datacite-1.4.0/tests/data/4.0/metadata40.xsd +0 -470
  63. datacite-1.4.0/tests/data/4.1/datacite-contributorType-v4.xsd +0 -35
  64. datacite-1.4.0/tests/data/4.1/datacite-dateType-v4.1.xsd +0 -23
  65. datacite-1.4.0/tests/data/4.1/datacite-descriptionType-v4.xsd +0 -19
  66. datacite-1.4.0/tests/data/4.1/datacite-funderIdentifierType-v4.xsd +0 -15
  67. datacite-1.4.0/tests/data/4.1/datacite-nameType-v4.1.xsd +0 -10
  68. datacite-1.4.0/tests/data/4.1/datacite-relatedIdentifierType-v4.xsd +0 -32
  69. datacite-1.4.0/tests/data/4.1/datacite-relationType-v4.1.xsd +0 -46
  70. datacite-1.4.0/tests/data/4.1/datacite-resourceType-v4.1.xsd +0 -28
  71. datacite-1.4.0/tests/data/4.1/datacite-titleType-v4.xsd +0 -14
  72. datacite-1.4.0/tests/data/4.1/include/datacite-contributorType-v4.xsd +0 -35
  73. datacite-1.4.0/tests/data/4.1/include/datacite-dateType-v4.1.xsd +0 -23
  74. datacite-1.4.0/tests/data/4.1/include/datacite-descriptionType-v4.xsd +0 -19
  75. datacite-1.4.0/tests/data/4.1/include/datacite-funderIdentifierType-v4.xsd +0 -15
  76. datacite-1.4.0/tests/data/4.1/include/datacite-nameType-v4.1.xsd +0 -10
  77. datacite-1.4.0/tests/data/4.1/include/datacite-relatedIdentifierType-v4.xsd +0 -34
  78. datacite-1.4.0/tests/data/4.1/include/datacite-relationType-v4.1.xsd +0 -46
  79. datacite-1.4.0/tests/data/4.1/include/datacite-resourceType-v4.1.xsd +0 -28
  80. datacite-1.4.0/tests/data/4.1/include/datacite-titleType-v4.xsd +0 -14
  81. datacite-1.4.0/tests/data/4.1/include/xml.xsd +0 -286
  82. datacite-1.4.0/tests/data/4.1/metadata41.xsd +0 -482
  83. datacite-1.4.0/tests/data/4.2/datacite-example-Box_dateCollected_DataCollector-v4.json +0 -107
  84. datacite-1.4.0/tests/data/4.2/datacite-example-Box_dateCollected_DataCollector-v4.xml +0 -52
  85. datacite-1.4.0/tests/data/4.2/datacite-example-DateRange-v4.json +0 -313
  86. datacite-1.4.0/tests/data/4.2/datacite-example-DateRange-v4.xml +0 -131
  87. datacite-1.4.0/tests/data/4.2/datacite-example-GeoLocation-v4.json +0 -108
  88. datacite-1.4.0/tests/data/4.2/datacite-example-GeoLocation-v4.xml +0 -66
  89. datacite-1.4.0/tests/data/4.2/datacite-example-HasMetadata-v4.json +0 -129
  90. datacite-1.4.0/tests/data/4.2/datacite-example-HasMetadata-v4.xml +0 -67
  91. datacite-1.4.0/tests/data/4.2/datacite-example-ResearchGroup_Methods-v4.json +0 -107
  92. datacite-1.4.0/tests/data/4.2/datacite-example-ResearchGroup_Methods-v4.xml +0 -46
  93. datacite-1.4.0/tests/data/4.2/datacite-example-ResourceTypeGeneral_Collection-v4.json +0 -101
  94. datacite-1.4.0/tests/data/4.2/datacite-example-ResourceTypeGeneral_Collection-v4.xml +0 -52
  95. datacite-1.4.0/tests/data/4.2/datacite-example-complicated-v4.json +0 -116
  96. datacite-1.4.0/tests/data/4.2/datacite-example-complicated-v4.xml +0 -57
  97. datacite-1.4.0/tests/data/4.2/datacite-example-datapaper-v4.json +0 -97
  98. datacite-1.4.0/tests/data/4.2/datacite-example-datapaper-v4.xml +0 -32
  99. datacite-1.4.0/tests/data/4.2/datacite-example-dataset-v4.json +0 -98
  100. datacite-1.4.0/tests/data/4.2/datacite-example-dataset-v4.xml +0 -45
  101. datacite-1.4.0/tests/data/4.2/datacite-example-full-v4.json +0 -181
  102. datacite-1.4.0/tests/data/4.2/datacite-example-full-v4.xml +0 -102
  103. datacite-1.4.0/tests/data/4.2/datacite-example-fundingReference-v4.json +0 -122
  104. datacite-1.4.0/tests/data/4.2/datacite-example-fundingReference-v4.xml +0 -62
  105. datacite-1.4.0/tests/data/4.2/datacite-example-polygon-v4.json +0 -265
  106. datacite-1.4.0/tests/data/4.2/datacite-example-polygon-v4.xml +0 -161
  107. datacite-1.4.0/tests/data/4.2/datacite-example-relationTypeIsIdenticalTo-v4.json +0 -165
  108. datacite-1.4.0/tests/data/4.2/datacite-example-relationTypeIsIdenticalTo-v4.xml +0 -65
  109. datacite-1.4.0/tests/data/4.2/datacite-example-software-v4.json +0 -156
  110. datacite-1.4.0/tests/data/4.2/datacite-example-software-v4.xml +0 -66
  111. datacite-1.4.0/tests/data/4.2/datacite-example-video-v4.json +0 -72
  112. datacite-1.4.0/tests/data/4.2/datacite-example-video-v4.xml +0 -31
  113. datacite-1.4.0/tests/data/4.2/datacite-example-workflow-v4.json +0 -109
  114. datacite-1.4.0/tests/data/4.2/datacite-example-workflow-v4.xml +0 -54
  115. datacite-1.4.0/tests/data/4.2/include/datacite-contributorType-v4.xsd +0 -35
  116. datacite-1.4.0/tests/data/4.2/include/datacite-dateType-v4.xsd +0 -25
  117. datacite-1.4.0/tests/data/4.2/include/datacite-descriptionType-v4.xsd +0 -19
  118. datacite-1.4.0/tests/data/4.2/include/datacite-funderIdentifierType-v4.xsd +0 -15
  119. datacite-1.4.0/tests/data/4.2/include/datacite-nameType-v4.xsd +0 -10
  120. datacite-1.4.0/tests/data/4.2/include/datacite-relatedIdentifierType-v4.xsd +0 -34
  121. datacite-1.4.0/tests/data/4.2/include/datacite-relationType-v4.xsd +0 -49
  122. datacite-1.4.0/tests/data/4.2/include/datacite-resourceType-v4.xsd +0 -28
  123. datacite-1.4.0/tests/data/4.2/include/datacite-titleType-v4.xsd +0 -14
  124. datacite-1.4.0/tests/data/4.2/include/xml.xsd +0 -286
  125. datacite-1.4.0/tests/data/4.2/metadata.xsd +0 -479
  126. datacite-1.4.0/tests/data/4.3/datacite-example-Box_dateCollected_DataCollector-v4.json +0 -103
  127. datacite-1.4.0/tests/data/4.3/datacite-example-Box_dateCollected_DataCollector-v4.xml +0 -52
  128. datacite-1.4.0/tests/data/4.3/datacite-example-GeoLocation-v4.json +0 -104
  129. datacite-1.4.0/tests/data/4.3/datacite-example-GeoLocation-v4.xml +0 -67
  130. datacite-1.4.0/tests/data/4.3/datacite-example-HasMetadata-v4.json +0 -125
  131. datacite-1.4.0/tests/data/4.3/datacite-example-HasMetadata-v4.xml +0 -67
  132. datacite-1.4.0/tests/data/4.3/datacite-example-ResearchGroup_Methods-v4.json +0 -102
  133. datacite-1.4.0/tests/data/4.3/datacite-example-ResearchGroup_Methods-v4.xml +0 -46
  134. datacite-1.4.0/tests/data/4.3/datacite-example-ResourceTypeGeneral_Collection-v4.json +0 -96
  135. datacite-1.4.0/tests/data/4.3/datacite-example-ResourceTypeGeneral_Collection-v4.xml +0 -52
  136. datacite-1.4.0/tests/data/4.3/datacite-example-affiliation-v4.json +0 -231
  137. datacite-1.4.0/tests/data/4.3/datacite-example-affiliation-v4.xml +0 -114
  138. datacite-1.4.0/tests/data/4.3/datacite-example-ancientdates-v4.json +0 -89
  139. datacite-1.4.0/tests/data/4.3/datacite-example-ancientdates-v4.xml +0 -29
  140. datacite-1.4.0/tests/data/4.3/datacite-example-complicated-v4.json +0 -112
  141. datacite-1.4.0/tests/data/4.3/datacite-example-complicated-v4.xml +0 -57
  142. datacite-1.4.0/tests/data/4.3/datacite-example-datapaper-v4.json +0 -93
  143. datacite-1.4.0/tests/data/4.3/datacite-example-datapaper-v4.xml +0 -32
  144. datacite-1.4.0/tests/data/4.3/datacite-example-dataset-v4.json +0 -94
  145. datacite-1.4.0/tests/data/4.3/datacite-example-dataset-v4.xml +0 -45
  146. datacite-1.4.0/tests/data/4.3/datacite-example-fundingReference-v4.json +0 -133
  147. datacite-1.4.0/tests/data/4.3/datacite-example-fundingReference-v4.xml +0 -62
  148. datacite-1.4.0/tests/data/4.3/datacite-example-polygon-advanced-v4.xml +0 -141
  149. datacite-1.4.0/tests/data/4.3/datacite-example-polygon-v4.json +0 -261
  150. datacite-1.4.0/tests/data/4.3/datacite-example-polygon-v4.xml +0 -161
  151. datacite-1.4.0/tests/data/4.3/datacite-example-relationTypeIsIdenticalTo-v4.json +0 -161
  152. datacite-1.4.0/tests/data/4.3/datacite-example-relationTypeIsIdenticalTo-v4.xml +0 -65
  153. datacite-1.4.0/tests/data/4.3/datacite-example-software-v4.json +0 -151
  154. datacite-1.4.0/tests/data/4.3/datacite-example-software-v4.xml +0 -66
  155. datacite-1.4.0/tests/data/4.3/datacite-example-video-v4.json +0 -67
  156. datacite-1.4.0/tests/data/4.3/datacite-example-video-v4.xml +0 -31
  157. datacite-1.4.0/tests/data/4.3/datacite-example-workflow-v4.json +0 -104
  158. datacite-1.4.0/tests/data/4.3/datacite-example-workflow-v4.xml +0 -54
  159. datacite-1.4.0/tests/data/4.3/include/datacite-contributorType-v4.xsd +0 -35
  160. datacite-1.4.0/tests/data/4.3/include/datacite-dateType-v4.xsd +0 -25
  161. datacite-1.4.0/tests/data/4.3/include/datacite-descriptionType-v4.xsd +0 -19
  162. datacite-1.4.0/tests/data/4.3/include/datacite-funderIdentifierType-v4.xsd +0 -16
  163. datacite-1.4.0/tests/data/4.3/include/datacite-nameType-v4.xsd +0 -10
  164. datacite-1.4.0/tests/data/4.3/include/datacite-relatedIdentifierType-v4.xsd +0 -34
  165. datacite-1.4.0/tests/data/4.3/include/datacite-relationType-v4.xsd +0 -49
  166. datacite-1.4.0/tests/data/4.3/include/datacite-resourceType-v4.xsd +0 -28
  167. datacite-1.4.0/tests/data/4.3/include/datacite-titleType-v4.xsd +0 -14
  168. datacite-1.4.0/tests/data/4.3/include/xml.xsd +0 -286
  169. datacite-1.4.0/tests/data/4.3/metadata.xsd +0 -515
  170. datacite-1.4.0/tests/data/4.5/datacite-example-dataset-v4.json +0 -202
  171. datacite-1.4.0/tests/data/4.5/datacite-example-dataset-v4.xml +0 -80
  172. datacite-1.4.0/tests/data/4.5/datacite-example-instrument-v4.json +0 -99
  173. datacite-1.4.0/tests/data/4.5/datacite-example-instrument-v4.xml +0 -34
  174. datacite-1.4.0/tests/data/4.5/datacite-example-multilingual-v4.json +0 -150
  175. datacite-1.4.0/tests/data/4.5/datacite-example-multilingual-v4.xml +0 -45
  176. datacite-1.4.0/tests/data/4.5/datacite-example-relateditem1-v4.json +0 -89
  177. datacite-1.4.0/tests/data/4.5/datacite-example-relateditem1-v4.xml +0 -40
  178. datacite-1.4.0/tests/data/4.5/datacite-example-relateditem2-v4.json +0 -78
  179. datacite-1.4.0/tests/data/4.5/datacite-example-relateditem2-v4.xml +0 -36
  180. datacite-1.4.0/tests/data/4.5/datacite-example-relateditem3-v4.json +0 -84
  181. datacite-1.4.0/tests/data/4.5/datacite-example-relateditem3-v4.xml +0 -41
  182. datacite-1.4.0/tests/data/4.5/include/datacite-contributorType-v4.xsd +0 -35
  183. datacite-1.4.0/tests/data/4.5/include/datacite-dateType-v4.xsd +0 -25
  184. datacite-1.4.0/tests/data/4.5/include/datacite-descriptionType-v4.xsd +0 -19
  185. datacite-1.4.0/tests/data/4.5/include/datacite-funderIdentifierType-v4.xsd +0 -16
  186. datacite-1.4.0/tests/data/4.5/include/datacite-nameType-v4.xsd +0 -10
  187. datacite-1.4.0/tests/data/4.5/include/datacite-numberType-v4.xsd +0 -12
  188. datacite-1.4.0/tests/data/4.5/include/datacite-relatedIdentifierType-v4.xsd +0 -34
  189. datacite-1.4.0/tests/data/4.5/include/datacite-relationType-v4.xsd +0 -53
  190. datacite-1.4.0/tests/data/4.5/include/datacite-resourceType-v4.xsd +0 -45
  191. datacite-1.4.0/tests/data/4.5/include/datacite-titleType-v4.xsd +0 -14
  192. datacite-1.4.0/tests/data/4.5/include/xml.xsd +0 -286
  193. datacite-1.4.0/tests/data/4.5/metadata.xsd +0 -711
  194. datacite-1.4.0/tests/data/datacite-v4.0-full-example.json +0 -170
  195. datacite-1.4.0/tests/data/datacite-v4.0-full-example.xml +0 -71
  196. datacite-1.4.0/tests/data/datacite-v4.1-full-example.json +0 -235
  197. datacite-1.4.0/tests/data/datacite-v4.1-full-example.xml +0 -113
  198. datacite-1.4.0/tests/data/datacite-v4.2-full-example.json +0 -177
  199. datacite-1.4.0/tests/data/datacite-v4.2-full-example.xml +0 -122
  200. datacite-1.4.0/tests/data/datacite-v4.3-full-example.json +0 -190
  201. datacite-1.4.0/tests/data/datacite-v4.3-full-example.xml +0 -102
  202. datacite-1.4.0/tests/data/datacite-v4.5-full-example.json +0 -606
  203. datacite-1.4.0/tests/data/datacite-v4.5-full-example.xml +0 -258
  204. datacite-1.4.0/tests/example/__init__.py +0 -11
  205. datacite-1.4.0/tests/example/full.py +0 -61
  206. datacite-1.4.0/tests/example/full_rest.py +0 -51
  207. datacite-1.4.0/tests/helpers.py +0 -107
  208. datacite-1.4.0/tests/test_client.py +0 -76
  209. datacite-1.4.0/tests/test_doi_get.py +0 -128
  210. datacite-1.4.0/tests/test_doi_post.py +0 -120
  211. datacite-1.4.0/tests/test_example.py +0 -85
  212. datacite-1.4.0/tests/test_media_get.py +0 -100
  213. datacite-1.4.0/tests/test_media_post.py +0 -107
  214. datacite-1.4.0/tests/test_metadata_delete.py +0 -96
  215. datacite-1.4.0/tests/test_metadata_get.py +0 -114
  216. datacite-1.4.0/tests/test_metadata_post.py +0 -100
  217. datacite-1.4.0/tests/test_rest.py +0 -350
  218. datacite-1.4.0/tests/test_schema40.py +0 -524
  219. datacite-1.4.0/tests/test_schema41.py +0 -547
  220. datacite-1.4.0/tests/test_schema42.py +0 -711
  221. datacite-1.4.0/tests/test_schema43.py +0 -706
  222. datacite-1.4.0/tests/test_schema45.py +0 -627
  223. {datacite-1.4.0 → datacite-1.4.2}/LICENSE +0 -0
  224. {datacite-1.4.0 → datacite-1.4.2}/README.rst +0 -0
  225. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/datacite-v4.0.json +0 -0
  226. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/datacite-v4.1.json +0 -0
  227. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/datacite-v4.2.json +0 -0
  228. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/datacite-v4.3.json +0 -0
  229. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/datacite-v4.5.json +0 -0
  230. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/ietf-bcp-47.json +0 -0
  231. {datacite-1.4.0 → datacite-1.4.2}/datacite/schemas/iso-8601.json +0 -0
@@ -0,0 +1,61 @@
1
+ # SPDX-FileCopyrightText: 2015-2018 CERN.
2
+ # SPDX-FileCopyrightText: 2018 Center for Open Science.
3
+ # SPDX-License-Identifier: BSD-3-Clause
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ env/
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .coverage
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ .pytest_cache
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Django stuff:
54
+ *.log
55
+
56
+ # Sphinx documentation
57
+ docs/_build/
58
+
59
+ # PyBuilder
60
+ target/
61
+ uv.lock
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.5
2
+ Name: datacite
3
+ Version: 1.4.2
4
+ Summary: A Python client for DataCite MDS and REST APIs.
5
+ Project-URL: Repository, https://github.com/inveniosoftware/datacite
6
+ Author-email: Invenio Collaboration <info@inveniosoftware.org>
7
+ License-Expression: BSD-3-Clause
8
+ License-File: LICENSE
9
+ Keywords: datacite,doi
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Utilities
16
+ Requires-Python: >=3.9
17
+ Requires-Dist: idutils>=1.0.0
18
+ Requires-Dist: jsonresolver>=0.5.0
19
+ Requires-Dist: jsonschema>=3.0.0
20
+ Requires-Dist: lxml>=4.5.2
21
+ Requires-Dist: requests>=2.12.2
22
+ Provides-Extra: all
23
+ Requires-Dist: mock>=1.3.0; extra == 'all'
24
+ Requires-Dist: pytest-black>=0.6.0; extra == 'all'
25
+ Requires-Dist: pytest-invenio>=1.4.0; extra == 'all'
26
+ Requires-Dist: responses>=0.10.6; extra == 'all'
27
+ Requires-Dist: sphinx>=4.5.0; extra == 'all'
28
+ Provides-Extra: docs
29
+ Requires-Dist: sphinx>=4.5.0; extra == 'docs'
30
+ Provides-Extra: tests
31
+ Requires-Dist: mock>=1.3.0; extra == 'tests'
32
+ Requires-Dist: pytest-black>=0.6.0; extra == 'tests'
33
+ Requires-Dist: pytest-invenio>=1.4.0; extra == 'tests'
34
+ Requires-Dist: responses>=0.10.6; extra == 'tests'
35
+ Requires-Dist: sphinx>=4.5.0; extra == 'tests'
36
+ Description-Content-Type: text/x-rst
37
+
38
+ ==========
39
+ DataCite
40
+ ==========
41
+
42
+ .. image:: https://github.com/inveniosoftware/datacite/actions/workflows/tests.yml/badge.svg
43
+ :target: https://github.com/inveniosoftware/datacite/actions/workflows/tests.yml
44
+
45
+ .. image:: https://img.shields.io/coveralls/inveniosoftware/datacite.svg
46
+ :target: https://coveralls.io/r/inveniosoftware/datacite?branch=master
47
+
48
+ .. image:: https://img.shields.io/pypi/v/datacite.svg?maxAge=2592000
49
+ :target: https://pypi.python.org/pypi/datacite/
50
+
51
+ .. image:: https://pepy.tech/badge/datacite?maxAge=2592000
52
+ :target: https://pypi.python.org/pypi/datacite/
53
+
54
+ .. image:: https://img.shields.io/pypi/l/datacite.svg
55
+ :target: https://github.com/inveniosoftware/datacite/blob/master/LICENSE
56
+
57
+ .. image:: https://img.shields.io/github/tag/inveniosoftware/datacite.svg
58
+ :target: https://github.com/inveniosoftware/datacite/releases/
59
+
60
+
61
+
62
+
63
+ About
64
+ =====
65
+
66
+ Python API wrapper for the DataCite REST and Metadata Store APIs as well as
67
+ DataCite JSON and XML generation.
68
+
69
+ Installation
70
+ ============
71
+ The datacite package is on PyPI so all you need is: ::
72
+
73
+ pip install datacite
74
+
75
+
76
+ Documentation
77
+ =============
78
+
79
+ Documentation is readable at http://datacite.readthedocs.io/ or can be
80
+ built using Sphinx: ::
81
+
82
+ pip install datacite[docs]
83
+ python setup.py build_sphinx
84
+
85
+
86
+ Testing
87
+ =======
88
+ Running the test suite is as simple as: ::
89
+
90
+ pip install -e .[all]
91
+ ./run-tests.sh
92
+
93
+ If you're using zsh, use this pip command instead:
94
+
95
+ pip install -e .'[all]'
96
+
97
+ Some tests require a DataCite Test Account.
98
+ Set the following environment variables
99
+ $DATACITE_USER, $DATACITE_PW, $DATACITE_PREFIX
100
+ with your account information for doi.test.datacite.org and
101
+ run: ::
102
+
103
+ ./run-tests-pw.sh
@@ -0,0 +1,14 @@
1
+ # SPDX-FileCopyrightText: 2015, 2016 CERN.
2
+ # SPDX-FileCopyrightText: 2026 Graz University of Technology.
3
+ # SPDX-FileCopyrightText: 2026 TU Wien.
4
+ # SPDX-License-Identifier: BSD-3-Clause
5
+
6
+
7
+ """Python API wrapper for the DataCite API."""
8
+
9
+ from .client import DataCiteMDSClient
10
+ from .rest_client import DataCiteRESTClient
11
+
12
+ __version__ = "1.4.2"
13
+
14
+ __all__ = ("DataCiteMDSClient", "DataCiteRESTClient", "__version__")
@@ -1,12 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2015 CERN.
6
- #
7
- # DataCite is free software; you can redistribute it and/or modify it
8
- # under the terms of the Revised BSD License; see LICENSE file for
9
- # more details.
1
+ # SPDX-FileCopyrightText: 2015 CERN.
2
+ # SPDX-License-Identifier: BSD-3-Clause
10
3
 
11
4
  """Python API client wrapper for the DataCite Metadata Store API.
12
5
 
@@ -1,12 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2015 CERN.
6
- #
7
- # DataCite is free software; you can redistribute it and/or modify it
8
- # under the terms of the Revised BSD License; see LICENSE file for
9
- # more details.
1
+ # SPDX-FileCopyrightText: 2015 CERN.
2
+ # SPDX-License-Identifier: BSD-3-Clause
10
3
 
11
4
  """Errors for the DataCite API.
12
5
 
@@ -1,13 +1,6 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- # Copyright (C) 2025 Graz University of Technology.
7
- #
8
- # DataCite is free software; you can redistribute it and/or modify it
9
- # under the terms of the Revised BSD License; see LICENSE file for
10
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-FileCopyrightText: 2025 Graz University of Technology.
3
+ # SPDX-License-Identifier: BSD-3-Clause
11
4
 
12
5
  """JSON utilities."""
13
6
 
@@ -1,13 +1,6 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2015-2018 CERN.
6
- # Copyright (C) 2018 Center for Open Science.
7
- #
8
- # DataCite is free software; you can redistribute it and/or modify it
9
- # under the terms of the Revised BSD License; see LICENSE file for
10
- # more details.
1
+ # SPDX-FileCopyrightText: 2015-2018 CERN.
2
+ # SPDX-FileCopyrightText: 2018 Center for Open Science.
3
+ # SPDX-License-Identifier: BSD-3-Clause
11
4
 
12
5
  """Module for making requests to the DataCite API."""
13
6
 
@@ -1,14 +1,7 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2015 CERN.
6
- # Copyright (C) 2020 Caltech.
7
- # Copyright (C) 2021 Graz University of Technology.
8
- #
9
- # DataCite is free software; you can redistribute it and/or modify it
10
- # under the terms of the Revised BSD License; see LICENSE file for
11
- # more details.
1
+ # SPDX-FileCopyrightText: 2015 CERN.
2
+ # SPDX-FileCopyrightText: 2020 Caltech.
3
+ # SPDX-FileCopyrightText: 2021 Graz University of Technology.
4
+ # SPDX-License-Identifier: BSD-3-Clause
12
5
 
13
6
  """Python API client wrapper for the DataCite Rest API.
14
7
 
@@ -125,13 +118,17 @@ class DataCiteRESTClient(object):
125
118
  raise DataCiteError.factory(resp.status_code, resp.text)
126
119
 
127
120
  def put_doi(self, doi, data):
128
- """Put a JSON payload to DataCite for an existing DOI."""
121
+ """Put a JSON payload to DataCite for a DOI.
122
+
123
+ DataCite updates the DOI if it exists (200 OK) and creates it
124
+ otherwise (201 Created), so both are treated as success.
125
+ """
129
126
  headers = {"content-type": "application/vnd.api+json"}
130
127
  body = {"data": data}
131
128
  request = self._create_request()
132
129
  url = "dois/" + doi
133
130
  resp = request.put(url, body=json.dumps(body), headers=headers)
134
- if resp.status_code == HTTP_OK:
131
+ if resp.status_code in (HTTP_OK, HTTP_CREATED):
135
132
  return resp.json()["data"]["attributes"]
136
133
  else:
137
134
  raise DataCiteError.factory(resp.status_code, resp.text)
@@ -1,12 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- #
7
- # DataCite is free software; you can redistribute it and/or modify it
8
- # under the terms of the Revised BSD License; see LICENSE file for
9
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-License-Identifier: BSD-3-Clause
10
3
 
11
4
  """DataCite v4.0 JSON to XML transformations."""
12
5
 
@@ -1,12 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- #
7
- # DataCite is free software; you can redistribute it and/or modify it
8
- # under the terms of the Revised BSD License; see LICENSE file for
9
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-License-Identifier: BSD-3-Clause
10
3
 
11
4
  """DataCite v4.1 JSON to XML transformations."""
12
5
 
@@ -1,13 +1,6 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- # Copyright (C) 2019 Caltech.
7
- #
8
- # DataCite is free software; you can redistribute it and/or modify it
9
- # under the terms of the Revised BSD License; see LICENSE file for
10
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-FileCopyrightText: 2019 Caltech.
3
+ # SPDX-License-Identifier: BSD-3-Clause
11
4
 
12
5
  """DataCite v4.2 JSON to XML transformations."""
13
6
 
@@ -1,13 +1,6 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- # Copyright (C) 2019 Caltech.
7
- #
8
- # DataCite is free software; you can redistribute it and/or modify it
9
- # under the terms of the Revised BSD License; see LICENSE file for
10
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-FileCopyrightText: 2019 Caltech.
3
+ # SPDX-License-Identifier: BSD-3-Clause
11
4
 
12
5
  """DataCite v4.3 JSON to XML transformations."""
13
6
 
@@ -1,14 +1,7 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- # Copyright (C) 2019 Caltech.
7
- # Copyright (C) 2024 IBT Czech Academy of Sciences.
8
- #
9
- # DataCite is free software; you can redistribute it and/or modify it
10
- # under the terms of the Revised BSD License; see LICENSE file for
11
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-FileCopyrightText: 2019 Caltech.
3
+ # SPDX-FileCopyrightText: 2024 IBT Czech Academy of Sciences.
4
+ # SPDX-License-Identifier: BSD-3-Clause
12
5
 
13
6
  """DataCite v4.5 JSON to XML transformations."""
14
7
 
@@ -1,12 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- #
7
- # DataCite is free software; you can redistribute it and/or modify it
8
- # under the terms of the Revised BSD License; see LICENSE file for
9
- # more details.
1
+ # SPDX-FileCopyrightText: 2016 CERN.
2
+ # SPDX-License-Identifier: BSD-3-Clause
10
3
 
11
4
  """XML utilities."""
12
5
 
@@ -0,0 +1,78 @@
1
+ # SPDX-FileCopyrightText: 2015-2016 CERN.
2
+ # SPDX-FileCopyrightText: 2024 California Institute of Technology
3
+ # SPDX-FileCopyrightText: 2026 Graz University of Technology.
4
+ # SPDX-FileCopyrightText: 2026 TU Wien.
5
+ # SPDX-License-Identifier: MIT
6
+
7
+ [project]
8
+ name = "datacite"
9
+ description = "A Python client for DataCite MDS and REST APIs."
10
+ readme = "README.rst"
11
+ requires-python = ">=3.9"
12
+ license = "BSD-3-Clause"
13
+ authors = [
14
+ { name = "Invenio Collaboration", email = "info@inveniosoftware.org" },
15
+ ]
16
+ keywords = [
17
+ "datacite",
18
+ "doi",
19
+ ]
20
+ classifiers = [
21
+ "Development Status :: 5 - Production/Stable",
22
+ "Intended Audience :: Developers",
23
+ "License :: OSI Approved :: BSD License",
24
+ "Operating System :: OS Independent",
25
+ "Programming Language :: Python :: 3",
26
+ "Topic :: Utilities",
27
+ ]
28
+ dependencies = [
29
+ "idutils>=1.0.0",
30
+ "jsonresolver>=0.5.0",
31
+ "jsonschema>=3.0.0",
32
+ "lxml>=4.5.2",
33
+ "requests>=2.12.2",
34
+ ]
35
+ dynamic = ["version"]
36
+
37
+ [project.urls]
38
+ Repository = "https://github.com/inveniosoftware/datacite"
39
+
40
+ [project.optional-dependencies]
41
+ all = [
42
+ "datacite[tests]",
43
+ ]
44
+ docs = [
45
+ "sphinx>=4.5.0",
46
+ ]
47
+ tests = [
48
+ "datacite[docs]",
49
+ "mock>=1.3.0",
50
+ "pytest-black>=0.6.0",
51
+ "pytest-invenio>=1.4.0",
52
+ "responses>=0.10.6",
53
+ ]
54
+
55
+ [build-system]
56
+ requires = ["hatchling"]
57
+ build-backend = "hatchling.build"
58
+
59
+ [tool.hatch.version]
60
+ path = "datacite/__init__.py"
61
+
62
+ [tool.hatch.build.targets.sdist]
63
+ include = [
64
+ "/datacite",
65
+ ]
66
+
67
+ [tool.isort]
68
+ profile = "black"
69
+
70
+ [tool.pydocstyle]
71
+ add_ignore = "D401"
72
+
73
+ [tool.pytest.ini_options]
74
+ addopts = '--black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=datacite --cov-report=term-missing'
75
+ markers = "pw: tests that require a password (will only run with '--runpw' option)"
76
+ norecursedirs = "tests/example"
77
+ testpaths = "tests datacite"
78
+ live_server_scope = "module"
@@ -1,10 +0,0 @@
1
- # This file is part of DataCite.
2
- #
3
- # Copyright (C) 2015 CERN.
4
- #
5
- # DataCite is free software; you can redistribute it and/or modify it
6
- # under the terms of the Revised BSD License; see LICENSE file for
7
- # more details.
8
-
9
- [run]
10
- source = datacite
@@ -1,30 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of DataCite.
4
- #
5
- # Copyright (C) 2016 CERN.
6
- #
7
- # DataCite is free software; you can redistribute it and/or modify it
8
- # under the terms of the Revised BSD License; see LICENSE file for
9
- # more details.
10
-
11
- root = true
12
-
13
- [*]
14
- indent_style = space
15
- end_of_line = lf
16
- insert_final_newline = true
17
- trim_trailing_whitespace = true
18
- charset = utf-8
19
-
20
- # RST files (used by sphinx)
21
- [*.rst]
22
- indent_size = 4
23
-
24
- # CSS, HTML, JS, JSON, YML
25
- [*.{css,html,js,json,yml}]
26
- indent_size = 2
27
-
28
- # Matches the exact files either package.json or .github/workflows/*.yml
29
- [{package.json, .github/workflows/*.yml}]
30
- indent_size = 2
@@ -1 +0,0 @@
1
- 6daf1c04852608e858b2fac183036b7ad207ca1e
@@ -1,26 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of Invenio.
4
- # Copyright (C) 2021-2025 California Institute of Technology.
5
- #
6
- # Invenio is free software; you can redistribute it and/or modify it
7
- # under the terms of the MIT License; see LICENSE file for more details
8
-
9
- name: GitHub Release
10
-
11
- on:
12
- push:
13
- tags:
14
- - v*
15
-
16
- jobs:
17
- Release:
18
- runs-on: ubuntu-latest
19
-
20
- steps:
21
- - name: "GitHub Release"
22
-
23
- uses: "marvinpinto/action-automatic-releases@latest"
24
- with:
25
- repo_token: "${{ secrets.GITHUB_TOKEN }}"
26
- prerelease: false
@@ -1,43 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of Invenio.
4
- # Copyright (C) 2020 CERN.
5
- #
6
- # Invenio is free software; you can redistribute it and/or modify it
7
- # under the terms of the MIT License; see LICENSE file for more details
8
-
9
- name: Publish
10
-
11
- on:
12
- push:
13
- tags:
14
- - v*
15
-
16
- jobs:
17
- Publish:
18
- runs-on: ubuntu-latest
19
-
20
- steps:
21
- - name: Checkout
22
- uses: actions/checkout@v4
23
-
24
- - name: Set up Python
25
- uses: actions/setup-python@v5
26
- with:
27
- python-version: 3.9
28
-
29
- - name: Install dependencies
30
- run: |
31
- python -m pip install --upgrade pip
32
- pip install setuptools wheel
33
-
34
- - name: Build package
35
- run: python setup.py sdist bdist_wheel
36
-
37
- - name: Publish on PyPI
38
- uses: pypa/gh-action-pypi-publish@v1.13.0
39
- with:
40
- user: __token__
41
- # The token is provided by the inveniosoftware organization
42
- password: ${{ secrets.pypi_token }}
43
-
@@ -1,54 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2020-2024 CERN.
4
- # Copyright (C) 2020 Northwestern University.
5
- # Copyright (C) 2022 Graz University of Technology.
6
- #
7
- # Datacite is free software; you can redistribute it and/or modify it
8
- # under the terms of the MIT License; see LICENSE file for more details.
9
-
10
- name: CI
11
-
12
- on:
13
- push:
14
- branches: master
15
- pull_request:
16
- branches: master
17
- schedule:
18
- # * is a special character in YAML so you have to quote this string
19
- - cron: "0 3 * * 6"
20
- workflow_dispatch:
21
- inputs:
22
- reason:
23
- description: "Reason"
24
- required: false
25
- default: "Manual trigger"
26
-
27
- jobs:
28
- Tests:
29
- runs-on: ubuntu-latest
30
- strategy:
31
- fail-fast: false
32
- matrix:
33
- python-version: ["3.9", "3.12"]
34
-
35
- steps:
36
- - name: Checkout
37
- uses: actions/checkout@v4
38
-
39
- - name: Set up Python ${{ matrix.python-version }}
40
- uses: actions/setup-python@v5
41
- with:
42
- python-version: ${{ matrix.python-version }}
43
- cache: pip
44
- cache-dependency-path: setup.cfg
45
-
46
- - name: Install dependencies
47
- run: |
48
- pip install .[all]
49
- pip freeze
50
-
51
- - name: Run tests
52
- run: ./run-tests.sh
53
-
54
-
@@ -1,18 +0,0 @@
1
- # Read the Docs configuration file for Sphinx projects
2
- # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
-
4
-
5
- # Required
6
- version: 2
7
-
8
- build:
9
- os: ubuntu-22.04
10
- tools:
11
- python: "3.12"
12
-
13
- sphinx:
14
- configuration: docs/conf.py
15
-
16
- python:
17
- install:
18
- - requirements: docs/requirements.txt