oarepo-runtime 1.3.19__tar.gz → 1.3.21__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {oarepo-runtime-1.3.19/oarepo_runtime.egg-info → oarepo-runtime-1.3.21}/PKG-INFO +1 -1
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cli/validate.py +4 -3
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/config/service.py +3 -2
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/cli.py +18 -4
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/datastreams.py +13 -4
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/writers/service.py +11 -5
- oarepo-runtime-1.3.21/oarepo_runtime/datastreams/writers/validation_errors.py +20 -0
- oarepo-runtime-1.3.21/oarepo_runtime/drafts/systemfields/has_draftcheck.py +47 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/ext.py +3 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/ext_config.py +3 -0
- oarepo-runtime-1.3.21/oarepo_runtime/ui/__init__.py +0 -0
- oarepo-runtime-1.3.21/oarepo_runtime/utils/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21/oarepo_runtime.egg-info}/PKG-INFO +1 -1
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime.egg-info/SOURCES.txt +4 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime.egg-info/requires.txt +2 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/setup.cfg +3 -1
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/LICENSE +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/MANIFEST.in +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/README.md +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cf/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cf/cli.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cf/mappings.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cli/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cli/assets.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cli/base.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cli/check.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/cli/index.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/config/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/config/permissions_presets.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/batch.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/catalogue.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/config.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/errors.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/fixtures.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/excel.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/json.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/service.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/yaml.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/transformers.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/writers/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/writers/yaml.py +0 -0
- {oarepo-runtime-1.3.19/oarepo_runtime/expansions → oarepo-runtime-1.3.21/oarepo_runtime/drafts}/__init__.py +0 -0
- {oarepo-runtime-1.3.19/oarepo_runtime/facets → oarepo-runtime-1.3.21/oarepo_runtime/drafts/systemfields}/__init__.py +0 -0
- {oarepo-runtime-1.3.19/oarepo_runtime/i18n → oarepo-runtime-1.3.21/oarepo_runtime/expansions}/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/expansions/expandable_fields.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/expansions/service.py +0 -0
- {oarepo-runtime-1.3.19/oarepo_runtime/tasks → oarepo-runtime-1.3.21/oarepo_runtime/facets}/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/facets/base.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/facets/date.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/facets/enum.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/facets/max_facet.py +1 -1
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/facets/nested_facet.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/facets/params.py +0 -0
- {oarepo-runtime-1.3.19/oarepo_runtime/ui → oarepo-runtime-1.3.21/oarepo_runtime/i18n}/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/i18n/default_translations.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/i18n/dumper.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/i18n/schema.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/i18n/ui_schema.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/i18n/validation.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/marshmallow.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/polymorphic.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/base.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/components.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/internal.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/lookup.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/mapping.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/pid_relation.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/relations/uow.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/resolvers/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/resolvers/proxies.py +0 -0
- {oarepo-runtime-1.3.19/oarepo_runtime/utils → oarepo-runtime-1.3.21/oarepo_runtime/tasks}/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/tasks/datastreams.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/translations/cs/LC_MESSAGES/messages.mo +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/translations/cs/LC_MESSAGES/messages.po +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/translations/en/LC_MESSAGES/messages.po +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/translations/messages.pot +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/ui/marshmallow.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/utils/path.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/validation/__init__.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/validation/dates.py +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime.egg-info/dependency_links.txt +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime.egg-info/entry_points.txt +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime.egg-info/top_level.txt +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/pyproject.toml +0 -0
- {oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/setup.py +0 -0
@@ -3,9 +3,9 @@ import sys
|
|
3
3
|
import click
|
4
4
|
import yaml
|
5
5
|
from flask.cli import with_appcontext
|
6
|
+
from invenio_db import db
|
6
7
|
from invenio_records import Record
|
7
8
|
from invenio_records_resources.proxies import current_service_registry
|
8
|
-
from invenio_db import db
|
9
9
|
|
10
10
|
from .base import oarepo
|
11
11
|
|
@@ -17,12 +17,14 @@ except ImportError:
|
|
17
17
|
import sys
|
18
18
|
from io import StringIO
|
19
19
|
|
20
|
+
|
20
21
|
class CheckOk(Exception):
|
21
22
|
pass
|
22
23
|
|
24
|
+
|
23
25
|
@oarepo.command(
|
24
26
|
help="Validate a record. Takes one or two parameters - service name as "
|
25
|
-
|
27
|
+
"the first one, file name or stdin with record data as the second"
|
26
28
|
)
|
27
29
|
@click.argument("service-name")
|
28
30
|
@click.argument("record-file", required=False)
|
@@ -64,7 +66,6 @@ def validate(service_name, record_file, verbose):
|
|
64
66
|
raise CheckOk()
|
65
67
|
except CheckOk:
|
66
68
|
click.secho("Pre-commit hook has been successful", fg="green")
|
67
|
-
pass
|
68
69
|
|
69
70
|
if verbose:
|
70
71
|
yaml.safe_dump(loaded, sys.stdout, allow_unicode=True)
|
@@ -1,7 +1,8 @@
|
|
1
|
-
from flask import current_app
|
2
1
|
import inspect
|
3
2
|
from functools import cached_property
|
4
3
|
|
4
|
+
from flask import current_app
|
5
|
+
|
5
6
|
|
6
7
|
class PermissionsPresetsConfigMixin:
|
7
8
|
components = tuple()
|
@@ -16,7 +17,7 @@ class PermissionsPresetsConfigMixin:
|
|
16
17
|
permissions = {}
|
17
18
|
for preset_class in presets:
|
18
19
|
for permission_name, permission_needs in inspect.getmembers(preset_class):
|
19
|
-
if not permission_name.startswith(
|
20
|
+
if not permission_name.startswith("can_"):
|
20
21
|
continue
|
21
22
|
if not isinstance(permission_needs, (list, tuple)):
|
22
23
|
continue
|
@@ -1,3 +1,5 @@
|
|
1
|
+
from pprint import pprint
|
2
|
+
|
1
3
|
import click
|
2
4
|
from flask import current_app
|
3
5
|
from flask.cli import with_appcontext
|
@@ -20,8 +22,15 @@ def fixtures():
|
|
20
22
|
@click.option("--include", multiple=True)
|
21
23
|
@click.option("--exclude", multiple=True)
|
22
24
|
@click.option("--system-fixtures/--no-system-fixtures", default=True, is_flag=True)
|
25
|
+
@click.option("--show-error-entry/--hide-error-entry", is_flag=True)
|
23
26
|
@with_appcontext
|
24
|
-
def load(
|
27
|
+
def load(
|
28
|
+
fixture_dir=None,
|
29
|
+
include=None,
|
30
|
+
exclude=None,
|
31
|
+
system_fixtures=None,
|
32
|
+
show_error_entry=False,
|
33
|
+
):
|
25
34
|
"""Loads fixtures"""
|
26
35
|
with current_app.wsgi_app.mounts["/api"].app_context():
|
27
36
|
results: FixturesResult = load_fixtures(
|
@@ -30,7 +39,7 @@ def load(fixture_dir=None, include=None, exclude=None, system_fixtures=None):
|
|
30
39
|
_make_list(exclude),
|
31
40
|
system_fixtures=system_fixtures,
|
32
41
|
)
|
33
|
-
_show_stats(results, "Load fixtures")
|
42
|
+
_show_stats(results, "Load fixtures", show_error_entry=show_error_entry)
|
34
43
|
|
35
44
|
|
36
45
|
@fixtures.command()
|
@@ -51,7 +60,7 @@ def _make_list(lst):
|
|
51
60
|
]
|
52
61
|
|
53
62
|
|
54
|
-
def _show_stats(results: FixturesResult, title: str):
|
63
|
+
def _show_stats(results: FixturesResult, title: str, show_error_entry=False):
|
55
64
|
print(f"{title} stats:")
|
56
65
|
print(f" ok records: {results.ok_count}")
|
57
66
|
print(f" failed records: {results.failed_count}")
|
@@ -64,4 +73,9 @@ def _show_stats(results: FixturesResult, title: str):
|
|
64
73
|
)
|
65
74
|
if r.failed_entries:
|
66
75
|
for fe in r.failed_entries:
|
67
|
-
print(f"
|
76
|
+
print(f"======== {fixture} {fe.entry.get('id', '')}")
|
77
|
+
if show_error_entry:
|
78
|
+
pprint(fe.entry)
|
79
|
+
for err in fe.errors:
|
80
|
+
print(err.type)
|
81
|
+
print(err.message)
|
@@ -20,11 +20,19 @@ class StreamEntryError:
|
|
20
20
|
info: str
|
21
21
|
|
22
22
|
@classmethod
|
23
|
-
def from_exception(cls, exc: Exception, limit=5):
|
23
|
+
def from_exception(cls, exc: Exception, limit=5, message=None):
|
24
24
|
# can not use format_exception here as the signature is different for python 3.9 and python 3.10
|
25
25
|
stack = traceback.format_exc(limit=limit)
|
26
|
+
if message:
|
27
|
+
formatted_exception = message
|
28
|
+
elif hasattr(exc, "format_exception"):
|
29
|
+
formatted_exception = exc.format_exception()
|
30
|
+
else:
|
31
|
+
formatted_exception = str(exc)
|
26
32
|
return cls(
|
27
|
-
type=getattr(exc, "type", type(exc).__name__),
|
33
|
+
type=getattr(exc, "type", type(exc).__name__),
|
34
|
+
message=formatted_exception,
|
35
|
+
info=stack,
|
28
36
|
)
|
29
37
|
|
30
38
|
@property
|
@@ -141,9 +149,11 @@ class DataStream(AbstractDataStream):
|
|
141
149
|
written_entry = self.write(transformed_entry)
|
142
150
|
if written_entry.errors:
|
143
151
|
self._error_callback(written_entry)
|
152
|
+
_failed += 1
|
153
|
+
failed_entries.append(written_entry)
|
144
154
|
else:
|
145
155
|
self._success_callback(written_entry)
|
146
|
-
|
156
|
+
_written += 1
|
147
157
|
|
148
158
|
return DataStreamResult(
|
149
159
|
ok_count=_written,
|
@@ -182,7 +192,6 @@ class DataStream(AbstractDataStream):
|
|
182
192
|
try:
|
183
193
|
writer.write(stream_entry)
|
184
194
|
except WriterError as err:
|
185
|
-
log.error("Error in writer: %s: %s", err, repr(stream_entry.entry))
|
186
195
|
stream_entry.errors.append(StreamEntryError.from_exception(err))
|
187
196
|
except Exception as err:
|
188
197
|
log.error(
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/writers/service.py
RENAMED
@@ -4,8 +4,9 @@ from invenio_records.systemfields.relations.errors import InvalidRelationValue
|
|
4
4
|
from invenio_records_resources.proxies import current_service_registry
|
5
5
|
from marshmallow import ValidationError
|
6
6
|
|
7
|
-
from ..
|
7
|
+
from ..datastreams import StreamEntryError
|
8
8
|
from . import BaseWriter, StreamEntry
|
9
|
+
from .validation_errors import format_validation_error
|
9
10
|
|
10
11
|
|
11
12
|
class ServiceWriter(BaseWriter):
|
@@ -58,12 +59,17 @@ class ServiceWriter(BaseWriter):
|
|
58
59
|
stream_entry.entry = entry.data
|
59
60
|
|
60
61
|
except ValidationError as err:
|
61
|
-
|
62
|
+
stream_entry.errors.append(
|
63
|
+
StreamEntryError.from_exception(
|
64
|
+
err, message=format_validation_error(err.messages)
|
65
|
+
)
|
66
|
+
)
|
62
67
|
except InvalidRelationValue as err:
|
63
|
-
|
64
|
-
|
68
|
+
stream_entry.errors.append(
|
69
|
+
StreamEntryError.from_exception(err, message=err.args[0])
|
70
|
+
)
|
65
71
|
except Exception as err:
|
66
|
-
|
72
|
+
stream_entry.errors.append(StreamEntryError.from_exception(err))
|
67
73
|
|
68
74
|
def try_update(self, entry_id, stream_entry, **service_kwargs):
|
69
75
|
if entry_id:
|
@@ -0,0 +1,20 @@
|
|
1
|
+
def format_validation_error(err_messages):
|
2
|
+
msg = {}
|
3
|
+
for err, path in flatten_errors(err_messages, ""):
|
4
|
+
if path.endswith("._schema") and err == "Unknown field.":
|
5
|
+
continue
|
6
|
+
path = path.replace(".value.", ".")
|
7
|
+
msg[path] = err
|
8
|
+
return msg
|
9
|
+
|
10
|
+
|
11
|
+
def flatten_errors(err_data, path):
|
12
|
+
if isinstance(err_data, (list, tuple)):
|
13
|
+
for err in err_data:
|
14
|
+
yield from flatten_errors(err, path)
|
15
|
+
elif isinstance(err_data, dict):
|
16
|
+
for k, v in err_data.items():
|
17
|
+
subpath = f"{path}.{k}" if path else k
|
18
|
+
yield from flatten_errors(v, subpath)
|
19
|
+
else:
|
20
|
+
yield str(err_data), path
|
@@ -0,0 +1,47 @@
|
|
1
|
+
from invenio_records.dictutils import dict_set
|
2
|
+
from invenio_records.systemfields import SystemField
|
3
|
+
from sqlalchemy.orm.exc import NoResultFound
|
4
|
+
|
5
|
+
from oarepo_runtime.cf import CustomFieldsMixin
|
6
|
+
|
7
|
+
|
8
|
+
# taken from https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/records/systemfields/has_draftcheck.py
|
9
|
+
class HasDraftCheckField(CustomFieldsMixin, SystemField):
|
10
|
+
"""PID status field which checks against an expected status."""
|
11
|
+
|
12
|
+
def __init__(self, draft_cls=None, key=None, **kwargs):
|
13
|
+
"""Initialize the PIDField.
|
14
|
+
|
15
|
+
It stores the `record.has_draft` value in the secondary storage
|
16
|
+
system's record or defaults to `False` if the `draft_cls` is not passed
|
17
|
+
e.g Draft records.
|
18
|
+
|
19
|
+
:param key: Attribute name of the HasDraftCheckField.
|
20
|
+
:param draft_cls: The draft class to use for querying.
|
21
|
+
"""
|
22
|
+
super().__init__(key=key, **kwargs)
|
23
|
+
self.draft_cls = draft_cls
|
24
|
+
|
25
|
+
#
|
26
|
+
# Data descriptor methods (i.e. attribute access)
|
27
|
+
#
|
28
|
+
def __get__(self, record, owner=None):
|
29
|
+
if record is None:
|
30
|
+
return self # returns the field itself.
|
31
|
+
|
32
|
+
# If not draft_cls is passed return False
|
33
|
+
if self.draft_cls is None:
|
34
|
+
return False
|
35
|
+
|
36
|
+
try:
|
37
|
+
self.draft_cls.get_record(record.id)
|
38
|
+
return True
|
39
|
+
except NoResultFound:
|
40
|
+
return False
|
41
|
+
|
42
|
+
def pre_dump(self, record, data, **kwargs):
|
43
|
+
dict_set(data, self.key, record.has_draft)
|
44
|
+
"""
|
45
|
+
def post_load(self, record, data, **kwargs):
|
46
|
+
record.pop(self.key, None)
|
47
|
+
"""
|
@@ -11,6 +11,7 @@ from oarepo_runtime.datastreams.readers.service import ServiceReader
|
|
11
11
|
from oarepo_runtime.datastreams.readers.yaml import YamlReader
|
12
12
|
from oarepo_runtime.datastreams.writers.service import ServiceWriter
|
13
13
|
from oarepo_runtime.datastreams.writers.yaml import YamlWriter
|
14
|
+
from invenio_records_resources.services.custom_fields import BooleanCF
|
14
15
|
|
15
16
|
OAREPO_PERMISSIONS_PRESETS = {
|
16
17
|
"read_only": ReadOnlyPermissionPolicy,
|
@@ -53,3 +54,5 @@ DATASTREAMS_TRANSFORMERS = {}
|
|
53
54
|
DEFAULT_DATASTREAMS_EXCLUDES = []
|
54
55
|
|
55
56
|
DATASTREAMS_CONFIG_GENERATOR = default_config_generator
|
57
|
+
|
58
|
+
HAS_DRAFT_CUSTOM_FIELD = [BooleanCF("has_draft")]
|
File without changes
|
File without changes
|
@@ -43,7 +43,11 @@ oarepo_runtime/datastreams/readers/service.py
|
|
43
43
|
oarepo_runtime/datastreams/readers/yaml.py
|
44
44
|
oarepo_runtime/datastreams/writers/__init__.py
|
45
45
|
oarepo_runtime/datastreams/writers/service.py
|
46
|
+
oarepo_runtime/datastreams/writers/validation_errors.py
|
46
47
|
oarepo_runtime/datastreams/writers/yaml.py
|
48
|
+
oarepo_runtime/drafts/__init__.py
|
49
|
+
oarepo_runtime/drafts/systemfields/__init__.py
|
50
|
+
oarepo_runtime/drafts/systemfields/has_draftcheck.py
|
47
51
|
oarepo_runtime/expansions/__init__.py
|
48
52
|
oarepo_runtime/expansions/expandable_fields.py
|
49
53
|
oarepo_runtime/expansions/service.py
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[metadata]
|
2
2
|
name = oarepo-runtime
|
3
|
-
version = 1.3.
|
3
|
+
version = 1.3.21
|
4
4
|
description = A set of runtime extensions of Invenio repository
|
5
5
|
authors = Alzbeta Pokorna
|
6
6
|
readme = README.md
|
@@ -33,6 +33,8 @@ tests =
|
|
33
33
|
invenio-search[opensearch2]
|
34
34
|
oarepo>=11.0,<12
|
35
35
|
uritemplate>=4.1.1
|
36
|
+
oarepo-model-builder
|
37
|
+
oarepo-model-builder-tests
|
36
38
|
|
37
39
|
[options.package_data]
|
38
40
|
* = *.json, *.rst, *.md, *.json5, *.jinja2
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/config/permissions_presets.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/readers/service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/datastreams/writers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime/expansions/expandable_fields.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19/oarepo_runtime/ui → oarepo-runtime-1.3.21/oarepo_runtime/i18n}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{oarepo-runtime-1.3.19 → oarepo-runtime-1.3.21}/oarepo_runtime.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|