invenio-vocabularies 8.1.0__py2.py3-none-any.whl → 8.2.1__py2.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.

Potentially problematic release.


This version of invenio-vocabularies might be problematic. Click here for more details.

Files changed (142) hide show
  1. invenio_vocabularies/__init__.py +1 -1
  2. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/i18next.js +2 -2
  3. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/_generatedTranslations.js +66 -0
  4. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/messages.po +96 -0
  5. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/translations.json +25 -25
  6. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/messages.po +94 -0
  7. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/translations.json +5 -5
  8. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/messages.po +94 -0
  9. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/translations.json +7 -7
  10. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/messages.po +97 -0
  11. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/translations.json +26 -26
  12. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/messages.po +94 -0
  13. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/translations.json +1 -1
  14. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/messages.po +98 -0
  15. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/translations.json +26 -26
  16. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/messages.po +94 -0
  17. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/translations.json +7 -7
  18. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/messages.po +88 -0
  19. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/messages.po +96 -0
  20. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/translations.json +25 -25
  21. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/messages.po +95 -0
  22. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/translations.json +16 -16
  23. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/messages.po +94 -0
  24. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/translations.json +6 -6
  25. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/messages.po +96 -0
  26. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/translations.json +10 -10
  27. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/messages.po +94 -0
  28. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/translations.json +5 -5
  29. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/messages.po +96 -0
  30. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/translations.json +25 -25
  31. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/index.js +24 -1
  32. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/messages.po +96 -0
  33. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/translations.json +8 -8
  34. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/messages.po +94 -0
  35. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/translations.json +5 -5
  36. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/messages.po +94 -0
  37. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/translations.json +7 -7
  38. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/messages.po +90 -0
  39. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/translations.json +28 -0
  40. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/messages.po +94 -0
  41. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/translations.json +7 -7
  42. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/messages.po +94 -0
  43. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/translations.json +6 -6
  44. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/messages.po +94 -0
  45. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/translations.json +6 -6
  46. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/messages.po +94 -0
  47. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/translations.json +4 -4
  48. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/messages.po +95 -0
  49. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/translations.json +16 -16
  50. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/messages.po +95 -0
  51. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/translations.json +10 -10
  52. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/messages.po +94 -0
  53. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/translations.json +5 -5
  54. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/messages.po +98 -0
  55. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/translations.json +26 -26
  56. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/messages.po +96 -0
  57. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/translations.json +10 -10
  58. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/messages.po +94 -0
  59. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/translations.json +16 -16
  60. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/messages.po +96 -0
  61. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/translations.json +14 -14
  62. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/messages.po +94 -0
  63. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/translations.json +5 -5
  64. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/package.json +4 -34
  65. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/translations.pot +3 -3
  66. invenio_vocabularies/contrib/common/ror/datastreams.py +9 -5
  67. invenio_vocabularies/contrib/names/datastreams.py +46 -22
  68. invenio_vocabularies/datastreams/datastreams.py +6 -0
  69. invenio_vocabularies/jobs.py +8 -5
  70. invenio_vocabularies/services/tasks.py +2 -2
  71. invenio_vocabularies/translations/ar/LC_MESSAGES/messages.mo +0 -0
  72. invenio_vocabularies/translations/ar/LC_MESSAGES/messages.po +199 -67
  73. invenio_vocabularies/translations/bg/LC_MESSAGES/messages.mo +0 -0
  74. invenio_vocabularies/translations/bg/LC_MESSAGES/messages.po +190 -58
  75. invenio_vocabularies/translations/ca/LC_MESSAGES/messages.mo +0 -0
  76. invenio_vocabularies/translations/ca/LC_MESSAGES/messages.po +192 -59
  77. invenio_vocabularies/translations/cs/LC_MESSAGES/messages.mo +0 -0
  78. invenio_vocabularies/translations/cs/LC_MESSAGES/messages.po +218 -80
  79. invenio_vocabularies/translations/da/LC_MESSAGES/messages.mo +0 -0
  80. invenio_vocabularies/translations/da/LC_MESSAGES/messages.po +188 -56
  81. invenio_vocabularies/translations/de/LC_MESSAGES/messages.mo +0 -0
  82. invenio_vocabularies/translations/de/LC_MESSAGES/messages.po +215 -71
  83. invenio_vocabularies/translations/el/LC_MESSAGES/messages.mo +0 -0
  84. invenio_vocabularies/translations/el/LC_MESSAGES/messages.po +192 -60
  85. invenio_vocabularies/translations/es/LC_MESSAGES/messages.mo +0 -0
  86. invenio_vocabularies/translations/es/LC_MESSAGES/messages.po +199 -66
  87. invenio_vocabularies/translations/et/LC_MESSAGES/messages.mo +0 -0
  88. invenio_vocabularies/translations/et/LC_MESSAGES/messages.po +198 -66
  89. invenio_vocabularies/translations/fa/LC_MESSAGES/messages.mo +0 -0
  90. invenio_vocabularies/translations/fa/LC_MESSAGES/messages.po +190 -58
  91. invenio_vocabularies/translations/fr/LC_MESSAGES/messages.mo +0 -0
  92. invenio_vocabularies/translations/fr/LC_MESSAGES/messages.po +207 -72
  93. invenio_vocabularies/translations/hr/LC_MESSAGES/messages.mo +0 -0
  94. invenio_vocabularies/translations/hr/LC_MESSAGES/messages.po +190 -58
  95. invenio_vocabularies/translations/hu/LC_MESSAGES/messages.mo +0 -0
  96. invenio_vocabularies/translations/hu/LC_MESSAGES/messages.po +202 -66
  97. invenio_vocabularies/translations/it/LC_MESSAGES/messages.mo +0 -0
  98. invenio_vocabularies/translations/it/LC_MESSAGES/messages.po +193 -61
  99. invenio_vocabularies/translations/ja/LC_MESSAGES/messages.mo +0 -0
  100. invenio_vocabularies/translations/ja/LC_MESSAGES/messages.po +190 -58
  101. invenio_vocabularies/translations/ka/LC_MESSAGES/messages.mo +0 -0
  102. invenio_vocabularies/translations/ka/LC_MESSAGES/messages.po +192 -60
  103. invenio_vocabularies/translations/ko/LC_MESSAGES/messages.mo +0 -0
  104. invenio_vocabularies/translations/ko/LC_MESSAGES/messages.po +275 -0
  105. invenio_vocabularies/translations/lt/LC_MESSAGES/messages.mo +0 -0
  106. invenio_vocabularies/translations/lt/LC_MESSAGES/messages.po +192 -60
  107. invenio_vocabularies/translations/messages.pot +133 -48
  108. invenio_vocabularies/translations/no/LC_MESSAGES/messages.mo +0 -0
  109. invenio_vocabularies/translations/no/LC_MESSAGES/messages.po +190 -58
  110. invenio_vocabularies/translations/pl/LC_MESSAGES/messages.mo +0 -0
  111. invenio_vocabularies/translations/pl/LC_MESSAGES/messages.po +190 -58
  112. invenio_vocabularies/translations/pt/LC_MESSAGES/messages.mo +0 -0
  113. invenio_vocabularies/translations/pt/LC_MESSAGES/messages.po +190 -58
  114. invenio_vocabularies/translations/ro/LC_MESSAGES/messages.mo +0 -0
  115. invenio_vocabularies/translations/ro/LC_MESSAGES/messages.po +208 -71
  116. invenio_vocabularies/translations/ru/LC_MESSAGES/messages.mo +0 -0
  117. invenio_vocabularies/translations/ru/LC_MESSAGES/messages.po +199 -66
  118. invenio_vocabularies/translations/sk/LC_MESSAGES/messages.mo +0 -0
  119. invenio_vocabularies/translations/sk/LC_MESSAGES/messages.po +193 -60
  120. invenio_vocabularies/translations/sv/LC_MESSAGES/messages.mo +0 -0
  121. invenio_vocabularies/translations/sv/LC_MESSAGES/messages.po +204 -69
  122. invenio_vocabularies/translations/tr/LC_MESSAGES/messages.mo +0 -0
  123. invenio_vocabularies/translations/tr/LC_MESSAGES/messages.po +205 -71
  124. invenio_vocabularies/translations/uk/LC_MESSAGES/messages.mo +0 -0
  125. invenio_vocabularies/translations/uk/LC_MESSAGES/messages.po +192 -60
  126. invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
  127. invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po +197 -65
  128. invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
  129. invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po +190 -58
  130. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/METADATA +20 -2
  131. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/RECORD +136 -108
  132. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/i18next-scanner.config.js +0 -63
  133. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/package-lock.json +0 -1992
  134. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/scripts/compileCatalog.js +0 -39
  135. invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/scripts/initCatalog.js +0 -19
  136. invenio_vocabularies/translations/en/LC_MESSAGES/messages.mo +0 -0
  137. invenio_vocabularies/translations/en/LC_MESSAGES/messages.po +0 -53
  138. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/WHEEL +0 -0
  139. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/entry_points.txt +0 -0
  140. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/licenses/AUTHORS.rst +0 -0
  141. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/licenses/LICENSE +0 -0
  142. {invenio_vocabularies-8.1.0.dist-info → invenio_vocabularies-8.2.1.dist-info}/top_level.txt +0 -0
