invenio-vocabularies 6.3.1__py2.py3-none-any.whl → 6.4.0__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.

@@ -10,6 +10,6 @@
10
10
 
11
11
  from .ext import InvenioVocabularies
12
12
 
13
- __version__ = "6.3.1"
13
+ __version__ = "6.4.0"
14
14
 
15
15
  __all__ = ("__version__", "InvenioVocabularies")
@@ -74,7 +74,10 @@ class OpenAIREProjectTransformer(BaseTransformer):
74
74
 
75
75
  funding = next(iter(record.get("funding", [])), None)
76
76
  if funding:
77
- program = funding.get("fundingStream", {}).get("id", "")
77
+ funding_stream_id = funding.get("fundingStream", {}).get("id", "")
78
+ # Example funding stream ID: `EC::HE::HORIZON-AG-UN`. We need the `HE`
79
+ # string, i.e. the second "part" of the identifier.
80
+ program = next(iter(funding_stream_id.split("::")[1:2]), "")
78
81
  if program:
79
82
  award["program"] = program
80
83
 
@@ -131,3 +131,66 @@ class ProcessRORFundersJob(ProcessDataStreamJob):
131
131
  "transformers": [{"type": "ror-funders"}],
132
132
  }
133
133
  }
134
+
135
+
136
+ class ImportAwardsOpenAIREJob(ProcessDataStreamJob):
137
+ """Import awards from OpenAIRE registered task."""
138
+
139
+ description = "Import awards from OpenAIRE"
140
+ title = "Import Awards OpenAIRE"
141
+ id = "import_awards_openaire"
142
+
143
+ @classmethod
144
+ def default_args(cls, job_obj, **kwargs):
145
+ """Generate default job arguments."""
146
+ return {
147
+ "config": {
148
+ "readers": [
149
+ {
150
+ "type": "openaire-http",
151
+ "args": {"origin": "diff", "tar_href": "/project.tar"},
152
+ },
153
+ {
154
+ "type": "tar",
155
+ "args": {
156
+ "mode": "r",
157
+ "regex": "\\.json.gz$",
158
+ },
159
+ },
160
+ {"type": "gzip"},
161
+ {"type": "jsonl"},
162
+ ],
163
+ "transformers": [{"type": "openaire-award"}],
164
+ "writers": [
165
+ {"args": {"writer": {"type": "awards-service"}}, "type": "async"}
166
+ ],
167
+ }
168
+ }
169
+
170
+
171
+ class UpdateAwardsCordisJob(ProcessDataStreamJob):
172
+ """Update awards from CORDIS registered task."""
173
+
174
+ description = "Update awards from CORDIS"
175
+ title = "Update Awards CORDIS"
176
+ id = "update_awards_cordis"
177
+
178
+ @classmethod
179
+ def default_args(cls, job_obj, **kwargs):
180
+ """Generate default job arguments."""
181
+ return {
182
+ "config": {
183
+ "readers": [
184
+ {"args": {"origin": "HE"}, "type": "cordis-project-http"},
185
+ {"args": {"mode": "r", "regex": "\\.xml$"}, "type": "zip"},
186
+ {"args": {"root_element": "project"}, "type": "xml"},
187
+ ],
188
+ "transformers": [{"type": "cordis-award"}],
189
+ "writers": [
190
+ {
191
+ "args": {"writer": {"type": "cordis-awards-service"}},
192
+ "type": "async",
193
+ }
194
+ ],
195
+ }
196
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: invenio-vocabularies
3
- Version: 6.3.1
3
+ Version: 6.4.0
4
4
  Summary: Invenio module for managing vocabularies.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-vocabularies
6
6
  Author: CERN
@@ -83,6 +83,11 @@ https://invenio-vocabularies.readthedocs.io/
83
83
  Changes
84
84
  =======
85
85
 
86
+ Version v6.4.0 (released 2024-10-15)
87
+
88
+ - jobs: add import awards OpenAIRE; Update CORDIS
89
+ - awards: rollback to use the 2nd part of funding stream as program
90
+
86
91
  Version v6.3.1 (released 2024-10-11)
87
92
 
88
93
  - jobs: pass since as string to task
@@ -1,10 +1,10 @@
1
- invenio_vocabularies/__init__.py,sha256=hDg_LXDMIoa_G123kgz3K8g9J3LghXoNWpYs4e3YSE4,377
1
+ invenio_vocabularies/__init__.py,sha256=jky3oxkIimkLgucO1IDyWkzGZqBqrjPrgFGLkFtnx8s,377
2
2
  invenio_vocabularies/cli.py,sha256=S3lBsLxsSYa83sCDaGZr5mP7TwPvmmwxzzbB13h8VBI,5856
3
3
  invenio_vocabularies/config.py,sha256=bpNKVgwfb7bgkP5zbmoawnAMD6bHWXIJV-6CpEhi-M8,5752
4
4
  invenio_vocabularies/ext.py,sha256=GujJ4UARd4Fxf4z7zznRk9JAgHamZuYCOdrKU5czg00,5987
5
5
  invenio_vocabularies/factories.py,sha256=mVg4yGKe58e4uS8rYe0DmIO6oMpmtNTcK3wH9eM5jVU,4380
6
6
  invenio_vocabularies/fixtures.py,sha256=nNWwH04HFASjfj1oy5kMdcQGKmVjzUuA5wSw-ER1QAg,1585
7
- invenio_vocabularies/jobs.py,sha256=LxLt3zmfgulDdf5z7RGB70QF8GMPzgdD4vAGf8ZQENY,4285
7
+ invenio_vocabularies/jobs.py,sha256=OoQOBQoWOLHZ16EMlVM54OezgO58u_aMDemAjbCuUk8,6371
8
8
  invenio_vocabularies/proxies.py,sha256=k7cTUgWfnCoYIuNqAj_VFi1zBN33KNNclRSVnBkObEM,711
9
9
  invenio_vocabularies/views.py,sha256=PNJ5nvc3O7ASwNe56xmqy5YaU9n3UYF3W2JwvtE_kYs,1561
10
10
  invenio_vocabularies/webpack.py,sha256=hzTM0qx6iiRHkmjti53yuZ5ebfPMR5mpO9uNewBat74,1891
@@ -68,7 +68,7 @@ invenio_vocabularies/contrib/awards/__init__.py,sha256=KwCmwFalz-3pDs9iTa5TKUidB
68
68
  invenio_vocabularies/contrib/awards/api.py,sha256=OXukE7PLXs45BTtqVrhvGBNqLmQaI-CgXmHTCi36LZk,303
69
69
  invenio_vocabularies/contrib/awards/awards.py,sha256=tOLvcvTPiN1gn1QAl-hSh1bwcclg8Kx2ZMmJMEhI7vk,2959
70
70
  invenio_vocabularies/contrib/awards/config.py,sha256=PlDHabkWDUzwa1Fvk_U2hG83kQYBqM1IyChg8Yg_VlY,1630
71
- invenio_vocabularies/contrib/awards/datastreams.py,sha256=k7GtQ0pmY9EehYUtus45G6opJb8v2Kc63YIn5zO4SU8,14004
71
+ invenio_vocabularies/contrib/awards/datastreams.py,sha256=4J6JFCqYosDO8y4FRq-LTWgRNPbeH4Tj4Tur6ziChtY,14234
72
72
  invenio_vocabularies/contrib/awards/models.py,sha256=mM-kSNf7kDH3oIbV8epxxbUi7muYqi4JreXxgWXlVzw,318
73
73
  invenio_vocabularies/contrib/awards/resources.py,sha256=_9YTqbhz8axFXGhG5y4WyjE27p9n-7e3c6HoBRditPA,411
74
74
  invenio_vocabularies/contrib/awards/schema.py,sha256=P_k9EONMMx0eWpALVuhGBzZlDeh4599elLlmMis-Vko,3302
@@ -297,10 +297,10 @@ invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo,sha256=g1I5aNO8r
297
297
  invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po,sha256=vg8qC8ofpAdJ3mQz7mWM1ylKDpiNWXFs7rlMdSPkgKk,4629
298
298
  invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo,sha256=cqSm8NtMAwrP9O6qbmtkDtRT1e9D93qpsJN5X9_PPVw,600
299
299
  invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po,sha256=9ACePz_EpB-LfcIJajZ2kp8Q04tcdrQLOtug162ZUss,4115
300
- invenio_vocabularies-6.3.1.dist-info/AUTHORS.rst,sha256=8d0p_WWE1r9DavvzMDi2D4YIGBHiMYcN3LYxqQOj8sY,291
301
- invenio_vocabularies-6.3.1.dist-info/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
302
- invenio_vocabularies-6.3.1.dist-info/METADATA,sha256=i448NUrQmoezzIp3sY16Lxd2aQ4OKNUOdoOWCrtWUIo,10103
303
- invenio_vocabularies-6.3.1.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
304
- invenio_vocabularies-6.3.1.dist-info/entry_points.txt,sha256=P9wLzJDDXGd4BEzRX4ylmnWge8wg_Q9jI0NBxNRVA2Q,2972
305
- invenio_vocabularies-6.3.1.dist-info/top_level.txt,sha256=x1gRNbaODF_bCD0SBLM3nVOFPGi06cmGX5X94WKrFKk,21
306
- invenio_vocabularies-6.3.1.dist-info/RECORD,,
300
+ invenio_vocabularies-6.4.0.dist-info/AUTHORS.rst,sha256=8d0p_WWE1r9DavvzMDi2D4YIGBHiMYcN3LYxqQOj8sY,291
301
+ invenio_vocabularies-6.4.0.dist-info/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
302
+ invenio_vocabularies-6.4.0.dist-info/METADATA,sha256=bex12nauN9gFRDmQpgZPHPfhUM3Hrdd7K41hGPwogsI,10260
303
+ invenio_vocabularies-6.4.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
304
+ invenio_vocabularies-6.4.0.dist-info/entry_points.txt,sha256=xskfdwhOV074XHL1g8x8BZ6BNsdZ6D7XPVqcU5JqB2g,3118
305
+ invenio_vocabularies-6.4.0.dist-info/top_level.txt,sha256=x1gRNbaODF_bCD0SBLM3nVOFPGi06cmGX5X94WKrFKk,21
306
+ invenio_vocabularies-6.4.0.dist-info/RECORD,,
@@ -50,8 +50,10 @@ vocabulary_model = invenio_vocabularies.records.models
50
50
  invenio_vocabularies = invenio_vocabularies
51
51
 
52
52
  [invenio_jobs.jobs]
53
+ import_awards_openaire = invenio_vocabularies.jobs:ImportAwardsOpenAIREJob
53
54
  process_ror_affiliations = invenio_vocabularies.jobs:ProcessRORAffiliationsJob
54
55
  process_ror_funders = invenio_vocabularies.jobs:ProcessRORFundersJob
56
+ update_awards_cordis = invenio_vocabularies.jobs:UpdateAwardsCordisJob
55
57
 
56
58
  [invenio_jsonschemas.schemas]
57
59
  affiliations = invenio_vocabularies.contrib.affiliations.jsonschemas