invenio-vocabularies 5.0.2__py2.py3-none-any.whl → 5.1.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.
- invenio_vocabularies/__init__.py +1 -1
- invenio_vocabularies/contrib/funders/config.py +8 -3
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v2.0.0.json +17 -1
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v2.0.0.json +17 -1
- invenio_vocabularies/services/service.py +5 -8
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/METADATA +11 -1
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/RECORD +12 -12
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/AUTHORS.rst +0 -0
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/LICENSE +0 -0
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/WHEEL +0 -0
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/entry_points.txt +0 -0
- {invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/top_level.txt +0 -0
invenio_vocabularies/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2022 CERN.
|
|
3
|
+
# Copyright (C) 2022-2024 CERN.
|
|
4
4
|
#
|
|
5
5
|
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
6
6
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"""Vocabulary funders configuration."""
|
|
10
10
|
|
|
11
11
|
from flask import current_app
|
|
12
|
+
from invenio_i18n import get_locale
|
|
12
13
|
from invenio_i18n import lazy_gettext as _
|
|
13
14
|
from invenio_records_resources.services import SearchOptions
|
|
14
15
|
from invenio_records_resources.services.records.components import DataComponent
|
|
@@ -22,6 +23,7 @@ funder_schemes = LocalProxy(lambda: current_app.config["VOCABULARIES_FUNDER_SCHE
|
|
|
22
23
|
funder_fundref_doi_prefix = LocalProxy(
|
|
23
24
|
lambda: current_app.config["VOCABULARIES_FUNDER_DOI_PREFIX"]
|
|
24
25
|
)
|
|
26
|
+
localized_title = LocalProxy(lambda: f"title.{get_locale()}^20")
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
class FundersSearchOptions(SearchOptions):
|
|
@@ -30,9 +32,12 @@ class FundersSearchOptions(SearchOptions):
|
|
|
30
32
|
suggest_parser_cls = SuggestQueryParser.factory(
|
|
31
33
|
fields=[
|
|
32
34
|
"name^100",
|
|
35
|
+
"acronym.keyword^100",
|
|
36
|
+
"acronym^40",
|
|
37
|
+
localized_title,
|
|
38
|
+
"id^20",
|
|
39
|
+
"aliases^20",
|
|
33
40
|
"identifiers.identifier^10",
|
|
34
|
-
"acronym^10",
|
|
35
|
-
"aliases^10",
|
|
36
41
|
],
|
|
37
42
|
type="most_fields", # https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#multi-match-types
|
|
38
43
|
fuzziness="AUTO", # https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
|
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"normalizer": {
|
|
33
|
+
"accent_normalizer": {
|
|
34
|
+
"type": "custom",
|
|
35
|
+
"char_filter": ["strip_special_chars"],
|
|
36
|
+
"filter": [
|
|
37
|
+
"lowercase",
|
|
38
|
+
"asciifolding"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
32
42
|
"filter": {
|
|
33
43
|
"lowercase": {
|
|
34
44
|
"type": "lowercase",
|
|
@@ -112,7 +122,13 @@
|
|
|
112
122
|
"acronym": {
|
|
113
123
|
"type": "text",
|
|
114
124
|
"analyzer": "accent_edge_analyzer",
|
|
115
|
-
"search_analyzer": "accent_analyzer"
|
|
125
|
+
"search_analyzer": "accent_analyzer",
|
|
126
|
+
"fields": {
|
|
127
|
+
"keyword": {
|
|
128
|
+
"type": "keyword",
|
|
129
|
+
"normalizer": "accent_normalizer"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
116
132
|
},
|
|
117
133
|
"status": {
|
|
118
134
|
"type": "keyword"
|
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"normalizer": {
|
|
33
|
+
"accent_normalizer": {
|
|
34
|
+
"type": "custom",
|
|
35
|
+
"char_filter": ["strip_special_chars"],
|
|
36
|
+
"filter": [
|
|
37
|
+
"lowercase",
|
|
38
|
+
"asciifolding"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
32
42
|
"filter": {
|
|
33
43
|
"lowercase": {
|
|
34
44
|
"type": "lowercase",
|
|
@@ -112,7 +122,13 @@
|
|
|
112
122
|
"acronym": {
|
|
113
123
|
"type": "text",
|
|
114
124
|
"analyzer": "accent_edge_analyzer",
|
|
115
|
-
"search_analyzer": "accent_analyzer"
|
|
125
|
+
"search_analyzer": "accent_analyzer",
|
|
126
|
+
"fields": {
|
|
127
|
+
"keyword": {
|
|
128
|
+
"type": "keyword",
|
|
129
|
+
"normalizer": "accent_normalizer"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
116
132
|
},
|
|
117
133
|
"status": {
|
|
118
134
|
"type": "keyword"
|
|
@@ -12,14 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import sqlalchemy as sa
|
|
14
14
|
from invenio_cache import current_cache
|
|
15
|
-
from invenio_records_resources.services import
|
|
16
|
-
Link,
|
|
17
|
-
LinksTemplate,
|
|
18
|
-
RecordService,
|
|
19
|
-
RecordServiceConfig,
|
|
20
|
-
SearchOptions,
|
|
21
|
-
pagination_links,
|
|
22
|
-
)
|
|
15
|
+
from invenio_records_resources.services import LinksTemplate, RecordService
|
|
23
16
|
from invenio_records_resources.services.base.utils import map_search_params
|
|
24
17
|
from invenio_records_resources.services.records.schema import ServiceSchemaWrapper
|
|
25
18
|
from invenio_records_resources.services.uow import unit_of_work
|
|
@@ -32,6 +25,10 @@ from .tasks import process_datastream
|
|
|
32
25
|
class VocabularyTypeService(RecordService):
|
|
33
26
|
"""Vocabulary type service."""
|
|
34
27
|
|
|
28
|
+
def rebuild_index(self, identity, uow=None):
|
|
29
|
+
"""Raise error since services are not backed by search indices."""
|
|
30
|
+
raise NotImplementedError()
|
|
31
|
+
|
|
35
32
|
def search(self, identity, params=None):
|
|
36
33
|
"""Search for vocabulary types entries."""
|
|
37
34
|
self.require_permission(identity, "list_vocabularies")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: invenio-vocabularies
|
|
3
|
-
Version: 5.0
|
|
3
|
+
Version: 5.1.0
|
|
4
4
|
Summary: Invenio module for managing vocabularies.
|
|
5
5
|
Home-page: https://github.com/inveniosoftware/invenio-vocabularies
|
|
6
6
|
Author: CERN
|
|
@@ -81,6 +81,16 @@ https://invenio-vocabularies.readthedocs.io/
|
|
|
81
81
|
Changes
|
|
82
82
|
=======
|
|
83
83
|
|
|
84
|
+
Version v5.1.0 (released 2024-09-25)
|
|
85
|
+
|
|
86
|
+
- funders: tune search boost for acronyms
|
|
87
|
+
* Add and `acronym.keyword` field to the funders mapping.
|
|
88
|
+
* Apply to funders the same field boosting as in affiliations.
|
|
89
|
+
|
|
90
|
+
Version v5.0.3 (released 2024-09-06)
|
|
91
|
+
|
|
92
|
+
- services: skip index rebuilding
|
|
93
|
+
|
|
84
94
|
Version v5.0.2 (released 2024-08-28)
|
|
85
95
|
|
|
86
96
|
- ror: use datePublished as fallback date for dataset timestamp
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
invenio_vocabularies/__init__.py,sha256=
|
|
1
|
+
invenio_vocabularies/__init__.py,sha256=EY0EBDXPeTzwN5DQMUlFBqdRhHxUqKpyOeWjvG3og0U,377
|
|
2
2
|
invenio_vocabularies/cli.py,sha256=ToGc5dcGarDwNUgUXGqHIRT-3Uv1rleyFLKenwZdyBw,5719
|
|
3
3
|
invenio_vocabularies/config.py,sha256=sOkJdmnfoSftfpH7msZEC6Eyo61Q3RQ7V2mMeE5LPAM,5157
|
|
4
4
|
invenio_vocabularies/ext.py,sha256=GujJ4UARd4Fxf4z7zznRk9JAgHamZuYCOdrKU5czg00,5987
|
|
@@ -87,7 +87,7 @@ invenio_vocabularies/contrib/common/ror/__init__.py,sha256=3u2-fre1SQ-4nz3Ay0nxj
|
|
|
87
87
|
invenio_vocabularies/contrib/common/ror/datastreams.py,sha256=7VaQUGtc4j0fX6P16csjAUgIVxSDEySrdZ5QZ57RD_g,7941
|
|
88
88
|
invenio_vocabularies/contrib/funders/__init__.py,sha256=YxFXBDnT7NM8rFwxT_Ge3xXR2n17EM0alknQq7r_Bt8,478
|
|
89
89
|
invenio_vocabularies/contrib/funders/api.py,sha256=QKGGeSnPHSoBfucvpaVruXT_txYidofZ080G3IxFkIo,306
|
|
90
|
-
invenio_vocabularies/contrib/funders/config.py,sha256=
|
|
90
|
+
invenio_vocabularies/contrib/funders/config.py,sha256=EU7UrwLOkr2Bem9Skz_HJIxyBQRkXEdPT8zIuV8vbzI,2217
|
|
91
91
|
invenio_vocabularies/contrib/funders/datastreams.py,sha256=3tOwcN1mK5AVqtdU6KdguouGSUurPTO-FDWTKzK1eRo,2481
|
|
92
92
|
invenio_vocabularies/contrib/funders/facets.py,sha256=a068TVtt74Ncu0latb177LFK8EdnpbMOWecAKozA04M,1245
|
|
93
93
|
invenio_vocabularies/contrib/funders/funders.py,sha256=F2AQWv7IfSovThoKPEmlQbxbbmv7gNzIxDoSCaL5D0U,2338
|
|
@@ -101,10 +101,10 @@ invenio_vocabularies/contrib/funders/jsonschemas/funders/funder-v1.0.0.json,sha2
|
|
|
101
101
|
invenio_vocabularies/contrib/funders/mappings/__init__.py,sha256=aSr-tZd9rsjet6leeS336gdSdZHXwZKdaPStNtVNQVk,244
|
|
102
102
|
invenio_vocabularies/contrib/funders/mappings/os-v1/__init__.py,sha256=xXEX3tacmXp0I1KFtDw7ohIahozd2oIGp1UN40IhFic,251
|
|
103
103
|
invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v1.0.0.json,sha256=E7Zp4IHsQGdaxVrksr-SaQtieV7tV0W6-LgGe231G1w,1646
|
|
104
|
-
invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v2.0.0.json,sha256=
|
|
104
|
+
invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v2.0.0.json,sha256=31shkTYZDvx7tSCnOA4OlqRmQ0IEv2qhePJsIStReJo,3385
|
|
105
105
|
invenio_vocabularies/contrib/funders/mappings/os-v2/__init__.py,sha256=YvMRlKYTnEmyTzI9smZp_lO3w-zcK-8IpqT-jGUXEEY,251
|
|
106
106
|
invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v1.0.0.json,sha256=E7Zp4IHsQGdaxVrksr-SaQtieV7tV0W6-LgGe231G1w,1646
|
|
107
|
-
invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v2.0.0.json,sha256=
|
|
107
|
+
invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v2.0.0.json,sha256=31shkTYZDvx7tSCnOA4OlqRmQ0IEv2qhePJsIStReJo,3385
|
|
108
108
|
invenio_vocabularies/contrib/funders/mappings/v7/__init__.py,sha256=yFHmi3QYD65YKzLU5vMEtwAZn0gwkFYa6Db_tSbHjKE,254
|
|
109
109
|
invenio_vocabularies/contrib/funders/mappings/v7/funders/funder-v1.0.0.json,sha256=E7Zp4IHsQGdaxVrksr-SaQtieV7tV0W6-LgGe231G1w,1646
|
|
110
110
|
invenio_vocabularies/contrib/names/__init__.py,sha256=DBfsM7JMETZGaV5QmXEwE7zhCaAXvc2SZN6uXnW_V-c,451
|
|
@@ -187,7 +187,7 @@ invenio_vocabularies/services/permissions.py,sha256=nU1t_aW-RimFTWHbg9SivfzoP3P2
|
|
|
187
187
|
invenio_vocabularies/services/querystr.py,sha256=X3JHVF9B0O0iLWrnW3ok_bf_8jA-Cs_oAcYYkGOm3Uw,1829
|
|
188
188
|
invenio_vocabularies/services/results.py,sha256=6LZIpzWSbt9wpRNWgjA1uIM4RFooOYTkHcp5-PnIJdU,3767
|
|
189
189
|
invenio_vocabularies/services/schema.py,sha256=mwIBFylpQlWw1M6h_axc-z4Yd7X3Z1S0PxJOlZGpfrQ,4634
|
|
190
|
-
invenio_vocabularies/services/service.py,sha256=
|
|
190
|
+
invenio_vocabularies/services/service.py,sha256=9QQDsG1WShCpBVFze-Dnq-iC2BwNX_0-qzfzrpImJo8,6469
|
|
191
191
|
invenio_vocabularies/services/tasks.py,sha256=AH0XifkOypsEdh8LyjmlHnPLQK5qqUJC8cNVWGkbqks,788
|
|
192
192
|
invenio_vocabularies/services/custom_fields/__init__.py,sha256=QgvSsn-S1xLzbZ57pjjGTt5oI3HqzXHVjwGTtuPgzN8,421
|
|
193
193
|
invenio_vocabularies/services/custom_fields/subject.py,sha256=ZM-ZkaxoouF9lL62smOtLxsjQQZwiQs0jG3qGruP6nY,2231
|
|
@@ -290,10 +290,10 @@ invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo,sha256=g1I5aNO8r
|
|
|
290
290
|
invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po,sha256=vg8qC8ofpAdJ3mQz7mWM1ylKDpiNWXFs7rlMdSPkgKk,4629
|
|
291
291
|
invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo,sha256=cqSm8NtMAwrP9O6qbmtkDtRT1e9D93qpsJN5X9_PPVw,600
|
|
292
292
|
invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po,sha256=9ACePz_EpB-LfcIJajZ2kp8Q04tcdrQLOtug162ZUss,4115
|
|
293
|
-
invenio_vocabularies-5.0.
|
|
294
|
-
invenio_vocabularies-5.0.
|
|
295
|
-
invenio_vocabularies-5.0.
|
|
296
|
-
invenio_vocabularies-5.0.
|
|
297
|
-
invenio_vocabularies-5.0.
|
|
298
|
-
invenio_vocabularies-5.0.
|
|
299
|
-
invenio_vocabularies-5.0.
|
|
293
|
+
invenio_vocabularies-5.1.0.dist-info/AUTHORS.rst,sha256=8d0p_WWE1r9DavvzMDi2D4YIGBHiMYcN3LYxqQOj8sY,291
|
|
294
|
+
invenio_vocabularies-5.1.0.dist-info/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
|
|
295
|
+
invenio_vocabularies-5.1.0.dist-info/METADATA,sha256=q58QaH3-DlcUWMppE5PDWV1vf8FsIE4rWiT_mCvoaNo,9111
|
|
296
|
+
invenio_vocabularies-5.1.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
|
|
297
|
+
invenio_vocabularies-5.1.0.dist-info/entry_points.txt,sha256=qHHFkyU3r0COsKm5gCYuhP8tfsioBggxKAiEXNAbbjM,2803
|
|
298
|
+
invenio_vocabularies-5.1.0.dist-info/top_level.txt,sha256=x1gRNbaODF_bCD0SBLM3nVOFPGi06cmGX5X94WKrFKk,21
|
|
299
|
+
invenio_vocabularies-5.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{invenio_vocabularies-5.0.2.dist-info → invenio_vocabularies-5.1.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|