@@ -1,28 +1,28 @@
1
1
  {
2
- "Search for a funder by name": "",
3
- "Funder": "",
4
- "Search for funder...": "",
2
+ "Search for a funder by name": "按姓名搜索资助者",
3
+ "Funder": "资助机构",
4
+ "Search for funder...": "搜索资助机构…",
5
5
  "Additional information": "",
6
- "optional": "",
7
- "Number": "",
6
+ "optional": "可选择的",
7
+ "Number": "编号",
8
8
  "Award/Grant number": "",
9
- "Title": "",
9
+ "Title": "标题",
10
10
  "Award/Grant Title": "",
11
- "URL": "",
11
+ "URL": "统一资源定位系统",
12
12
  "Award/Grant URL": "",
13
- "Add": "",
14
- "Add custom": "",
15
- "Edit": "",
16
- "Remove": "",
17
- "Open external link": "",
13
+ "Add": "添加",
14
+ "Add custom": "添加自定义",
15
+ "Edit": "编辑",
16
+ "Remove": "移除",
17
+ "Open external link": "打开外部链接",
18
18
  "Funder is required.": "",
19
19
  "URL must be valid.": "",
20
20
  "URL must be set alongside title or number.": "",
21
21
  "Add standard award/grant": "",
22
22
  "Add custom funding": "",
23
23
  "Search for awards/grants": "",
24
- "Cancel": "",
25
- "Change": "",
24
+ "Cancel": "取消",
25
+ "Change": "更改",
26
26
  "Did not find your award/grant? ": "",
27
27
  "Add a custom award/grant.": ""
28
28
  }
