oarepo-runtime 2.0.0.dev11__tar.gz → 2.0.0.dev12__tar.gz

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 (36) hide show
  1. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/PKG-INFO +1 -1
  2. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/__init__.py +1 -1
  3. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/api.py +5 -0
  4. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/cli/search.py +4 -3
  5. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/pid_providers.py +2 -1
  6. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/pyproject.toml +3 -0
  7. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/.gitignore +0 -0
  8. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/LICENSE +0 -0
  9. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/README.md +0 -0
  10. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/cli/__init__.py +0 -0
  11. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/config.py +0 -0
  12. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/ext.py +0 -0
  13. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/proxies.py +0 -0
  14. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/py.typed +0 -0
  15. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/__init__.py +0 -0
  16. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/drafts.py +0 -0
  17. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/mapping.py +0 -0
  18. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/systemfields/__init__.py +0 -0
  19. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/systemfields/mapping.py +0 -0
  20. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/records/systemfields/publication_status.py +0 -0
  21. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/resources/__init__.py +0 -0
  22. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/resources/config.py +0 -0
  23. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/__init__.py +0 -0
  24. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/config/__init__.py +0 -0
  25. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/config/components.py +0 -0
  26. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/config/link_conditions.py +0 -0
  27. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/config/permissions.py +0 -0
  28. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/facets/__init__.py +0 -0
  29. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/facets/params.py +0 -0
  30. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/records/__init__.py +0 -0
  31. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/records/links.py +0 -0
  32. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/records/mapping.py +0 -0
  33. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/results.py +0 -0
  34. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/schema/__init__.py +0 -0
  35. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/schema/i18n.py +0 -0
  36. {oarepo_runtime-2.0.0.dev11 → oarepo_runtime-2.0.0.dev12}/oarepo_runtime/services/schema/i18n_ui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 2.0.0.dev11
3
+ Version: 2.0.0.dev12
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
@@ -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.0dev11"
22
+ __version__ = "2.0.0dev12"
23
23
 
24
24
  __all__ = ("Model", "OARepoRuntime", "__version__", "current_runtime")
@@ -251,6 +251,11 @@ class Model[
251
251
  """Get the PID type for the model."""
252
252
  return self._pid_type_from_record(self.record_cls)
253
253
 
254
+ @property
255
+ def record_json_schema(self) -> str:
256
+ """Get the json schema of the record."""
257
+ return self.record_cls.schema.value # type: ignore[attr-defined, no-any-return]
258
+
254
259
  @property
255
260
  def draft_pid_type(self) -> str | None:
256
261
  """Get the PID type for the model."""
@@ -10,13 +10,13 @@
10
10
 
11
11
  from __future__ import annotations
12
12
 
13
+ from importlib import metadata as importlib_metadata
14
+
13
15
  import click
14
16
  from flask.cli import with_appcontext
15
17
  from invenio_search.cli import index, search_version_check
16
18
  from invenio_search.cli import init as original_init
17
19
 
18
- from oarepo_runtime.services.records.mapping import update_all_records_mappings
19
-
20
20
 
21
21
  @index.command()
22
22
  @click.option("--force", is_flag=True, default=False)
@@ -31,4 +31,5 @@ def init(ctx: click.Context, force: bool) -> None:
31
31
  defined inside the models.
32
32
  """
33
33
  ctx.invoke(original_init, force=force)
34
- update_all_records_mappings()
34
+ for ep in importlib_metadata.entry_points(group="oarepo.cli.search.init"):
35
+ ep.load()()
@@ -23,7 +23,8 @@ else:
23
23
  class UniversalPIDMixin(RecordIdProviderV2):
24
24
  """Mixin class to handle creation and management of universal PIDs for records."""
25
25
 
26
- unpid_pid_type = "unpid"
26
+ unpid_pid_type = "recid"
27
+ """Setting this to recid so that RDM can use it."""
27
28
  unpid_default_status = PIDStatus.REGISTERED
28
29
 
29
30
  @classmethod
@@ -34,6 +34,9 @@ oarepo_runtime = "oarepo_runtime.ext:OARepoRuntime"
34
34
  [project.entry-points."flask.commands"]
35
35
  oarepo = "oarepo_runtime.cli:oarepo"
36
36
 
37
+ [project.entry-points."oarepo.cli.search.init"]
38
+ runtime_update_mappings = "oarepo_runtime.services.records.mapping:update_all_records_mappings"
39
+
37
40
  [tool.hatch.version]
38
41
  path = "oarepo_runtime/__init__.py"
39
42