oarepo-runtime 2.0.0.dev41__tar.gz → 2.0.0.dev43__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.
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/PKG-INFO +1 -1
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/__init__.py +1 -1
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/api.py +9 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/resources/signposting/__init__.py +1 -1
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/.gitignore +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/LICENSE +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/README.md +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/cli/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/cli/search.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/config.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/ext.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/info/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/info/views.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/proxies.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/py.typed +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/drafts.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/mapping.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/pid_providers.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/base.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/custom_fields.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/mapping.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/publication_status.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/relations.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/systemfields/selectors.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/resources/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/resources/config.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/config/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/config/components.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/config/link_conditions.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/config/permissions.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/base.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/date.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/nested_facet.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/params.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/utils.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/generators.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/records/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/records/custom_fields.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/records/links.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/records/mapping.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/results.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/i18n.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/i18n_ui.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/ui.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/typing.py +0 -0
- {oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/pyproject.toml +0 -0
|
@@ -22,6 +22,7 @@ from invenio_records_resources.proxies import current_service_registry
|
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
24
24
|
from collections.abc import Mapping
|
|
25
|
+
from types import SimpleNamespace
|
|
25
26
|
|
|
26
27
|
from flask_babel.speaklater import LazyString
|
|
27
28
|
from flask_resources.deserializers import DeserializerMixin
|
|
@@ -154,6 +155,7 @@ class Model[
|
|
|
154
155
|
features: Mapping[str, Any] | None = None,
|
|
155
156
|
imports: list[Import] | None = None,
|
|
156
157
|
ui_blueprint_name: str | None = None,
|
|
158
|
+
namespace: SimpleNamespace | None = None,
|
|
157
159
|
):
|
|
158
160
|
"""Initialize the model configuration.
|
|
159
161
|
|
|
@@ -181,6 +183,7 @@ class Model[
|
|
|
181
183
|
:param imports: List of import formats that can be used to import the record.
|
|
182
184
|
If not provided, no imports are available.
|
|
183
185
|
:param ui_blueprint_name: Name of the UI blueprint
|
|
186
|
+
:param namespace: SimpleNamespace where the model is being created. Used by oarepo-model.
|
|
184
187
|
"""
|
|
185
188
|
self._code = code
|
|
186
189
|
self._name = name
|
|
@@ -206,6 +209,7 @@ class Model[
|
|
|
206
209
|
self._model_metadata = model_metadata
|
|
207
210
|
self._features = features
|
|
208
211
|
self._ui_blueprint_name = ui_blueprint_name
|
|
212
|
+
self._namespace = namespace
|
|
209
213
|
|
|
210
214
|
@property
|
|
211
215
|
def code(self) -> str:
|
|
@@ -416,3 +420,8 @@ class Model[
|
|
|
416
420
|
if self.records_alias_enabled:
|
|
417
421
|
return cast("str", self.service.id)
|
|
418
422
|
raise TypeError("This model does not have associated entity type.")
|
|
423
|
+
|
|
424
|
+
@property
|
|
425
|
+
def namespace(self) -> SimpleNamespace | None:
|
|
426
|
+
"""Get the namespace where the model is being created."""
|
|
427
|
+
return self._namespace
|
|
@@ -294,7 +294,7 @@ def landing_page_signpost_links_list(datacite_dict: dict, record_dict: dict, sho
|
|
|
294
294
|
# describedby
|
|
295
295
|
for model_export in model.exports:
|
|
296
296
|
model_export_url = model.ui_url(
|
|
297
|
-
view_name="
|
|
297
|
+
view_name="record_export", pid_value=record_dict["id"], export_format=model_export.code
|
|
298
298
|
)
|
|
299
299
|
# just sanity check, we don't expect this to happen, not covered in tests
|
|
300
300
|
if not model_export_url: # pragma: no cover
|
|
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-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/records/pid_providers.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-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/resources/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/resources/config.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/config/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/base.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/date.py
RENAMED
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/params.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/facets/utils.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/generators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/records/links.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/records/mapping.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/results.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/i18n.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/i18n_ui.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev41 → oarepo_runtime-2.0.0.dev43}/oarepo_runtime/services/schema/ui.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|