@@ -0,0 +1,94 @@
1
+ #
2
+ # Translators:
3
+ # Tibor Simko <tibor.simko@cern.ch>, 2025
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: i18next-conv\n"
8
+ "POT-Creation-Date: 2025-07-08T15:47:17.169Z\n"
9
+ "PO-Revision-Date: 2025-05-13 21:01+0000\n"
10
+ "Last-Translator: Tibor Simko <tibor.simko@cern.ch>, 2025\n"
11
+ "Language-Team: Chinese (Taiwan) (https://app.transifex.com/inveniosoftware/teams/23537/zh_TW/)\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Language: zh_TW\n"
15
+ "Plural-Forms: nplurals=1; plural=0;\n"
16
+ "mime-version: 1.0\n"
17
+
18
+ msgid "Search for a funder by name"
19
+ msgstr ""
20
+
21
+ msgid "Funder"
22
+ msgstr ""
23
+
24
+ msgid "Search for funder..."
25
+ msgstr ""
26
+
27
+ msgid "Additional information"
28
+ msgstr ""
29
+
30
+ msgid "optional"
31
+ msgstr "可選擇的"
32
+
33
+ msgid "Number"
34
+ msgstr ""
35
+
36
+ msgid "Award/Grant number"
37
+ msgstr ""
38
+
39
+ msgid "Title"
40
+ msgstr "標題"
41
+
42
+ msgid "Award/Grant Title"
43
+ msgstr ""
44
+
45
+ msgid "URL"
46
+ msgstr ""
47
+
48
+ msgid "Award/Grant URL"
49
+ msgstr ""
50
+
51
+ msgid "Add"
52
+ msgstr ""
53
+
54
+ msgid "Add custom"
55
+ msgstr ""
56
+
57
+ msgid "Edit"
58
+ msgstr "編輯"
59
+
60
+ msgid "Remove"
61
+ msgstr "移除"
62
+
63
+ msgid "Open external link"
64
+ msgstr ""
65
+
66
+ msgid "Funder is required."
67
+ msgstr ""
68
+
69
+ msgid "URL must be valid."
70
+ msgstr ""
71
+
72
+ msgid "URL must be set alongside title or number."
73
+ msgstr ""
74
+
75
+ msgid "Add standard award/grant"
76
+ msgstr ""
77
+
78
+ msgid "Add custom funding"
79
+ msgstr ""
80
+
81
+ msgid "Search for awards/grants"
82
+ msgstr ""
83
+
84
+ msgid "Cancel"
85
+ msgstr "取消"
86
+
87
+ msgid "Change"
88
+ msgstr ""
89
+
90
+ msgid "Did not find your award/grant? "
91
+ msgstr ""
92
+
93
+ msgid "Add a custom award/grant."
94
+ msgstr ""
@@ -3,17 +3,17 @@
3
3
  "Funder": "",
