oarepo-runtime 2.0.0.dev35__py3-none-any.whl → 2.0.0.dev36__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.
@@ -19,6 +19,6 @@ from .api import Model
19
19
  from .ext import OARepoRuntime
20
20
  from .proxies import current_runtime
21
21
 
22
- __version__ = "2.0.0dev35"
22
+ __version__ = "2.0.0dev36"
23
23
 
24
24
  __all__ = ("Model", "OARepoRuntime", "__version__", "current_runtime")
oarepo_runtime/typing.py CHANGED
@@ -16,6 +16,9 @@ from typing import TYPE_CHECKING, Any
16
16
  if TYPE_CHECKING:
17
17
  from collections.abc import Callable
18
18
 
19
+ from invenio_records_resources.records.api import Record
20
+ from invenio_records_resources.services.records.results import RecordItem
21
+
19
22
 
20
23
  def require_kwargs(*kwargs_names: str) -> Any:
21
24
  """Wrap function to require specific kwargs in a function call.
@@ -58,3 +61,8 @@ def require_kwargs(*kwargs_names: str) -> Any:
58
61
  return wrapped_f
59
62
 
60
63
  return wrapper
64
+
65
+
66
+ def record_from_result(result: RecordItem) -> Record:
67
+ """Convert a RecordItem to a Record."""
68
+ return result._record # noqa: SLF001
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 2.0.0.dev35
3
+ Version: 2.0.0.dev36
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Project-URL: Homepage, https://github.com/oarepo/oarepo-runtime
6
6
  License-Expression: MIT
@@ -1,10 +1,10 @@
1
- oarepo_runtime/__init__.py,sha256=VGinT5vziEg9nmT32QIwedHQ1YgRBlV5EXie4fjixkM,686
1
+ oarepo_runtime/__init__.py,sha256=Y5ZPbHF2q3Fi0ElItUf0wzaM3aP_xOw-MkJntFLkO8E,686
2
2
  oarepo_runtime/api.py,sha256=6AHyFnf0Cg1nfhGaQFMPjynVvrp1UURo8vX5vb5LvC4,14169
3
3
  oarepo_runtime/config.py,sha256=RUEPFn_5bKp9Wb0OY-Fb3VK30m35vF5IsLjYaQHhP3g,3838
4
4
  oarepo_runtime/ext.py,sha256=NgiRNl_hwTvEWcXnNwVh_XCPJyvwr3dZkdPmkWvN1xo,8785
5
5
  oarepo_runtime/proxies.py,sha256=x8Y1iTP8QIzSI67s90VR0_5fvXuT1xlJXtAHsaoXFwg,903
6
6
  oarepo_runtime/py.typed,sha256=RznSCjXReEUI9zkmD25E8XniG_MvPpLBF6MyNZA8MmE,42
7
- oarepo_runtime/typing.py,sha256=vH8UUb4QTJowuvibwHaOOEwxx8i21LcOeplxJl0Yrew,1594
7
+ oarepo_runtime/typing.py,sha256=VtINHm4BZ5OJ4KdRAwnFXPZiAEgPRIYTtPC9fIzK1bU,1876
8
8
  oarepo_runtime/cli/__init__.py,sha256=H7GOeOBf0udgKWOdlAQswIMvRrD8BwcEjOVxIqP0Suw,731
9
9
  oarepo_runtime/cli/search.py,sha256=4fHkrjltUUPVUzJiuWaiWxTk62rIYxal3_3jRsZVMmI,1175
10
10
  oarepo_runtime/info/__init__.py,sha256=qRG3mSyoiw7sKm9StiuBJs6l15HrdAQ4sphsAQsJtQc,336
@@ -42,8 +42,8 @@ oarepo_runtime/services/schema/__init__.py,sha256=jgAPI_uKC6Ug4KQWnwQVg3-aNaw-eH
42
42
  oarepo_runtime/services/schema/i18n.py,sha256=9D1zOQaPKAnYzejB0vO-m2BJYnam0N0Lrq4jID7twfE,3174
43
43
  oarepo_runtime/services/schema/i18n_ui.py,sha256=DbusphhGDeaobTt4nuwNgKZ6Houlu4Sv3SuMGkdjRRY,3582
44
44
  oarepo_runtime/services/schema/ui.py,sha256=Y_jBO-fowkpOgceWz8aqJSJAUiAnKLGSIuNpjNLnp8Q,4612
45
- oarepo_runtime-2.0.0.dev35.dist-info/METADATA,sha256=xI4aL-6OK_IN3C5QVz-uXcuKH48Tw9h80-ZvJOFUoFI,4707
46
- oarepo_runtime-2.0.0.dev35.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
47
- oarepo_runtime-2.0.0.dev35.dist-info/entry_points.txt,sha256=rOfs8R1oXFN_dLH9zAZ6ydkvr83mDajegc6NBIRsCMQ,318
48
- oarepo_runtime-2.0.0.dev35.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
49
- oarepo_runtime-2.0.0.dev35.dist-info/RECORD,,
45
+ oarepo_runtime-2.0.0.dev36.dist-info/METADATA,sha256=4wSsN4WdUaamDR4j3jrH-uj9K8b_NYhhpE_BA6TTh90,4707
46
+ oarepo_runtime-2.0.0.dev36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
47
+ oarepo_runtime-2.0.0.dev36.dist-info/entry_points.txt,sha256=rOfs8R1oXFN_dLH9zAZ6ydkvr83mDajegc6NBIRsCMQ,318
48
+ oarepo_runtime-2.0.0.dev36.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
49
+ oarepo_runtime-2.0.0.dev36.dist-info/RECORD,,