oarepo-runtime 1.5.108__py3-none-any.whl → 1.5.110__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.
- oarepo_runtime/resources/resource.py +1 -1
- oarepo_runtime/services/schema/rdm.py +2 -2
- oarepo_runtime/services/schema/rdm_ui.py +15 -4
- oarepo_runtime/services/service.py +1 -1
- {oarepo_runtime-1.5.108.dist-info → oarepo_runtime-1.5.110.dist-info}/METADATA +1 -1
- {oarepo_runtime-1.5.108.dist-info → oarepo_runtime-1.5.110.dist-info}/RECORD +10 -10
- {oarepo_runtime-1.5.108.dist-info → oarepo_runtime-1.5.110.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.108.dist-info → oarepo_runtime-1.5.110.dist-info}/WHEEL +0 -0
- {oarepo_runtime-1.5.108.dist-info → oarepo_runtime-1.5.110.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.108.dist-info → oarepo_runtime-1.5.110.dist-info}/top_level.txt +0 -0
@@ -10,8 +10,8 @@ from invenio_vocabularies.contrib.awards.schema import AwardRelationSchema
|
|
10
10
|
from invenio_vocabularies.contrib.funders.schema import FunderRelationSchema
|
11
11
|
from invenio_i18n.selectors import get_locale
|
12
12
|
|
13
|
-
class RDMRecordMixin(ma.Schema):
|
14
13
|
|
14
|
+
class RDMRecordMixin(ma.Schema):
|
15
15
|
versions = NestedAttribute(VersionsSchema, dump_only=True)
|
16
16
|
deletion_status = ma_fields.Nested(DeletionStatusSchema, dump_only=True)
|
17
17
|
|
@@ -22,7 +22,7 @@ class MultilingualAwardSchema(AwardRelationSchema):
|
|
22
22
|
|
23
23
|
@pre_load()
|
24
24
|
def convert_to_multilingual(self, data, many, **kwargs):
|
25
|
-
if "title" in data:
|
25
|
+
if "title" in data and type(data["title"]) is str:
|
26
26
|
lang = get_locale()
|
27
27
|
data["title"] = {lang: data["title"]}
|
28
28
|
return data
|
@@ -2,20 +2,24 @@ import marshmallow as ma
|
|
2
2
|
from oarepo_runtime.services.schema.marshmallow import DictOnlySchema
|
3
3
|
from oarepo_vocabularies.services.ui_schema import VocabularyI18nStrUIField
|
4
4
|
|
5
|
+
|
5
6
|
class RDMIdentifierWithSchemaUISchema(ma.Schema):
|
6
7
|
scheme = ma.fields.String(
|
7
8
|
required=True,
|
8
9
|
)
|
9
10
|
identifier = ma.fields.String(required=True)
|
10
11
|
|
12
|
+
|
11
13
|
class RDMAwardIdentifierUISchema(ma.Schema):
|
12
14
|
identifier = ma.fields.String()
|
13
15
|
|
16
|
+
|
14
17
|
class RDMAwardSubjectUISchema(ma.Schema):
|
15
18
|
_id = ma.fields.String(data_key="id")
|
16
19
|
|
17
20
|
subject = ma.fields.String()
|
18
21
|
|
22
|
+
|
19
23
|
class RDMAwardOrganizationUISchema(ma.Schema):
|
20
24
|
schema = ma.fields.String()
|
21
25
|
|
@@ -23,6 +27,7 @@ class RDMAwardOrganizationUISchema(ma.Schema):
|
|
23
27
|
|
24
28
|
organization = ma.fields.String()
|
25
29
|
|
30
|
+
|
26
31
|
class RDMFunderVocabularyUISchema(DictOnlySchema):
|
27
32
|
class Meta:
|
28
33
|
unknown = ma.INCLUDE
|
@@ -31,7 +36,7 @@ class RDMFunderVocabularyUISchema(DictOnlySchema):
|
|
31
36
|
|
32
37
|
_version = ma.fields.String(data_key="@v", attribute="@v")
|
33
38
|
|
34
|
-
name =
|
39
|
+
name = ma.fields.String()
|
35
40
|
|
36
41
|
identifiers = ma.fields.List(ma.fields.Nested(RDMIdentifierWithSchemaUISchema()))
|
37
42
|
|
@@ -44,6 +49,7 @@ class RDMRoleVocabularyUISchema(DictOnlySchema):
|
|
44
49
|
|
45
50
|
_version = ma.fields.String(data_key="@v", attribute="@v")
|
46
51
|
|
52
|
+
|
47
53
|
class RDMAwardVocabularyUISchema(DictOnlySchema):
|
48
54
|
class Meta:
|
49
55
|
unknown = ma.INCLUDE
|
@@ -69,6 +75,7 @@ class RDMAwardVocabularyUISchema(DictOnlySchema):
|
|
69
75
|
|
70
76
|
class RDMFundersUISchema(ma.Schema):
|
71
77
|
"""Funding ui schema."""
|
78
|
+
|
72
79
|
class Meta:
|
73
80
|
unknown = ma.RAISE
|
74
81
|
|
@@ -100,15 +107,19 @@ class RDMAffiliationVocabularyUISchema(DictOnlySchema):
|
|
100
107
|
|
101
108
|
_version = ma.fields.String(data_key="@v", attribute="@v")
|
102
109
|
|
103
|
-
name =
|
110
|
+
name = ma.fields.String()
|
111
|
+
|
104
112
|
|
105
113
|
class RDMCreatorsUISchema(ma.Schema):
|
106
114
|
"""Funding ui schema."""
|
115
|
+
|
107
116
|
class Meta:
|
108
117
|
unknown = ma.RAISE
|
109
118
|
|
110
119
|
role = ma.fields.Nested(lambda: RDMRoleVocabularyUISchema())
|
111
120
|
|
112
|
-
affiliations = ma.fields.List(
|
121
|
+
affiliations = ma.fields.List(
|
122
|
+
ma.fields.Nested(lambda: RDMAffiliationVocabularyUISchema())
|
123
|
+
)
|
113
124
|
|
114
|
-
person_or_org = ma.fields.Nested(RDMPersonOrOrganizationUISchema())
|
125
|
+
person_or_org = ma.fields.Nested(RDMPersonOrOrganizationUISchema())
|
@@ -80,13 +80,13 @@ oarepo_runtime/resources/config.py,sha256=GEM3A7lvGgWUdhBR85uJbaQDKg2-Xk5U-Jm4Jm
|
|
80
80
|
oarepo_runtime/resources/file_resource.py,sha256=Ta3bFce7l0xwqkkOMOEu9mxbB8BbKj5HUHRHmidhnl8,414
|
81
81
|
oarepo_runtime/resources/json_serializer.py,sha256=82_-xQEtxKaPakv8R1oBAFbGnxskF_Ve4tcfcy4PetI,963
|
82
82
|
oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=3V9cJaG_e1PMXKVX_wKfBp1LmbeForwHyBNYdyha4uQ,1878
|
83
|
-
oarepo_runtime/resources/resource.py,sha256=
|
83
|
+
oarepo_runtime/resources/resource.py,sha256=GK5yGnJIjH60wGqqDoOfwMQQFQDLZhJpU4zBJOmABI8,2063
|
84
84
|
oarepo_runtime/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
85
85
|
oarepo_runtime/services/components.py,sha256=0aqmuNbGCQhfOI22f6mM2DxuKSTqstGOGyisOiqw9KE,15481
|
86
86
|
oarepo_runtime/services/generators.py,sha256=j87HitHA_w2awsz0C5IAAJ0qjg9JMtvdO3dvh6FQyfg,250
|
87
87
|
oarepo_runtime/services/results.py,sha256=Ap2mUJHl3V4BSduTrBWPuco0inQVq0QsuCbVhez48uY,5705
|
88
88
|
oarepo_runtime/services/search.py,sha256=t0WEe2VrbCzZ06-Jgz7C9-pc9y27BqAgTEXldEHskfk,9409
|
89
|
-
oarepo_runtime/services/service.py,sha256=
|
89
|
+
oarepo_runtime/services/service.py,sha256=TI2ulEVlSR7HZnfPYltLl8Vf4O9fhJ7rHaV6G4HWbrc,1893
|
90
90
|
oarepo_runtime/services/config/__init__.py,sha256=559w4vphVAipa420OwTsxGUP-b7idoqSIX13FSJyVz0,783
|
91
91
|
oarepo_runtime/services/config/link_conditions.py,sha256=evPRd5XU76Ok4J-08bBfplbHZ019rl74FpJmO8iM5yg,3298
|
92
92
|
oarepo_runtime/services/config/permissions_presets.py,sha256=jV3Ft7xFdBaeShoa3Q3Q-HHWP-wOX4XYDTRzWwUVL7g,7151
|
@@ -129,8 +129,8 @@ oarepo_runtime/services/schema/marshmallow.py,sha256=iAMMH5MlYs59qetXAHOROvERNSc
|
|
129
129
|
oarepo_runtime/services/schema/marshmallow_to_json_schema.py,sha256=VYLnVWHOoaxWCD_gqJO8-8u1SbaPEFBjDZ5HGgGr0Ow,2027
|
130
130
|
oarepo_runtime/services/schema/oneofschema.py,sha256=GnWH4Or_G5M0NgSmCoqMI6PBrJg5AC9RHrcB5QDKRq0,6661
|
131
131
|
oarepo_runtime/services/schema/polymorphic.py,sha256=bAbUoTIeDBiJPYPhpLEKKZekEdkHlpqkmNxk1hN3PDw,564
|
132
|
-
oarepo_runtime/services/schema/rdm.py,sha256=
|
133
|
-
oarepo_runtime/services/schema/rdm_ui.py,sha256=
|
132
|
+
oarepo_runtime/services/schema/rdm.py,sha256=dBy1KCJ_XYAN_cffoRqLfQVEdZOKwmSpqGdEP4OL64k,1280
|
133
|
+
oarepo_runtime/services/schema/rdm_ui.py,sha256=KO7UGrejhaFa65CdcQ96K7jpQSdj_35CYa2pwpgxf1s,3051
|
134
134
|
oarepo_runtime/services/schema/ui.py,sha256=hHbj1S-DW1WqgYX31f6UjarY4wrE-qFLpH3oUhvGLyE,6192
|
135
135
|
oarepo_runtime/services/schema/validation.py,sha256=VFOKSxQLHwFb7bW8BJAFXWe_iTAZFOfqOnb2Ko_Yxxc,2085
|
136
136
|
oarepo_runtime/translations/default_translations.py,sha256=060GBlA1ghWxfeumo6NqxCCZDb-6OezOuF6pr-_GEOQ,104
|
@@ -146,9 +146,9 @@ tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
146
146
|
tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
|
147
147
|
tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
|
148
148
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
149
|
-
oarepo_runtime-1.5.
|
150
|
-
oarepo_runtime-1.5.
|
151
|
-
oarepo_runtime-1.5.
|
152
|
-
oarepo_runtime-1.5.
|
153
|
-
oarepo_runtime-1.5.
|
154
|
-
oarepo_runtime-1.5.
|
149
|
+
oarepo_runtime-1.5.110.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
150
|
+
oarepo_runtime-1.5.110.dist-info/METADATA,sha256=_cnrjQse_wazsslxvPFW21ep9YEP3BwZcDHXnZjyBUk,4721
|
151
|
+
oarepo_runtime-1.5.110.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
152
|
+
oarepo_runtime-1.5.110.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
|
153
|
+
oarepo_runtime-1.5.110.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
154
|
+
oarepo_runtime-1.5.110.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|