4
4
  "Search for funder...": "",
5
5
  "Additional information": "",
6
- "optional": "",
6
+ "optional": "可選擇的",
7
7
  "Number": "",
8
8
  "Award/Grant number": "",
9
- "Title": "",
9
+ "Title": "標題",
10
10
  "Award/Grant Title": "",
11
11
  "URL": "",
12
12
  "Award/Grant URL": "",
13
13
  "Add": "",
14
14
  "Add custom": "",
15
- "Edit": "",
16
- "Remove": "",
15
+ "Edit": "編輯",
16
+ "Remove": "移除",
17
17
  "Open external link": "",
18
18
  "Funder is required.": "",
19
19
  "URL must be valid.": "",
@@ -21,7 +21,7 @@
21
21
  "Add standard award/grant": "",
22
22
  "Add custom funding": "",
23
23
  "Search for awards/grants": "",
24
- "Cancel": "",
24
+ "Cancel": "取消",
25
25
  "Change": "",
26
26
  "Did not find your award/grant? ": "",
27
27
  "Add a custom award/grant.": ""
@@ -1,37 +1,7 @@
1
1
  {
2
2
  "name": "invenio-vocabularies-ui",
3
3
  "config": {
4
- "languages": [
5
- "ar",
6
- "bg",
7
- "ca",
8
- "cs",
9
- "da",
10
- "de",
11
- "el",
12
- "en",
13
- "es",
14
- "et",
15
- "fa",
16
- "fr",
17
- "hr",
18
- "hu",
19
- "it",
20
- "ja",
21
- "ka",
22
- "lt",
23
- "no",
24
- "pl",
25
- "pt",
26
- "ro",
27
- "ru",
28
- "sk",
29
- "sv",
30
- "tr",
31
- "uk",
32
- "zh_CN",
33
- "zh_TW"
34
- ]
4
+ "languages": ["en"]
35
5
  },
36
6
  "devDependencies": {
37
7
  "i18next-conv": "^10.2.0",
@@ -41,9 +11,9 @@
41
11
  "i18next-browser-languagedetector": "^6.1.0"
42
12
  },
43
13
  "scripts": {
44
- "extract_messages": "i18next-scanner --config i18next-scanner.config.js '../../js/**/*.{js,jsx}'",
45
- "postextract_messages": "i18next-conv -l en -s ./messages/en/translations.json -t ./translations.pot",
14
+ "extract_messages": "i18next-scanner --config i18next-scanner.config.js '../../js/**/*.{js,jsx}' '!../../js/**/node_modules/**'",
15
+ "postextract_messages": "node ./scripts/postExtractMessages.js",
46
16
  "compile_catalog": "node ./scripts/compileCatalog.js",
47
- "init_catalog": "node ./scripts/initCatalog"
17
+ "init_catalog": "node ./scripts/initCatalog.js"
48
18
  }
49
19
  }
