oarepo-runtime 1.4.13__py3-none-any.whl → 1.4.15__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.
Files changed (28) hide show
  1. oarepo_runtime/cf/__init__.py +1 -1
  2. oarepo_runtime/cf/cli.py +0 -1
  3. oarepo_runtime/cf/mappings.py +2 -2
  4. oarepo_runtime/facets/base.py +3 -0
  5. oarepo_runtime/facets/date.py +14 -11
  6. oarepo_runtime/i18n/ui_schema.py +2 -8
  7. oarepo_runtime/records/__init__.py +0 -28
  8. oarepo_runtime/records/systemfields/__init__.py +10 -0
  9. oarepo_runtime/records/{icu.py → systemfields/icu.py} +1 -1
  10. oarepo_runtime/records/systemfields/mapping.py +29 -0
  11. oarepo_runtime/resources/__init__.py +3 -0
  12. oarepo_runtime/resources/localized_ui_json_serializer.py +41 -0
  13. oarepo_runtime/services/schema/__init__.py +3 -0
  14. oarepo_runtime/services/schema/cf.py +13 -0
  15. oarepo_runtime/services/schema/ui.py +122 -0
  16. oarepo_runtime/services/{icu.py → search.py} +1 -1
  17. oarepo_runtime/ui/marshmallow.py +6 -96
  18. {oarepo_runtime-1.4.13.dist-info → oarepo_runtime-1.4.15.dist-info}/METADATA +1 -1
  19. {oarepo_runtime-1.4.13.dist-info → oarepo_runtime-1.4.15.dist-info}/RECORD +26 -21
  20. {oarepo_runtime-1.4.13.dist-info → oarepo_runtime-1.4.15.dist-info}/entry_points.txt +1 -1
  21. oarepo_runtime/tasks/__init__.py +0 -0
  22. oarepo_runtime/validation/__init__.py +0 -3
  23. /oarepo_runtime/{tasks/datastreams.py → datastreams/tasks.py} +0 -0
  24. /oarepo_runtime/{polymorphic.py → services/schema/polymorphic.py} +0 -0
  25. /oarepo_runtime/{validation/dates.py → services/schema/validation.py} +0 -0
  26. {oarepo_runtime-1.4.13.dist-info → oarepo_runtime-1.4.15.dist-info}/LICENSE +0 -0
  27. {oarepo_runtime-1.4.13.dist-info → oarepo_runtime-1.4.15.dist-info}/WHEEL +0 -0
  28. {oarepo_runtime-1.4.13.dist-info → oarepo_runtime-1.4.15.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,7 @@ from flask import current_app
4
4
  from invenio_records.systemfields import DictField, SystemField
5
5
  from invenio_records_resources.services.custom_fields import BaseCF
6
6
 
7
- from oarepo_runtime.records import MappingSystemFieldMixin
7
+ from oarepo_runtime.records.systemfields.mapping import MappingSystemFieldMixin
8
8
 
9
9
 
10
10
  class CustomFieldsMixin(MappingSystemFieldMixin):
oarepo_runtime/cf/cli.py CHANGED
@@ -1,4 +1,3 @@
1
- import click
2
1
  from flask.cli import with_appcontext
3
2
 
4
3
  from oarepo_runtime.cli import oarepo
@@ -1,5 +1,5 @@
1
1
  import inspect
2
- from typing import Iterable, List
2
+ from typing import Iterable
3
3
 
4
4
  import click
5
5
  import deepmerge
@@ -13,7 +13,7 @@ from invenio_search import current_search_client
13
13
  from invenio_search.engine import dsl, search
14
14
  from invenio_search.utils import build_alias_name
15
15
 
16
- from oarepo_runtime.records import MappingSystemFieldMixin
16
+ from oarepo_runtime.records.systemfields.mapping import MappingSystemFieldMixin
17
17
 
18
18
 
19
19
  class Mapping(InvenioMapping):
@@ -5,5 +5,8 @@ class LabelledValuesTermsFacet(TermsFacet):
5
5
  def __init__(self, *args, **kwargs):
6
6
  super().__init__(*args, **{"value_labels": self.value_labels, **kwargs})
7
7
 
8
+ def localized_value_labels(self, values, locale):
9
+ return {val: val for val in values}
10
+
8
11
  def value_labels(self, values):
9
12
  return {val: val for val in values}
@@ -3,7 +3,7 @@ import re
3
3
  from invenio_records_resources.services.records.facets.facets import LabelledFacetMixin
4
4
  from invenio_search.engine import dsl
5
5
 
6
- from oarepo_runtime.ui.marshmallow import (
6
+ from oarepo_runtime.services.schema.ui import (
7
7
  LocalizedDate,
8
8
  LocalizedDateTime,
9
9
  LocalizedEDTF,
@@ -15,24 +15,27 @@ from .base import LabelledValuesTermsFacet
15
15
 
16
16
 
17
17
  class DateFacet(LabelledValuesTermsFacet):
18
- def value_labels(self, values):
19
- return {val: LocalizedDate().format_value(val) for val in values}
18
+ def localized_value_labels(self, values, locale):
19
+ return {val: LocalizedDate(locale=locale).format_value(val) for val in values}
20
20
 
21
21
 
22
22
  class TimeFacet(LabelledValuesTermsFacet):
23
- def value_labels(self, values):
24
- return {val: LocalizedTime().format_value(val) for val in values}
23
+ def localized_value_labels(self, values, locale):
24
+ return {val: LocalizedTime(locale=locale).format_value(val) for val in values}
25
25
 
26
26
 
27
27
  class DateTimeFacet(LabelledValuesTermsFacet):
28
- def value_labels(self, values):
29
- return {val: LocalizedDateTime().format_value(val) for val in values}
28
+ def localized_value_labels(self, values, locale):
29
+ return {
30
+ val: LocalizedDateTime(locale=locale).format_value(val) for val in values
31
+ }
30
32
 
31
33
 
32
34
  class EDTFFacet(LabelledValuesTermsFacet):
33
- def value_labels(self, values):
35
+ def localized_value_labels(self, values, locale):
34
36
  return {
35
- val: LocalizedEDTF().format_value(convert_to_edtf(val)) for val in values
37
+ val: LocalizedEDTF(locale=locale).format_value(convert_to_edtf(val))
38
+ for val in values
36
39
  }
37
40
 
38
41
 
@@ -51,9 +54,9 @@ class EDTFIntervalFacet(LabelledFacetMixin, AutoDateHistogramFacet):
51
54
  # kwargs["interval"] = "year"
52
55
  super().__init__(*args, **kwargs)
53
56
 
54
- def value_labels(self, values):
57
+ def localized_value_labels(self, values, locale):
55
58
  return {
56
- val: LocalizedEDTFInterval().format_value(convert_to_edtf(val))
59
+ val: LocalizedEDTFInterval(locale=locale).format_value(convert_to_edtf(val))
57
60
  for val in values
58
61
  }
59
62
 
@@ -1,7 +1,5 @@
1
1
  from functools import lru_cache
2
2
 
3
- from flask import current_app
4
- from flask_babelex import get_locale
5
3
  from marshmallow import Schema, fields
6
4
 
7
5
 
@@ -40,13 +38,9 @@ def get_i18n_localized_ui_schema(lang_field, value_field):
40
38
  def _serialize(self, value, attr=None, obj=None, **kwargs):
41
39
  if not value:
42
40
  return None
43
- locale = get_locale().language
41
+ language = self.context["locale"].language
44
42
  for v in value:
45
- if locale == v[lang_field]:
46
- return v[value_field]
47
- locale = current_app.config["BABEL_DEFAULT_LOCALE"]
48
- for v in value:
49
- if locale == v[lang_field]:
43
+ if language == v[lang_field]:
50
44
  return v[value_field]
51
45
  return next(iter(value))[value_field]
52
46
 
@@ -1,29 +1 @@
1
- import inspect
2
1
 
3
- from invenio_records.dumpers import SearchDumperExt
4
-
5
-
6
- class MappingSystemFieldMixin:
7
- @property
8
- def mapping(self):
9
- return {}
10
-
11
- @property
12
- def mapping_settings(self):
13
- return {}
14
-
15
-
16
- class SystemFieldDumperExt(SearchDumperExt):
17
- def dump(self, record, data):
18
- """Dump custom fields."""
19
- for cf in inspect.getmembers(
20
- record, lambda x: isinstance(x, MappingSystemFieldMixin)
21
- ):
22
- cf[1].search_dump(data)
23
-
24
- def load(self, data, record_cls):
25
- """Load custom fields."""
26
- for cf in inspect.getmembers(
27
- record_cls, lambda x: isinstance(x, MappingSystemFieldMixin)
28
- ):
29
- cf[1].search_load(data)
@@ -0,0 +1,10 @@
1
+ from .icu import ICUField, ICUSuggestField, ICUSortField
2
+ from .mapping import MappingSystemFieldMixin, SystemFieldDumperExt
3
+
4
+ __all__ = (
5
+ "ICUField",
6
+ "ICUSuggestField",
7
+ "ICUSortField",
8
+ "MappingSystemFieldMixin",
9
+ "SystemFieldDumperExt",
10
+ )
@@ -4,7 +4,7 @@ from typing import Dict
4
4
  from flask import current_app
5
5
  from invenio_records.systemfields import SystemField
6
6
 
7
- from oarepo_runtime.records import MappingSystemFieldMixin
7
+ from oarepo_runtime.records.systemfields.mapping import MappingSystemFieldMixin
8
8
  from oarepo_runtime.relations.lookup import lookup_key
9
9
 
10
10
 
@@ -0,0 +1,29 @@
1
+ import inspect
2
+
3
+ from invenio_records.dumpers import SearchDumperExt
4
+
5
+
6
+ class MappingSystemFieldMixin:
7
+ @property
8
+ def mapping(self):
9
+ return {}
10
+
11
+ @property
12
+ def mapping_settings(self):
13
+ return {}
14
+
15
+
16
+ class SystemFieldDumperExt(SearchDumperExt):
17
+ def dump(self, record, data):
18
+ """Dump custom fields."""
19
+ for cf in inspect.getmembers(
20
+ record, lambda x: isinstance(x, MappingSystemFieldMixin)
21
+ ):
22
+ cf[1].search_dump(data)
23
+
24
+ def load(self, data, record_cls):
25
+ """Load custom fields."""
26
+ for cf in inspect.getmembers(
27
+ record_cls, lambda x: isinstance(x, MappingSystemFieldMixin)
28
+ ):
29
+ cf[1].search_load(data)
@@ -0,0 +1,3 @@
1
+ from .localized_ui_json_serializer import LocalizedUIJSONSerializer
2
+
3
+ __all__ = ("LocalizedUIJSONSerializer",)
@@ -0,0 +1,41 @@
1
+ from flask_babelex import get_locale
2
+ from flask_resources import MarshmallowSerializer
3
+
4
+
5
+ class LocalizedUIJSONSerializer(MarshmallowSerializer):
6
+ def __init__(
7
+ self,
8
+ format_serializer_cls,
9
+ object_schema_cls,
10
+ list_schema_cls=None,
11
+ schema_context=None,
12
+ **serializer_options,
13
+ ):
14
+ super().__init__(
15
+ format_serializer_cls=format_serializer_cls,
16
+ object_schema_cls=object_schema_cls,
17
+ list_schema_cls=list_schema_cls,
18
+ schema_context=schema_context or {},
19
+ **serializer_options,
20
+ )
21
+
22
+ def dump_obj(self, obj):
23
+ """Dump the object using object schema class."""
24
+ return self.object_schema_cls(
25
+ context={**self.schema_context, "locale": get_locale()}
26
+ ).dump(obj)
27
+
28
+ def dump_list(self, obj_list):
29
+ """Dump the list of objects."""
30
+ ctx = {
31
+ "object_schema_cls": self.object_schema_cls,
32
+ }
33
+ ctx.update(self.schema_context)
34
+ ctx["locale"] = get_locale()
35
+
36
+ if self.list_schema_cls is None:
37
+ return self.object_schema_cls(context=self.schema_context).dump(
38
+ obj_list, many=True
39
+ )
40
+
41
+ return self.list_schema_cls(context=ctx).dump(obj_list)
@@ -0,0 +1,3 @@
1
+ from .polymorphic import PolymorphicSchema
2
+
3
+ __all__ = ("PolymorphicSchema",)
@@ -0,0 +1,13 @@
1
+ from invenio_records_resources.services.custom_fields.schema import (
2
+ CustomFieldsSchemaUI as InvenioCustomFieldsSchemaUI,
3
+ )
4
+
5
+
6
+ class CustomFieldsSchemaUI(InvenioCustomFieldsSchemaUI):
7
+ def _serialize(self, obj, **kwargs):
8
+ self._schema.context.update(self.context)
9
+ return super()._serialize(obj, **kwargs)
10
+
11
+ def _deserialize(self, data, **kwargs):
12
+ self._schema.context.update(self.context)
13
+ return super()._deserialize(data, **kwargs)
@@ -0,0 +1,122 @@
1
+ import datetime
2
+ import re
3
+
4
+ import marshmallow as ma
5
+ from babel.dates import format_date
6
+ from babel_edtf import format_edtf
7
+ from flask import current_app
8
+ from flask_babelex import gettext
9
+ from marshmallow_utils.fields import (
10
+ BabelGettextDictField,
11
+ FormatDate,
12
+ FormatDatetime,
13
+ FormatEDTF,
14
+ FormatTime,
15
+ )
16
+ from marshmallow_utils.fields.babel import BabelFormatField
17
+
18
+
19
+ def current_default_locale():
20
+ """Get the Flask app's default locale."""
21
+ if current_app:
22
+ return current_app.config.get("BABEL_DEFAULT_LOCALE", "en")
23
+ # Use english by default if not specified
24
+ return "en"
25
+
26
+
27
+ class LocalizedMixin:
28
+ def __init__(self, *args, locale=None, **kwargs):
29
+ super().__init__(*args, locale=locale, **kwargs)
30
+
31
+ @property
32
+ def locale(self):
33
+ if self._locale:
34
+ return self._locale
35
+ if self.parent:
36
+ if "locale" in self.context:
37
+ return self.context["locale"]
38
+ return current_default_locale()
39
+
40
+
41
+ # localized date field
42
+ class LocalizedDate(LocalizedMixin, FormatDate):
43
+ pass
44
+
45
+
46
+ class FormatTimeString(FormatTime):
47
+ def parse(self, value, as_time=False, as_date=False, as_datetime=False):
48
+ if value and isinstance(value, str) and as_time == True:
49
+ match = re.match(
50
+ r"^(\d|0\d|1[0-2]):(\d|[0-5]\d|60)(:(\d|[0-5]\d|60))?$", value
51
+ )
52
+ if match:
53
+ value = datetime.time(
54
+ hour=int(match.group(1)),
55
+ minute=int(match.group(2)),
56
+ second=int(match.group(4)) if match.group(4) else 0,
57
+ )
58
+
59
+ return super().parse(value, as_time, as_date, as_datetime)
60
+
61
+
62
+ class MultilayerFormatEDTF(BabelFormatField):
63
+ def format_value(self, value):
64
+ try:
65
+ return format_date(
66
+ self.parse(value, as_date=True), format=self._format, locale=self.locale
67
+ )
68
+ except:
69
+ return format_edtf(value, format=self._format, locale=self.locale)
70
+
71
+ def parse(self, value, **kwargs):
72
+ # standard parsing is too lenient, for example returns "2000-01-01" for input "2000"
73
+ if re.match("^[0-9]+-[0-9]+-[0-9]+", value):
74
+ return super().parse(value, **kwargs)
75
+ raise ValueError("Not a valid date")
76
+
77
+
78
+ class LocalizedDateTime(LocalizedMixin, FormatDatetime):
79
+ pass
80
+
81
+
82
+ class LocalizedTime(LocalizedMixin, FormatTimeString):
83
+ pass
84
+
85
+
86
+ class LocalizedEDTF(LocalizedMixin, MultilayerFormatEDTF):
87
+ pass
88
+
89
+
90
+ class LocalizedEDTFInterval(LocalizedMixin, FormatEDTF):
91
+ pass
92
+
93
+
94
+ class PrefixedGettextField(BabelGettextDictField):
95
+ def __init__(self, *, value_prefix, locale, default_locale, **kwargs):
96
+ super().__init__(locale, default_locale, **kwargs)
97
+ self.value_prefix = value_prefix
98
+
99
+ def _serialize(self, value, attr, obj, **kwargs):
100
+ if value:
101
+ value = f"{self.value_prefix}{value}"
102
+ return gettext(value)
103
+
104
+
105
+ class LocalizedEnum(LocalizedMixin, PrefixedGettextField):
106
+ pass
107
+
108
+ def __init__(self, **kwargs):
109
+ super().__init__(default_locale=current_default_locale, **kwargs)
110
+
111
+
112
+ if False: # NOSONAR
113
+ # just for the makemessages to pick up the translations
114
+ translations = [_("True"), _("False")]
115
+
116
+
117
+ class InvenioUISchema(ma.Schema):
118
+ id = ma.fields.Str()
119
+ created = LocalizedDateTime(dump_only=True)
120
+ updated = LocalizedDateTime(dump_only=True)
121
+ links = ma.fields.Raw(dump_only=True)
122
+ revision_id = ma.fields.Integer(dump_only=True)
@@ -10,7 +10,7 @@ from invenio_records_resources.services.records import (
10
10
  )
11
11
  from invenio_records_resources.services.records.queryparser import SuggestQueryParser
12
12
 
13
- from oarepo_runtime.records.icu import ICUSuggestField
13
+ from oarepo_runtime.records.systemfields.icu import ICUSuggestField
14
14
 
15
15
  try:
16
16
  from invenio_i18n import get_locale
@@ -1,99 +1,9 @@
1
- import datetime
2
- import re
3
- from functools import partial
1
+ from oarepo_runtime.services.schema.ui import InvenioUISchema
2
+ import warnings
4
3
 
5
- import marshmallow as ma
6
- from babel.dates import format_date
7
- from babel_edtf import format_edtf
8
- from flask import current_app
9
- from flask_babelex import get_locale, gettext
10
- from marshmallow_utils.fields import (
11
- BabelGettextDictField,
12
- FormatDate,
13
- FormatDatetime,
14
- FormatEDTF,
15
- FormatTime,
4
+ warnings.warn(
5
+ "Deprecated, please use oarepo_runtime.services.schema.ui.InvenioUISchema",
6
+ DeprecationWarning,
16
7
  )
17
- from marshmallow_utils.fields.babel import BabelFormatField
18
8
 
19
-
20
- def current_default_locale():
21
- """Get the Flask app's default locale."""
22
- if current_app:
23
- return current_app.config.get("BABEL_DEFAULT_LOCALE", "en")
24
- # Use english by default if not specified
25
- return "en"
26
-
27
-
28
- # localized date field
29
- LocalizedDate = partial(FormatDate, locale=get_locale)
30
-
31
-
32
- class FormatTimeString(FormatTime):
33
- def parse(self, value, as_time=False, as_date=False, as_datetime=False):
34
- if value and isinstance(value, str) and as_time == True:
35
- match = re.match(
36
- r"^(\d|0\d|1[0-2]):(\d|[0-5]\d|60)(:(\d|[0-5]\d|60))?$", value
37
- )
38
- if match:
39
- value = datetime.time(
40
- hour=int(match.group(1)),
41
- minute=int(match.group(2)),
42
- second=int(match.group(4)) if match.group(4) else 0,
43
- )
44
-
45
- return super().parse(value, as_time, as_date, as_datetime)
46
-
47
-
48
- class MultilayerFormatEDTF(BabelFormatField):
49
- def format_value(self, value):
50
- try:
51
- return format_date(
52
- self.parse(value, as_date=True), format=self._format, locale=self.locale
53
- )
54
- except:
55
- return format_edtf(value, format=self._format, locale=self.locale)
56
-
57
-
58
- # localized edtf
59
- LocalizedEDTF = partial(MultilayerFormatEDTF, locale=get_locale)
60
-
61
- # localized time field
62
- LocalizedTime = partial(FormatTimeString, locale=get_locale)
63
-
64
- # localized datetime field
65
- LocalizedDateTime = partial(FormatDatetime, locale=get_locale)
66
-
67
- # localized edtf interval uses the same class as plain EDTF
68
- LocalizedEDTFInterval = partial(FormatEDTF, locale=get_locale)
69
-
70
-
71
- class PrefixedGettextField(BabelGettextDictField):
72
- def __init__(self, *, value_prefix, locale, default_locale, **kwargs):
73
- super().__init__(locale, default_locale, **kwargs)
74
- self.value_prefix = value_prefix
75
-
76
- def _serialize(self, value, attr, obj, **kwargs):
77
- if value:
78
- value = f"{self.value_prefix}{value}"
79
- return gettext(value)
80
-
81
-
82
- LocalizedEnum = partial(
83
- PrefixedGettextField,
84
- # value_prefix will come from the outside
85
- locale=get_locale,
86
- default_locale=current_default_locale,
87
- )
88
-
89
- if False: # NOSONAR
90
- # just for the makemessages to pick up the translations
91
- translations = [_("True"), _("True")]
92
-
93
-
94
- class InvenioUISchema(ma.Schema):
95
- id = ma.fields.Str()
96
- created = LocalizedDateTime(dump_only=True)
97
- updated = LocalizedDateTime(dump_only=True)
98
- links = ma.fields.Raw(dump_only=True)
99
- revision_id = ma.fields.Integer(dump_only=True)
9
+ __all__ = ("InvenioUISchema",)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oarepo-runtime
3
- Version: 1.4.13
3
+ Version: 1.4.15
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -2,12 +2,11 @@ oarepo_runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  oarepo_runtime/ext.py,sha256=D6-vAzXawQ9tvUuuPeNevBJ_6FGtkJynQveBdGYIYXY,1569
3
3
  oarepo_runtime/ext_config.py,sha256=RVM9AbFK4sSNe6uCfEOKqr2RMaSWUh5cT3bRq5E5H4E,1820
4
4
  oarepo_runtime/marshmallow.py,sha256=BaRh9Z07h2DznYMyYxiTmSfe4EJaeXvTY8lKVyvVGa4,340
5
- oarepo_runtime/polymorphic.py,sha256=CkvXVUiXbrsLWFgoNnjjpUviQyzRMCmpsD3GWfV0WZA,494
6
5
  oarepo_runtime/profile.py,sha256=QzrQoZncjoN74ZZnpkEKakNk08KCzBU7m6y42RN8AMY,1637
7
6
  oarepo_runtime/uow.py,sha256=TqVYF1N24WTVIjf97mlb-EH-BtIZCVVLNS4bqZt4XLs,3201
8
- oarepo_runtime/cf/__init__.py,sha256=-YhE1JnHrX-qS_IT_1Lh5_OQ2OMbErQyZ3mPxLbiYqw,2241
9
- oarepo_runtime/cf/cli.py,sha256=gUD4tRV57ixpgQxECN-eporJnC9etBfHE-FNKEOUUsY,316
10
- oarepo_runtime/cf/mappings.py,sha256=6KKiS93tMPZOcmdBBvfXh3VOAh5Kw8xdXh2ER2PP0Xo,4200
7
+ oarepo_runtime/cf/__init__.py,sha256=HVqgIIoPqg-pJHkP1KY_Phe-9fSD0RsnF02H5OS9wCM,2262
8
+ oarepo_runtime/cf/cli.py,sha256=dA3ou3n03GpswVvuhRn5ZIGKCl8xftHawdBtm0D5u_c,303
9
+ oarepo_runtime/cf/mappings.py,sha256=IY-uH1EWDomIes14TFDY223StIhY4k_hIfawWedlLug,4215
11
10
  oarepo_runtime/cli/__init__.py,sha256=-WGXmjHoSqiApR_LvYnZTimuL-frR7SynrsSklnjb3A,221
12
11
  oarepo_runtime/cli/assets.py,sha256=XLZTnsGb88O5N8R2D3AYpZqtnO4JrbybUtRLKnL1p3w,2430
13
12
  oarepo_runtime/cli/base.py,sha256=xZMsR2rati5Mz0DZzmnlhVI7E6ePCfnOiTayrxT9cWU,259
@@ -25,6 +24,7 @@ oarepo_runtime/datastreams/config.py,sha256=ALq7otBFMHjT3GV59KpkEV-8ZborWrYLXyB3
25
24
  oarepo_runtime/datastreams/datastreams.py,sha256=XW8jWFvV4vCL7fs7yVfKKYu1HEKaR-7HRmRPQiru_z4,8178
26
25
  oarepo_runtime/datastreams/errors.py,sha256=ZcwAsmczSTtHXljyDSrgqGhYD7td9rTLXZJvPjr72pA,1627
27
26
  oarepo_runtime/datastreams/fixtures.py,sha256=_pQLKUCoat2J0IjTeitIqEYIpiOGWtxxLMS4KiSU-Rs,7000
27
+ oarepo_runtime/datastreams/tasks.py,sha256=_EJZuHg2UoIJCrrOo0J7e8uCSoXIpJsRJnsb8sorWJc,10810
28
28
  oarepo_runtime/datastreams/transformers.py,sha256=4COh2cza_n2GKnTM2yJkj9-8KkPK2E1fcyRoUH4S2OY,1204
29
29
  oarepo_runtime/datastreams/utils.py,sha256=KGuY60SUkq1HnIGinL_RhmWiM51HVlccxTomCUiGB58,394
30
30
  oarepo_runtime/datastreams/readers/__init__.py,sha256=thzuY28bweX89J66VDb7jtjVx7IOJKTXGd72GGZQBkY,1089
@@ -45,8 +45,8 @@ oarepo_runtime/expansions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
45
45
  oarepo_runtime/expansions/expandable_fields.py,sha256=7DWKFL6ml8J7zGI6wm9LO7Xd6R0LSylsuq4lyRumNHQ,745
46
46
  oarepo_runtime/expansions/service.py,sha256=HaEy76XOhDf__sQ91hi-8iH1hthM9q07pRhOmyZyVrs,144
47
47
  oarepo_runtime/facets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- oarepo_runtime/facets/base.py,sha256=McdE4OxIVqmYj-Eqig-TVVMnSevi-jnR0cV89Kg-Ygs,322
49
- oarepo_runtime/facets/date.py,sha256=R6F-aGGpqH4oTY2eYdDmF2THKbFxQB_NIYW56QN1Y1k,1962
48
+ oarepo_runtime/facets/base.py,sha256=-IEUUY0hZcAh_3SelceTjMSw_SaqMhgnLxzG62iq7tA,421
49
+ oarepo_runtime/facets/date.py,sha256=lB4It_Z_4Y419vf1eT0osGCGrDcDS7xEEi52fkmUjg0,2155
50
50
  oarepo_runtime/facets/enum.py,sha256=3LrShQIt9Vt5mkqUkc6FNxXCW5JEFdPwtGCTEmNB6i0,396
51
51
  oarepo_runtime/facets/max_facet.py,sha256=TZ4KMKKVJHzyU1KgNne4V7IMQPu1ALRpkz61Y0labrc,407
52
52
  oarepo_runtime/facets/nested_facet.py,sha256=kNOR_YXoMjA1REhG_DidLdFG6ZqM40kp85yvatFCd3g,962
@@ -55,10 +55,12 @@ oarepo_runtime/i18n/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
55
55
  oarepo_runtime/i18n/default_translations.py,sha256=s2aqH-dMdlDS_Q_RgRCzPu6xRKXkLfzHaMRchOUPFS8,98
56
56
  oarepo_runtime/i18n/dumper.py,sha256=PbNFCLsiH4XV3E1v8xga_fzlcEImHy8OXn_UKh_8VBU,1090
57
57
  oarepo_runtime/i18n/schema.py,sha256=wJLyE4Ew4mqEGoMpM6JOsyyqGCV_R4YgWQUm45AHVPU,1184
58
- oarepo_runtime/i18n/ui_schema.py,sha256=_iMUkHI8fPQT9hJziSMqYRyGmozgJrY5qQo1Y7Fmuo4,2085
58
+ oarepo_runtime/i18n/ui_schema.py,sha256=9r2j9zCG60yVEhcEFaz8TvmNGMAkzaOJFfKri3rtVck,1854
59
59
  oarepo_runtime/i18n/validation.py,sha256=fyMTi2Rw-KiHv7c7HN61zGxRVa9sAjAEEkAL5wUyKNo,236
60
- oarepo_runtime/records/__init__.py,sha256=jzKWn4jaVKZvysPZHtqWE_SWExh_4DBz7YSgflFyYoM,721
61
- oarepo_runtime/records/icu.py,sha256=h8RkqAO8d0LOqj27IVa-B-Bqs08na0lffqczJZHTgUU,4137
60
+ oarepo_runtime/records/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
61
+ oarepo_runtime/records/systemfields/__init__.py,sha256=bHZNROC7UdwQZYsf81PH445KCacNsoJ9rTT0l3jhFf4,257
62
+ oarepo_runtime/records/systemfields/icu.py,sha256=fZ6XZlfOFWe6-I3eIB5nMBc5NGmwHYeJzge3JOOusnU,4158
63
+ oarepo_runtime/records/systemfields/mapping.py,sha256=jzKWn4jaVKZvysPZHtqWE_SWExh_4DBz7YSgflFyYoM,721
62
64
  oarepo_runtime/relations/__init__.py,sha256=bDAgxl_LdKsqpGG3qluxAkQnn5u2ItJngnHQKkqzlkE,373
63
65
  oarepo_runtime/relations/base.py,sha256=I5XANA-fFbiH3xQ1s7x1NVJFaiSRKCc6-xyNy1LEfpw,8739
64
66
  oarepo_runtime/relations/components.py,sha256=J9rvzaAoRDbSVuA01hIOlXKQP-OE5VJI5w5xuMsFO70,602
@@ -70,24 +72,27 @@ oarepo_runtime/relations/pid_relation.py,sha256=xE_dcpa5j8QHLXaH1MifwuE-a6M-KcTe
70
72
  oarepo_runtime/relations/uow.py,sha256=KrN8B-wVbmb0kOErxb7bAhPmOR6-mMRgBr-ab-ir6hQ,151
71
73
  oarepo_runtime/resolvers/__init__.py,sha256=kTlvSiympib59YQV7wEKpIXGprPWRuvxLIwmeeQdUec,89
72
74
  oarepo_runtime/resolvers/proxies.py,sha256=egtT7uXL91KswWI7gqUIaz1vWIHezdsiI_M-xRKXWww,547
75
+ oarepo_runtime/resources/__init__.py,sha256=kbVs55btqzxlM9ioRCmXxdoPOU06f8FRmIPnE3nTz0Y,110
76
+ oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=d6CmIy6YnWnW5JmVXgo1hIn9pWQ0Tpn8n2ljdggH7pc,1285
73
77
  oarepo_runtime/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- oarepo_runtime/services/icu.py,sha256=5uxCHEBIEBlKo8IO4y_GA6InYVPAq6sPmWXWeBOXLA8,4969
75
- oarepo_runtime/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- oarepo_runtime/tasks/datastreams.py,sha256=_EJZuHg2UoIJCrrOo0J7e8uCSoXIpJsRJnsb8sorWJc,10810
78
+ oarepo_runtime/services/search.py,sha256=BH5KDwk12-F0SRe7aomU0dbOxMr6zAwfTwxkNR7e720,4982
79
+ oarepo_runtime/services/schema/__init__.py,sha256=XGfNjYk7ha5JhVERuqjl-yDaI1O9dDQItZJEdMzDe4w,77
80
+ oarepo_runtime/services/schema/cf.py,sha256=-m9seIH5VYUdxDsJlPVXS0-8f7xkpN7YfW1q9E1GacI,475
81
+ oarepo_runtime/services/schema/polymorphic.py,sha256=CkvXVUiXbrsLWFgoNnjjpUviQyzRMCmpsD3GWfV0WZA,494
82
+ oarepo_runtime/services/schema/ui.py,sha256=n2fCG-k39QG9s4DW2v6H4oLy-yHWpizp_A4oqpdh3qY,3506
83
+ oarepo_runtime/services/schema/validation.py,sha256=fahqKGDdIYWux5ZeoljrEe8VD2fDZR9VpfvYmTYAmpw,1050
77
84
  oarepo_runtime/translations/messages.pot,sha256=NfZakWEYMZE_6HvnKxO7B61UnHnWgtKSvSKMJQ6msK0,971
78
85
  oarepo_runtime/translations/cs/LC_MESSAGES/messages.mo,sha256=fsvCdqu3x4w8IUEdhsVO1JZZLRATSKu4gJcAZPi__aQ,651
79
86
  oarepo_runtime/translations/cs/LC_MESSAGES/messages.po,sha256=tc1AQdE81cJs7xyOcMv7w58_jJf6FEDyq4sSkWBXAKQ,1100
80
87
  oarepo_runtime/translations/en/LC_MESSAGES/messages.po,sha256=iMl_z-O2j81Yn5tqOzJdOl3qmGE0s3A3uOEPHZy2V3s,1019
81
88
  oarepo_runtime/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- oarepo_runtime/ui/marshmallow.py,sha256=YB8c4fimEUKGOT_4YPZCaOTLoapxRfwipuIyZnv_auk,2983
89
+ oarepo_runtime/ui/marshmallow.py,sha256=Z_yjcBnFpduf7PzA80zTUnSLYeVRfr5ewr974dUfhqE,232
83
90
  oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
91
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
85
- oarepo_runtime/validation/__init__.py,sha256=lU7DgZq8pGD5Pa-QqL9gvLsib3IYtM-Y56k-NwHrPG0,166
86
- oarepo_runtime/validation/dates.py,sha256=fahqKGDdIYWux5ZeoljrEe8VD2fDZR9VpfvYmTYAmpw,1050
87
92
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
- oarepo_runtime-1.4.13.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
89
- oarepo_runtime-1.4.13.dist-info/METADATA,sha256=qQgSqdIgdpLdcP8i5I8j9B3b_bhyHLdJGUxZGYu4u3Y,4288
90
- oarepo_runtime-1.4.13.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
91
- oarepo_runtime-1.4.13.dist-info/entry_points.txt,sha256=C32W4eT-8OypMCfwOO5WREioVKSneDfY51D78Uvdbp0,231
92
- oarepo_runtime-1.4.13.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
93
- oarepo_runtime-1.4.13.dist-info/RECORD,,
93
+ oarepo_runtime-1.4.15.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
94
+ oarepo_runtime-1.4.15.dist-info/METADATA,sha256=zSjQZPzwP9Bdvz8F-DPkMn2RNPCfV3RrpS5sG5Pc24A,4288
95
+ oarepo_runtime-1.4.15.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
96
+ oarepo_runtime-1.4.15.dist-info/entry_points.txt,sha256=4NPw4O2VCsu8-RsssxQ6IMeme0dcPY4ZRWYrED9JrB4,231
97
+ oarepo_runtime-1.4.15.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
98
+ oarepo_runtime-1.4.15.dist-info/RECORD,,
@@ -5,4 +5,4 @@ oarepo_runtime = oarepo_runtime.ext:OARepoRuntime
5
5
  oarepo_runtime = oarepo_runtime.ext:OARepoRuntime
6
6
 
7
7
  [invenio_celery.tasks]
8
- oarepo_runtime_datastreams = oarepo_runtime.tasks.datastreams
8
+ oarepo_runtime_datastreams = oarepo_runtime.datastreams.tasks
File without changes
@@ -1,3 +0,0 @@
1
- from .dates import CachedMultilayerEDTFValidator, validate_date, validate_datetime
2
-
3
- __all__ = ["validate_date", "validate_datetime", "CachedMultilayerEDTFValidator"]