oarepo-runtime 2.0.0.dev19__tar.gz → 2.0.0.dev21__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 (41) hide show
  1. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/PKG-INFO +1 -1
  2. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/__init__.py +1 -1
  3. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/api.py +13 -5
  4. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/records/links.py +1 -3
  5. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/.gitignore +0 -0
  6. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/LICENSE +0 -0
  7. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/README.md +0 -0
  8. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/cli/__init__.py +0 -0
  9. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/cli/search.py +0 -0
  10. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/config.py +0 -0
  11. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/ext.py +0 -0
  12. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/proxies.py +0 -0
  13. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/py.typed +0 -0
  14. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/__init__.py +0 -0
  15. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/drafts.py +0 -0
  16. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/mapping.py +0 -0
  17. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/pid_providers.py +0 -0
  18. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/systemfields/__init__.py +0 -0
  19. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/systemfields/custom_fields.py +0 -0
  20. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/systemfields/mapping.py +0 -0
  21. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/systemfields/publication_status.py +0 -0
  22. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/records/systemfields/selectors.py +0 -0
  23. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/resources/__init__.py +0 -0
  24. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/resources/config.py +0 -0
  25. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/__init__.py +0 -0
  26. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/config/__init__.py +0 -0
  27. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/config/components.py +0 -0
  28. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/config/link_conditions.py +0 -0
  29. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/config/permissions.py +0 -0
  30. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/facets/__init__.py +0 -0
  31. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/facets/params.py +0 -0
  32. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/generators.py +0 -0
  33. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/records/__init__.py +0 -0
  34. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/records/custom_fields.py +0 -0
  35. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/records/mapping.py +0 -0
  36. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/results.py +0 -0
  37. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/schema/__init__.py +0 -0
  38. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/schema/i18n.py +0 -0
  39. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/services/schema/i18n_ui.py +0 -0
  40. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/oarepo_runtime/typing.py +0 -0
  41. {oarepo_runtime-2.0.0.dev19 → oarepo_runtime-2.0.0.dev21}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 2.0.0.dev19
3
+ Version: 2.0.0.dev21
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.0dev19"
22
+ __version__ = "2.0.0dev21"
23
23
 
24
24
  __all__ = ("Model", "OARepoRuntime", "__version__", "current_runtime")
@@ -126,16 +126,17 @@ class Model[
126
126
  exports: list[Export] | None = None,
127
127
  records_alias_enabled: bool = True,
128
128
  model_metadata: ModelMetadata | None = None,
129
+ features: Mapping[str, Any] | None = None,
129
130
  ):
130
131
  """Initialize the model configuration.
131
132
 
132
- :param name: Name of the model, human readable.
133
- :param version: Version of the model, should be a valid semantic version.
134
- :param description: Description of the model, human readable.
133
+ :param name: Name of the model, human-readable.
134
+ :param version: Version of the model should be a valid semantic version.
135
+ :param description: Description of the model, human-readable.
135
136
  :param service: Name of the service inside the `current_service_registry` or
136
137
  a configured service instance.
137
138
  :param service_config: Service configuration, if not provided,
138
- if will be taken from the service.
139
+ it will be taken from the service.
139
140
  :param record: Record class, if not provided, it will be taken from the service
140
141
  configuration.
141
142
  :param draft: Draft class, if not provided, it will be taken from the service
@@ -146,9 +147,10 @@ class Model[
146
147
  taken from the resource class.
147
148
  :param exports: List of export formats that can be used to export the record.
148
149
  If not provided, no exports are available.
149
- :param records_alias_enabled: Whether the records alias is enabled for this model.
150
+ :param records_alias_enabled: Whether the record alias is enabled for this model.
150
151
  Such models will be searchable via the `/api/records` endpoint.
151
152
  :param model_metadata: Metadata of the model.
153
+ :param features: Features of the model. Filled by the feature presets themselves during registration.
152
154
  """
153
155
  self._code = code
154
156
  self._name = name
@@ -171,6 +173,7 @@ class Model[
171
173
  self._resource_config = resource_config
172
174
  self._exports = exports or []
173
175
  self._model_metadata = model_metadata
176
+ self._features = features
174
177
 
175
178
  @property
176
179
  def code(self) -> str:
@@ -342,3 +345,8 @@ class Model[
342
345
  def response_handlers(self) -> dict[str, ResponseHandler]:
343
346
  """Get all response handlers from the resource configuration."""
344
347
  return cast("dict[str, ResponseHandler]", self.resource_config.response_handlers)
348
+
349
+ @property
350
+ def features(self) -> Mapping[str, Any] | None:
351
+ """Get a mapping of features."""
352
+ return self._features
@@ -11,12 +11,10 @@
11
11
 
12
12
  from __future__ import annotations
13
13
 
14
- from typing import Any
15
-
16
14
  from invenio_records_resources.services.base.links import EndpointLink
17
15
 
18
16
 
19
- def pagination_endpoint_links_html(endpoint: str, params: dict[str, Any] | None = None) -> dict[str, EndpointLink]:
17
+ def pagination_endpoint_links_html(endpoint: str, params: list[str] | None = None) -> dict[str, EndpointLink]:
20
18
  """Create pagination links (prev/self/next) from the same endpoint."""
21
19
  return {
22
20
  "prev_html": EndpointLink(