@@ -5,8 +5,8 @@ msgstr ""
5
5
  "Content-Type: text/plain; charset=utf-8\n"
6
6
  "Content-Transfer-Encoding: 8bit\n"
7
7
  "Plural-Forms: nplurals=2; plural=(n != 1)\n"
8
- "POT-Creation-Date: 2025-05-13T09:10:50.615Z\n"
9
- "PO-Revision-Date: 2025-05-13T09:10:50.616Z\n"
8
+ "POT-Creation-Date: 2025-07-08T15:47:17.169Z\n"
9
+ "PO-Revision-Date: 2025-07-08T15:47:17.170Z\n"
10
10
  "Language: en\n"
11
11
 
12
12
  msgid "Search for a funder by name"
@@ -85,4 +85,4 @@ msgid "Did not find your award/grant? "
85
85
  msgstr "Did not find your award/grant? "
86
86
 
87
87
  msgid "Add a custom award/grant."
88
- msgstr "Add a custom award/grant."
88
+ msgstr "Add a custom award/grant."
@@ -10,8 +10,8 @@
10
10
  """ROR-related Datastreams Readers/Writers/Transformers module."""
11
11
 
12
12
  import io
13
+ from datetime import datetime
13
14
 
14
- import arrow
15
15
  import requests
16
16
  from flask import current_app
17
17
  from idutils import normalize_ror
@@ -52,9 +52,11 @@ class RORHTTPReader(BaseReader):
52
52
  json_ld_reponse.raise_for_status()
53
53
  json_ld_data = json_ld_reponse.json()
54
54
 
