oarepo-runtime 1.5.49__py3-none-any.whl → 1.5.50__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/services/schema/validation.py +11 -0
- {oarepo_runtime-1.5.49.dist-info → oarepo_runtime-1.5.50.dist-info}/METADATA +2 -1
- {oarepo_runtime-1.5.49.dist-info → oarepo_runtime-1.5.50.dist-info}/RECORD +7 -7
- {oarepo_runtime-1.5.49.dist-info → oarepo_runtime-1.5.50.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.49.dist-info → oarepo_runtime-1.5.50.dist-info}/WHEEL +0 -0
- {oarepo_runtime-1.5.49.dist-info → oarepo_runtime-1.5.50.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.49.dist-info → oarepo_runtime-1.5.50.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,22 @@
|
|
1
1
|
import functools
|
2
2
|
import re
|
3
3
|
from datetime import datetime
|
4
|
+
from idutils import normalize_pid
|
4
5
|
|
5
6
|
from marshmallow.exceptions import ValidationError
|
6
7
|
from marshmallow_utils.fields.edtfdatestring import EDTFValidator
|
7
8
|
|
8
9
|
|
10
|
+
def validate_identifier(value):
|
11
|
+
try:
|
12
|
+
value["identifier"] = normalize_pid(
|
13
|
+
value["identifier"], value["scheme"].lower()
|
14
|
+
)
|
15
|
+
except:
|
16
|
+
raise ValidationError(f"Invalid {value['scheme']} value {value['identifier']}")
|
17
|
+
return value
|
18
|
+
|
19
|
+
|
9
20
|
def validate_date(date_format):
|
10
21
|
def validate(value):
|
11
22
|
try:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: oarepo-runtime
|
3
|
-
Version: 1.5.
|
3
|
+
Version: 1.5.50
|
4
4
|
Summary: A set of runtime extensions of Invenio repository
|
5
5
|
Description-Content-Type: text/markdown
|
6
6
|
License-File: LICENSE
|
@@ -12,6 +12,7 @@ Requires-Dist: flask-babelex
|
|
12
12
|
Requires-Dist: deepmerge
|
13
13
|
Requires-Dist: tqdm
|
14
14
|
Requires-Dist: deprecated
|
15
|
+
Requires-Dist: idutils
|
15
16
|
Provides-Extra: dev
|
16
17
|
Requires-Dist: pytest>=7.1.2; extra == "dev"
|
17
18
|
Requires-Dist: black; extra == "dev"
|
@@ -107,7 +107,7 @@ oarepo_runtime/services/schema/marshmallow.py,sha256=LmcSxvbZ9jIhkNHCqqxt1SA2UNi
|
|
107
107
|
oarepo_runtime/services/schema/oneofschema.py,sha256=GnWH4Or_G5M0NgSmCoqMI6PBrJg5AC9RHrcB5QDKRq0,6661
|
108
108
|
oarepo_runtime/services/schema/polymorphic.py,sha256=bAbUoTIeDBiJPYPhpLEKKZekEdkHlpqkmNxk1hN3PDw,564
|
109
109
|
oarepo_runtime/services/schema/ui.py,sha256=xQgW-zLyZoHldGw47uVtXQj-5LexVNKTholyq4MiBZo,3777
|
110
|
-
oarepo_runtime/services/schema/validation.py,sha256=
|
110
|
+
oarepo_runtime/services/schema/validation.py,sha256=uIDJ0Phh62tDE0Mme-7Z3R_2TZY7k0MwjB3hrn5be_g,1356
|
111
111
|
oarepo_runtime/translations/default_translations.py,sha256=060GBlA1ghWxfeumo6NqxCCZDb-6OezOuF6pr-_GEOQ,104
|
112
112
|
oarepo_runtime/translations/jinjax_messages.jinja,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
113
113
|
oarepo_runtime/translations/messages.pot,sha256=QvwHdrmqwaYpZIsnVTEmsk7MnG8J2Sy32_8aGFyfz_o,1303
|
@@ -119,9 +119,9 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
119
119
|
oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
|
120
120
|
oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
|
121
121
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
122
|
-
oarepo_runtime-1.5.
|
123
|
-
oarepo_runtime-1.5.
|
124
|
-
oarepo_runtime-1.5.
|
125
|
-
oarepo_runtime-1.5.
|
126
|
-
oarepo_runtime-1.5.
|
127
|
-
oarepo_runtime-1.5.
|
122
|
+
oarepo_runtime-1.5.50.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
123
|
+
oarepo_runtime-1.5.50.dist-info/METADATA,sha256=xQpEggK1Cf6lcWFJaKCZMUMEz_T1ZmiIVGtYqoFp23k,4720
|
124
|
+
oarepo_runtime-1.5.50.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
125
|
+
oarepo_runtime-1.5.50.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
|
126
|
+
oarepo_runtime-1.5.50.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
127
|
+
oarepo_runtime-1.5.50.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|