55
- last_dump_date = arrow.get(
56
- json_ld_data.get("dateCreated")
57
- or json_ld_data.get("datePublished")
55
+ last_dump_date = json_ld_data.get(
56
+ "dateCreated"
57
+ ) or json_ld_data.get("datePublished")
58
+ last_dump_date = datetime.fromisoformat(
59
+ last_dump_date.replace("Z", "+00:00")
58
60
  )
59
61
  return last_dump_date
60
62
  else:
@@ -93,7 +95,9 @@ class RORHTTPReader(BaseReader):
93
95
 
94
96
  if self._since and self._since != "None":
95
97
  last_dump_date = self._get_last_dump_date(linksets)
96
- if last_dump_date < arrow.get(self._since):
98
+ since = datetime.fromisoformat(self._since)
99
+
100
+ if last_dump_date < since:
97
101
  current_app.logger.info(
98
102
  f"Skipping ROR data dump (last dump: {last_dump_date}, since: {self._since})"
99
103
  )
@@ -11,13 +11,12 @@
11
11
  import csv
12
12
  import io
13
13
  import tarfile
14
- from concurrent.futures import ThreadPoolExecutor, as_completed
14
+ from concurrent.futures import ThreadPoolExecutor
15
15
  from contextvars import copy_context
16
- from datetime import timedelta
16
+ from datetime import datetime, timedelta
17
17
  from itertools import islice
18
18
  from pathlib import Path
19
19
 
20
- import arrow
21
20
  import regex as re
22
21
  from flask import current_app
23
22
  from invenio_access.permissions import system_identity
@@ -66,12 +65,16 @@ class OrcidDataSyncReader(BaseReader):
66
65
 
67
66
  Yield ORCiDs to sync until the last sync date is reached.
68
67
  """
69
- date_format = "YYYY-MM-DD HH:mm:ss.SSSSSS"
70
- date_format_no_millis = "YYYY-MM-DD HH:mm:ss"
71
- time_shift = current_app.config["VOCABULARIES_ORCID_SYNC_SINCE"]
68
+ date_format = "%Y-%m-%d %H:%M:%S.%f"
69
+ date_format_no_millis = "%Y-%m-%d %H:%M:%S"
70
+
72
71
  if self.since:
73
- time_shift = self.since
74
- last_sync = arrow.now() - timedelta(**time_shift)
72
+ last_sync = datetime.now()
73
+ else:
74
+ last_sync = datetime.now() - timedelta(
75
+ **current_app.config["VOCABULARIES_ORCID_SYNC_SINCE"]
76
+ )
77
+
75
78
  try:
76
79
  content = io.TextIOWrapper(fileobj, encoding="utf-8")
77
80
  csv_reader = csv.DictReader(content)
@@ -82,9 +85,11 @@ class OrcidDataSyncReader(BaseReader):
82
85
  # Lambda file is ordered by last modified date
83
86
  last_modified_str = row["last_modified"]
84
87
  try:
85
- last_modified_date = arrow.get(last_modified_str, date_format)
86
- except arrow.parser.ParserError:
87
- last_modified_date = arrow.get(
88
+ last_modified_date = datetime.strptime(
89
+ last_modified_str, date_format
90
+ )
91
+ except Exception:
92
+ last_modified_date = datetime.strptime(
88
93
  last_modified_str, date_format_no_millis
89
94
  )
90
95
 
@@ -262,26 +267,43 @@ class OrcidTransformer(BaseTransformer):
262
267
  record = stream_entry.entry
263
268
  person = record["person"]
264
269
  orcid_id = record["orcid-identifier"]["path"]
270
+ errors = []
271
+
272
+ name = person.get("name", None)
273
+ family_name = name.get("family-name", None) if name else None
274
+ given_names = name.get("given-names", None) if name else None
265
275
 
266
- name = person.get("name")
267
276
  if name is None:
268
- raise TransformerError(
269
- f"Name not found in ORCiD entry for ORCiD ID: {orcid_id}."
277
+ errors.append(
278
+ TransformerError(
279
+ f"Name not found in ORCiD entry for ORCiD ID: {orcid_id}."
280
+ )
270
281
  )
271
- if name.get("family-name") is None:
272
- raise TransformerError(
273
- f"Family name not found in ORCiD entry for ORCiD ID: {orcid_id}."
282
+ if family_name is None:
283
+ errors.append(
284
+ TransformerError(
285
+ f"Family name not found in ORCiD entry for ORCiD ID: {orcid_id}."
286
+ )
287
+ )
288
+ if not self._is_valid_name(given_names + family_name):
289
+ errors.append(
290
+ TransformerError(
291
+ f"Invalid characters in name for ORCiD ID: {orcid_id}."
292
+ )
274
293
  )
275
294
 
276
- if not self._is_valid_name(name["given-names"] + name["family-name"]):
277
- raise TransformerError(
278
- f"Invalid characters in name for ORCiD ID: {orcid_id}."
295
+ if errors:
296
+ all_errors = "\n".join(str(e) for e in errors)
297
+ error_message = (
298
+ f"ORCiD entry with ORCiD ID: #{orcid_id} failed transformation. "
299
+ f"See errors:\n{all_errors}"
279
300
  )
301
+ stream_entry.errors.append(error_message)
280
302
 
281
303
  entry = {
282
304
  "id": orcid_id,
283
- "given_name": name.get("given-names"),
284
- "family_name": name.get("family-name"),
305
+ "given_name": given_names,
306
+ "family_name": family_name,
285
307
  "identifiers": [{"scheme": "orcid", "identifier": orcid_id}],
286
308
  "affiliations": self._extract_affiliations(record),
287
309
  }
@@ -292,6 +314,8 @@ class OrcidTransformer(BaseTransformer):
292
314
 
293
315
  def _is_valid_name(self, name):
294
316
  """Check whether the name passes the regex."""
317
+ if not name:
318
+ return False
295
319
  if not self._names_exclude_regex:
296
320
  return True
297
321
  return not bool(re.search(self._names_exclude_regex, name, re.UNICODE | re.V1))
@@ -79,6 +79,7 @@ class DataStream:
79
79
  """Process a batch of entries."""
80
80
  current_app.logger.info(f"Processing batch of size: {len(batch)}")
81
81
  transformed_entries = []
82
+ transformed_entries_with_errors = []
82
83
  for stream_entry in batch:
83
84
  if stream_entry.errors:
84
85
  current_app.logger.warning(
@@ -88,12 +89,17 @@ class DataStream:
88
89
  else:
89
90
  transformed_entry = self.transform(stream_entry)
90
91
  if transformed_entry.errors:
92
+ transformed_entries_with_errors.append(transformed_entry)
91
93
  yield transformed_entry
92
94
  elif self.filter(transformed_entry):
93
95
  transformed_entry.filtered = True
94
96
  yield transformed_entry
95
97
  else:
96
98
  transformed_entries.append(transformed_entry)
99
+ if transformed_entries_with_errors:
100
+ current_app.logger.warning(
101
+ f"Skipping {len(transformed_entries_with_errors)} transformed entries with errors."
102
+ )
97
103
  if transformed_entries:
98
104
  if self.write_many:
99
105
  yield from self.batch_write(transformed_entries)
@@ -8,8 +8,6 @@
8
8
 
9
9
  """Jobs module."""
10
10
 
11
- import datetime
12
-
13
11
  from invenio_i18n import lazy_gettext as _
14
12
  from invenio_jobs.jobs import JobType
15
13
 
@@ -40,7 +38,7 @@ class ProcessRORAffiliationsJob(ProcessDataStreamJob):
40
38
  "config": {
41
39
  "readers": [
42
40
  {
43
- "args": {"since": str(since)},
41
+ "args": {"since": since},
44
42
  "type": "ror-http",
45
43
  },
46
44
  {"args": {"regex": "_schema_v2\\.json$"}, "type": "zip"},
@@ -78,7 +76,7 @@ class ProcessRORFundersJob(ProcessDataStreamJob):
78
76
  "config": {
79
77
  "readers": [
80
78
  {
81
- "args": {"since": str(since)},
79
+ "args": {"since": since},
82
80
  "type": "ror-http",
83
81
  },
84
82
  {"args": {"regex": "_schema_v2\\.json$"}, "type": "zip"},
@@ -173,4 +171,9 @@ class ImportORCIDJob(ProcessDataStreamJob):
173
171
  @classmethod
174
172
  def build_task_arguments(cls, job_obj, since=None, **kwargs):
175
173
  """Process ORCID data."""
176
- return {"config": {**ORCID_PRESET_DATASTREAM_CONFIG}}
174
+ task_args = {"config": {**ORCID_PRESET_DATASTREAM_CONFIG}}
175
+ for reader in task_args["config"]["readers"]:
176
+ # Assign since to all readers of the ORCID job
177
+ # It is the responsibility of the reader to handle it or ignore it
178
+ reader["args"] = {**reader.get("args", {}), "since": str(since)}
179
+ return task_args
@@ -9,7 +9,7 @@
9
9
 
10
10
  from celery import shared_task
11
11
  from flask import current_app
12
- from invenio_jobs.errors import TaskExecutionError
12
+ from invenio_jobs.errors import TaskExecutionPartialError
13
13
 
14
14
  from ..datastreams.factories import DataStreamFactory
15
15
 
@@ -31,6 +31,6 @@ def process_datastream(config):
31
31
  current_app.logger.error(err)
32
32
  entries_with_errors += 1
33
33
  if entries_with_errors:
34
- raise TaskExecutionError(
34
+ raise TaskExecutionPartialError(
35
35
  message=f"Task execution succeeded with {entries_with_errors} entries with errors."
36
36
  )