oarepo-runtime 1.10.3__tar.gz → 2.0.0.dev3__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.dev3/.gitignore +382 -0
- {oarepo_runtime-1.10.3/oarepo_runtime.egg-info → oarepo_runtime-2.0.0.dev3}/PKG-INFO +9 -21
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/__init__.py +24 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/api.py +111 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/cli/__init__.py +11 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/cli/search.py +34 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/config.py +92 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/ext.py +84 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/proxies.py +24 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/__init__.py +11 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/drafts.py +48 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/mapping.py +84 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/pid_providers.py +58 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/systemfields/__init__.py +16 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/systemfields/mapping.py +56 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/records/systemfields/publication_status.py +59 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/__init__.py +12 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/config/__init__.py +29 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/config/link_conditions.py +120 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/config/permissions.py +62 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/records/__init__.py +16 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/records/links.py +31 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/records/mapping.py +42 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/results.py +184 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/schema/__init__.py +12 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/schema/i18n.py +101 -0
- oarepo_runtime-2.0.0.dev3/oarepo_runtime/services/schema/i18n_ui.py +119 -0
- oarepo_runtime-2.0.0.dev3/pyproject.toml +45 -0
- oarepo_runtime-1.10.3/MANIFEST.in +0 -3
- oarepo_runtime-1.10.3/PKG-INFO +0 -175
- oarepo_runtime-1.10.3/oarepo_runtime/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/cli/__init__.py +0 -22
- oarepo_runtime-1.10.3/oarepo_runtime/cli/assets.py +0 -145
- oarepo_runtime-1.10.3/oarepo_runtime/cli/base.py +0 -25
- oarepo_runtime-1.10.3/oarepo_runtime/cli/cf.py +0 -15
- oarepo_runtime-1.10.3/oarepo_runtime/cli/check.py +0 -167
- oarepo_runtime-1.10.3/oarepo_runtime/cli/configuration.py +0 -51
- oarepo_runtime-1.10.3/oarepo_runtime/cli/fixtures.py +0 -167
- oarepo_runtime-1.10.3/oarepo_runtime/cli/index.py +0 -272
- oarepo_runtime-1.10.3/oarepo_runtime/cli/permissions/__init__.py +0 -6
- oarepo_runtime-1.10.3/oarepo_runtime/cli/permissions/base.py +0 -26
- oarepo_runtime-1.10.3/oarepo_runtime/cli/permissions/evaluate.py +0 -63
- oarepo_runtime-1.10.3/oarepo_runtime/cli/permissions/list.py +0 -239
- oarepo_runtime-1.10.3/oarepo_runtime/cli/permissions/search.py +0 -121
- oarepo_runtime-1.10.3/oarepo_runtime/cli/validate.py +0 -150
- oarepo_runtime-1.10.3/oarepo_runtime/config.py +0 -19
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/__init__.py +0 -38
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/asynchronous.py +0 -247
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/catalogue.py +0 -150
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/datastreams.py +0 -152
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/errors.py +0 -54
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/ext.py +0 -41
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/fixtures.py +0 -265
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/json.py +0 -4
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/readers/__init__.py +0 -39
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/readers/attachments.py +0 -51
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/readers/excel.py +0 -123
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/readers/json.py +0 -27
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/readers/service.py +0 -54
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/readers/yaml.py +0 -14
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/semi_asynchronous.py +0 -91
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/synchronous.py +0 -70
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/transformers.py +0 -18
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/types.py +0 -323
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/utils.py +0 -131
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/__init__.py +0 -21
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/attachments_file.py +0 -92
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/attachments_service.py +0 -118
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/publish.py +0 -70
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/service.py +0 -175
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/utils.py +0 -30
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/validation_errors.py +0 -20
- oarepo_runtime-1.10.3/oarepo_runtime/datastreams/writers/yaml.py +0 -56
- oarepo_runtime-1.10.3/oarepo_runtime/ext.py +0 -102
- oarepo_runtime-1.10.3/oarepo_runtime/ext_config.py +0 -67
- oarepo_runtime-1.10.3/oarepo_runtime/i18n/__init__.py +0 -3
- oarepo_runtime-1.10.3/oarepo_runtime/info/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/info/check.py +0 -95
- oarepo_runtime-1.10.3/oarepo_runtime/info/permissions/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/info/permissions/debug.py +0 -191
- oarepo_runtime-1.10.3/oarepo_runtime/info/views.py +0 -586
- oarepo_runtime-1.10.3/oarepo_runtime/profile.py +0 -60
- oarepo_runtime-1.10.3/oarepo_runtime/proxies.py +0 -8
- oarepo_runtime-1.10.3/oarepo_runtime/records/__init__.py +0 -50
- oarepo_runtime-1.10.3/oarepo_runtime/records/drafts.py +0 -42
- oarepo_runtime-1.10.3/oarepo_runtime/records/dumpers/__init__.py +0 -8
- oarepo_runtime-1.10.3/oarepo_runtime/records/dumpers/edtf_interval.py +0 -38
- oarepo_runtime-1.10.3/oarepo_runtime/records/dumpers/multilingual_dumper.py +0 -34
- oarepo_runtime-1.10.3/oarepo_runtime/records/entity_resolvers/__init__.py +0 -13
- oarepo_runtime-1.10.3/oarepo_runtime/records/entity_resolvers/proxies.py +0 -57
- oarepo_runtime-1.10.3/oarepo_runtime/records/mappings/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/records/mappings/rdm_parent_mapping.json +0 -483
- oarepo_runtime-1.10.3/oarepo_runtime/records/owners/__init__.py +0 -3
- oarepo_runtime-1.10.3/oarepo_runtime/records/owners/registry.py +0 -22
- oarepo_runtime-1.10.3/oarepo_runtime/records/pid_providers.py +0 -22
- oarepo_runtime-1.10.3/oarepo_runtime/records/relations/__init__.py +0 -22
- oarepo_runtime-1.10.3/oarepo_runtime/records/relations/base.py +0 -296
- oarepo_runtime-1.10.3/oarepo_runtime/records/relations/internal.py +0 -46
- oarepo_runtime-1.10.3/oarepo_runtime/records/relations/lookup.py +0 -28
- oarepo_runtime-1.10.3/oarepo_runtime/records/relations/pid_relation.py +0 -102
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/__init__.py +0 -34
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/featured_file.py +0 -45
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/has_draftcheck.py +0 -47
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/icu.py +0 -371
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/mapping.py +0 -39
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/owner.py +0 -115
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/record_status.py +0 -35
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/selectors.py +0 -98
- oarepo_runtime-1.10.3/oarepo_runtime/records/systemfields/synthetic.py +0 -130
- oarepo_runtime-1.10.3/oarepo_runtime/resources/__init__.py +0 -4
- oarepo_runtime-1.10.3/oarepo_runtime/resources/config.py +0 -12
- oarepo_runtime-1.10.3/oarepo_runtime/resources/file_resource.py +0 -15
- oarepo_runtime-1.10.3/oarepo_runtime/resources/json_serializer.py +0 -27
- oarepo_runtime-1.10.3/oarepo_runtime/resources/localized_ui_json_serializer.py +0 -54
- oarepo_runtime-1.10.3/oarepo_runtime/resources/resource.py +0 -53
- oarepo_runtime-1.10.3/oarepo_runtime/resources/responses.py +0 -20
- oarepo_runtime-1.10.3/oarepo_runtime/services/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/services/components.py +0 -429
- oarepo_runtime-1.10.3/oarepo_runtime/services/config/__init__.py +0 -35
- oarepo_runtime-1.10.3/oarepo_runtime/services/config/draft_link.py +0 -23
- oarepo_runtime-1.10.3/oarepo_runtime/services/config/link_conditions.py +0 -126
- oarepo_runtime-1.10.3/oarepo_runtime/services/config/permissions_presets.py +0 -174
- oarepo_runtime-1.10.3/oarepo_runtime/services/config/service.py +0 -117
- oarepo_runtime-1.10.3/oarepo_runtime/services/custom_fields/__init__.py +0 -80
- oarepo_runtime-1.10.3/oarepo_runtime/services/custom_fields/mappings.py +0 -188
- oarepo_runtime-1.10.3/oarepo_runtime/services/entity/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/services/entity/config.py +0 -14
- oarepo_runtime-1.10.3/oarepo_runtime/services/entity/schema.py +0 -9
- oarepo_runtime-1.10.3/oarepo_runtime/services/entity/service.py +0 -48
- oarepo_runtime-1.10.3/oarepo_runtime/services/expansions/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/services/expansions/expandable_fields.py +0 -21
- oarepo_runtime-1.10.3/oarepo_runtime/services/expansions/service.py +0 -4
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/__init__.py +0 -33
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/base.py +0 -12
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/date.py +0 -72
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/enum.py +0 -11
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/facet_groups_names.py +0 -17
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/max_facet.py +0 -13
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/multilingual_facet.py +0 -33
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/nested_facet.py +0 -32
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/params.py +0 -192
- oarepo_runtime-1.10.3/oarepo_runtime/services/facets/year_histogram.py +0 -200
- oarepo_runtime-1.10.3/oarepo_runtime/services/files/__init__.py +0 -8
- oarepo_runtime-1.10.3/oarepo_runtime/services/files/components.py +0 -62
- oarepo_runtime-1.10.3/oarepo_runtime/services/files/service.py +0 -16
- oarepo_runtime-1.10.3/oarepo_runtime/services/generators.py +0 -10
- oarepo_runtime-1.10.3/oarepo_runtime/services/permissions/__init__.py +0 -3
- oarepo_runtime-1.10.3/oarepo_runtime/services/permissions/generators.py +0 -103
- oarepo_runtime-1.10.3/oarepo_runtime/services/records/__init__.py +0 -3
- oarepo_runtime-1.10.3/oarepo_runtime/services/records/links.py +0 -21
- oarepo_runtime-1.10.3/oarepo_runtime/services/relations/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/services/relations/components.py +0 -15
- oarepo_runtime-1.10.3/oarepo_runtime/services/relations/errors.py +0 -18
- oarepo_runtime-1.10.3/oarepo_runtime/services/relations/mapping.py +0 -38
- oarepo_runtime-1.10.3/oarepo_runtime/services/results.py +0 -195
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/__init__.py +0 -44
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/cf.py +0 -13
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/i18n.py +0 -76
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/i18n_ui.py +0 -82
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/i18n_validation.py +0 -7
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/marshmallow.py +0 -44
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/marshmallow_to_json_schema.py +0 -72
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/oneofschema.py +0 -192
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/polymorphic.py +0 -21
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/rdm.py +0 -146
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/rdm_ui.py +0 -156
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/ui.py +0 -251
- oarepo_runtime-1.10.3/oarepo_runtime/services/schema/validation.py +0 -70
- oarepo_runtime-1.10.3/oarepo_runtime/services/search.py +0 -282
- oarepo_runtime-1.10.3/oarepo_runtime/services/service.py +0 -61
- oarepo_runtime-1.10.3/oarepo_runtime/tasks.py +0 -6
- oarepo_runtime-1.10.3/oarepo_runtime/translations/cs/LC_MESSAGES/messages.mo +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/translations/cs/LC_MESSAGES/messages.po +0 -95
- oarepo_runtime-1.10.3/oarepo_runtime/translations/default_translations.py +0 -6
- oarepo_runtime-1.10.3/oarepo_runtime/translations/en/LC_MESSAGES/messages.mo +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/translations/en/LC_MESSAGES/messages.po +0 -97
- oarepo_runtime-1.10.3/oarepo_runtime/translations/messages.pot +0 -100
- oarepo_runtime-1.10.3/oarepo_runtime/uow.py +0 -146
- oarepo_runtime-1.10.3/oarepo_runtime/utils/__init__.py +0 -0
- oarepo_runtime-1.10.3/oarepo_runtime/utils/functools.py +0 -37
- oarepo_runtime-1.10.3/oarepo_runtime/utils/identity_utils.py +0 -35
- oarepo_runtime-1.10.3/oarepo_runtime/utils/index.py +0 -11
- oarepo_runtime-1.10.3/oarepo_runtime/utils/path.py +0 -97
- oarepo_runtime-1.10.3/oarepo_runtime.egg-info/SOURCES.txt +0 -169
- oarepo_runtime-1.10.3/oarepo_runtime.egg-info/dependency_links.txt +0 -1
- oarepo_runtime-1.10.3/oarepo_runtime.egg-info/entry_points.txt +0 -16
- oarepo_runtime-1.10.3/oarepo_runtime.egg-info/requires.txt +0 -21
- oarepo_runtime-1.10.3/oarepo_runtime.egg-info/top_level.txt +0 -2
- oarepo_runtime-1.10.3/pyproject.toml +0 -3
- oarepo_runtime-1.10.3/setup.cfg +0 -64
- oarepo_runtime-1.10.3/setup.py +0 -3
- oarepo_runtime-1.10.3/tests/marshmallow_to_json/__init__.py +0 -0
- oarepo_runtime-1.10.3/tests/marshmallow_to_json/test_datacite_ui_schema.py +0 -1410
- oarepo_runtime-1.10.3/tests/marshmallow_to_json/test_simple_schema.py +0 -52
- oarepo_runtime-1.10.3/tests/pkg_data/__init__.py +0 -0
- {oarepo_runtime-1.10.3 → oarepo_runtime-2.0.0.dev3}/LICENSE +0 -0
- {oarepo_runtime-1.10.3 → oarepo_runtime-2.0.0.dev3}/README.md +0 -0
@@ -0,0 +1,382 @@
|
|
1
|
+
#
|
2
|
+
# Python gitignore
|
3
|
+
#
|
4
|
+
|
5
|
+
# Byte-compiled / optimized / DLL files
|
6
|
+
__pycache__/
|
7
|
+
*.py[codz]
|
8
|
+
*$py.class
|
9
|
+
|
10
|
+
# C extensions
|
11
|
+
*.so
|
12
|
+
|
13
|
+
# Distribution / packaging
|
14
|
+
.Python
|
15
|
+
build/
|
16
|
+
develop-eggs/
|
17
|
+
dist/
|
18
|
+
downloads/
|
19
|
+
eggs/
|
20
|
+
.eggs/
|
21
|
+
lib/
|
22
|
+
lib64/
|
23
|
+
parts/
|
24
|
+
sdist/
|
25
|
+
var/
|
26
|
+
wheels/
|
27
|
+
share/python-wheels/
|
28
|
+
*.egg-info/
|
29
|
+
.installed.cfg
|
30
|
+
*.egg
|
31
|
+
MANIFEST
|
32
|
+
|
33
|
+
# PyInstaller
|
34
|
+
# Usually these files are written by a python script from a template
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
36
|
+
*.manifest
|
37
|
+
*.spec
|
38
|
+
|
39
|
+
# Installer logs
|
40
|
+
pip-log.txt
|
41
|
+
pip-delete-this-directory.txt
|
42
|
+
|
43
|
+
# Unit test / coverage reports
|
44
|
+
htmlcov/
|
45
|
+
.tox/
|
46
|
+
.nox/
|
47
|
+
.coverage
|
48
|
+
.coverage.*
|
49
|
+
.cache
|
50
|
+
nosetests.xml
|
51
|
+
coverage.xml
|
52
|
+
coverage.json
|
53
|
+
*.cover
|
54
|
+
*.py.cover
|
55
|
+
.hypothesis/
|
56
|
+
.pytest_cache/
|
57
|
+
cover/
|
58
|
+
|
59
|
+
# Django stuff:
|
60
|
+
*.log
|
61
|
+
local_settings.py
|
62
|
+
db.sqlite3
|
63
|
+
db.sqlite3-journal
|
64
|
+
|
65
|
+
# Flask stuff:
|
66
|
+
instance/
|
67
|
+
.webassets-cache
|
68
|
+
|
69
|
+
# Scrapy stuff:
|
70
|
+
.scrapy
|
71
|
+
|
72
|
+
# Sphinx documentation
|
73
|
+
docs/_build/
|
74
|
+
|
75
|
+
# PyBuilder
|
76
|
+
.pybuilder/
|
77
|
+
target/
|
78
|
+
|
79
|
+
# Jupyter Notebook
|
80
|
+
.ipynb_checkpoints
|
81
|
+
|
82
|
+
# IPython
|
83
|
+
profile_default/
|
84
|
+
ipython_config.py
|
85
|
+
|
86
|
+
# pyenv
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
89
|
+
# .python-version
|
90
|
+
|
91
|
+
# pipenv
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
95
|
+
# install all needed dependencies.
|
96
|
+
#Pipfile.lock
|
97
|
+
|
98
|
+
# UV
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
101
|
+
# commonly ignored for libraries.
|
102
|
+
#uv.lock
|
103
|
+
|
104
|
+
# poetry
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
107
|
+
# commonly ignored for libraries.
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
109
|
+
#poetry.lock
|
110
|
+
#poetry.toml
|
111
|
+
|
112
|
+
# pdm
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
116
|
+
#pdm.lock
|
117
|
+
#pdm.toml
|
118
|
+
.pdm-python
|
119
|
+
.pdm-build/
|
120
|
+
|
121
|
+
# pixi
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
123
|
+
#pixi.lock
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
126
|
+
.pixi
|
127
|
+
|
128
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
129
|
+
__pypackages__/
|
130
|
+
|
131
|
+
# Celery stuff
|
132
|
+
celerybeat-schedule
|
133
|
+
celerybeat.pid
|
134
|
+
|
135
|
+
# SageMath parsed files
|
136
|
+
*.sage.py
|
137
|
+
|
138
|
+
# Environments
|
139
|
+
.env
|
140
|
+
.envrc
|
141
|
+
.venv
|
142
|
+
env/
|
143
|
+
venv/
|
144
|
+
ENV/
|
145
|
+
env.bak/
|
146
|
+
venv.bak/
|
147
|
+
|
148
|
+
# Spyder project settings
|
149
|
+
.spyderproject
|
150
|
+
.spyproject
|
151
|
+
|
152
|
+
# Rope project settings
|
153
|
+
.ropeproject
|
154
|
+
|
155
|
+
# mkdocs documentation
|
156
|
+
/site
|
157
|
+
|
158
|
+
# mypy
|
159
|
+
.mypy_cache/
|
160
|
+
.mypy.ini
|
161
|
+
.dmypy.json
|
162
|
+
dmypy.json
|
163
|
+
|
164
|
+
# Pyre type checker
|
165
|
+
.pyre/
|
166
|
+
|
167
|
+
# pytype static type analyzer
|
168
|
+
.pytype/
|
169
|
+
|
170
|
+
# Cython debug symbols
|
171
|
+
cython_debug/
|
172
|
+
|
173
|
+
# PyCharm
|
174
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
175
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
176
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
177
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
178
|
+
#.idea/
|
179
|
+
|
180
|
+
# Abstra
|
181
|
+
# Abstra is an AI-powered process automation framework.
|
182
|
+
# Ignore directories containing user credentials, local state, and settings.
|
183
|
+
# Learn more at https://abstra.io/docs
|
184
|
+
.abstra/
|
185
|
+
|
186
|
+
# Visual Studio Code
|
187
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
188
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
189
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
190
|
+
# you could uncomment the following to ignore the entire vscode folder
|
191
|
+
# .vscode/
|
192
|
+
|
193
|
+
# Ruff stuff:
|
194
|
+
.ruff.toml
|
195
|
+
.ruff_cache/
|
196
|
+
.mypy.ini
|
197
|
+
|
198
|
+
# PyPI configuration file
|
199
|
+
.pypirc
|
200
|
+
|
201
|
+
# Marimo
|
202
|
+
marimo/_static/
|
203
|
+
marimo/_lsp/
|
204
|
+
__marimo__/
|
205
|
+
|
206
|
+
# Streamlit
|
207
|
+
.streamlit/secrets.toml
|
208
|
+
|
209
|
+
# UV package management
|
210
|
+
uv.lock
|
211
|
+
|
212
|
+
#
|
213
|
+
# Node.js gitignore
|
214
|
+
#
|
215
|
+
# Logs
|
216
|
+
logs
|
217
|
+
*.log
|
218
|
+
npm-debug.log*
|
219
|
+
yarn-debug.log*
|
220
|
+
yarn-error.log*
|
221
|
+
lerna-debug.log*
|
222
|
+
|
223
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
224
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
225
|
+
|
226
|
+
# Runtime data
|
227
|
+
pids
|
228
|
+
*.pid
|
229
|
+
*.seed
|
230
|
+
*.pid.lock
|
231
|
+
|
232
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
233
|
+
lib-cov
|
234
|
+
|
235
|
+
# Coverage directory used by tools like istanbul
|
236
|
+
coverage
|
237
|
+
*.lcov
|
238
|
+
|
239
|
+
# nyc test coverage
|
240
|
+
.nyc_output
|
241
|
+
|
242
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
243
|
+
.grunt
|
244
|
+
|
245
|
+
# Bower dependency directory (https://bower.io/)
|
246
|
+
bower_components
|
247
|
+
|
248
|
+
# node-waf configuration
|
249
|
+
.lock-wscript
|
250
|
+
|
251
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
252
|
+
build/Release
|
253
|
+
|
254
|
+
# Dependency directories
|
255
|
+
node_modules/
|
256
|
+
jspm_packages/
|
257
|
+
|
258
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
259
|
+
web_modules/
|
260
|
+
|
261
|
+
# TypeScript cache
|
262
|
+
*.tsbuildinfo
|
263
|
+
|
264
|
+
# Optional npm cache directory
|
265
|
+
.npm
|
266
|
+
|
267
|
+
# Optional eslint cache
|
268
|
+
.eslintcache
|
269
|
+
|
270
|
+
# Optional stylelint cache
|
271
|
+
.stylelintcache
|
272
|
+
|
273
|
+
# Optional REPL history
|
274
|
+
.node_repl_history
|
275
|
+
|
276
|
+
# Output of 'npm pack'
|
277
|
+
*.tgz
|
278
|
+
|
279
|
+
# Yarn Integrity file
|
280
|
+
.yarn-integrity
|
281
|
+
|
282
|
+
# dotenv environment variable files
|
283
|
+
.env
|
284
|
+
.env.*
|
285
|
+
!.env.example
|
286
|
+
|
287
|
+
# parcel-bundler cache (https://parceljs.org/)
|
288
|
+
.cache
|
289
|
+
.parcel-cache
|
290
|
+
|
291
|
+
# Next.js build output
|
292
|
+
.next
|
293
|
+
out
|
294
|
+
|
295
|
+
# Nuxt.js build / generate output
|
296
|
+
.nuxt
|
297
|
+
dist
|
298
|
+
|
299
|
+
# Gatsby files
|
300
|
+
.cache/
|
301
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
302
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
303
|
+
# public
|
304
|
+
|
305
|
+
# vuepress build output
|
306
|
+
.vuepress/dist
|
307
|
+
|
308
|
+
# vuepress v2.x temp and cache directory
|
309
|
+
.temp
|
310
|
+
.cache
|
311
|
+
|
312
|
+
# Sveltekit cache directory
|
313
|
+
.svelte-kit/
|
314
|
+
|
315
|
+
# vitepress build output
|
316
|
+
**/.vitepress/dist
|
317
|
+
|
318
|
+
# vitepress cache directory
|
319
|
+
**/.vitepress/cache
|
320
|
+
|
321
|
+
# Docusaurus cache and generated files
|
322
|
+
.docusaurus
|
323
|
+
|
324
|
+
# Serverless directories
|
325
|
+
.serverless/
|
326
|
+
|
327
|
+
# FuseBox cache
|
328
|
+
.fusebox/
|
329
|
+
|
330
|
+
# DynamoDB Local files
|
331
|
+
.dynamodb/
|
332
|
+
|
333
|
+
# Firebase cache directory
|
334
|
+
.firebase/
|
335
|
+
|
336
|
+
# TernJS port file
|
337
|
+
.tern-port
|
338
|
+
|
339
|
+
# Stores VSCode versions used for testing VSCode extensions
|
340
|
+
.vscode-test
|
341
|
+
|
342
|
+
# yarn v3
|
343
|
+
.pnp.*
|
344
|
+
.yarn/*
|
345
|
+
!.yarn/patches
|
346
|
+
!.yarn/plugins
|
347
|
+
!.yarn/releases
|
348
|
+
!.yarn/sdks
|
349
|
+
!.yarn/versions
|
350
|
+
|
351
|
+
# Vite logs files
|
352
|
+
vite.config.js.timestamp-*
|
353
|
+
vite.config.ts.timestamp-*
|
354
|
+
|
355
|
+
#
|
356
|
+
# OARepo specific gitignore
|
357
|
+
#
|
358
|
+
.runner.sh
|
359
|
+
.env-services
|
360
|
+
.eslintrc.yaml
|
361
|
+
.mypy.ini
|
362
|
+
.ruff.toml
|
363
|
+
|
364
|
+
#
|
365
|
+
# Editors
|
366
|
+
.vscode/
|
367
|
+
.idea/
|
368
|
+
*.swp
|
369
|
+
*.swo
|
370
|
+
*.swn
|
371
|
+
*.sublime-workspace
|
372
|
+
*.sublime-project
|
373
|
+
*.kate-swp
|
374
|
+
*.kate-swp.*
|
375
|
+
*.komodoproject
|
376
|
+
*.komodotools
|
377
|
+
*.komodoide
|
378
|
+
*.komodotools
|
379
|
+
*.komodotools.*
|
380
|
+
.DS_Store
|
381
|
+
*.DS_Store?
|
382
|
+
#
|
@@ -1,29 +1,17 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: oarepo-runtime
|
3
|
-
Version:
|
3
|
+
Version: 2.0.0.dev3
|
4
4
|
Summary: A set of runtime extensions of Invenio repository
|
5
|
-
|
5
|
+
License-Expression: MIT
|
6
6
|
License-File: LICENSE
|
7
|
-
Requires-
|
8
|
-
Requires-Dist: langcodes
|
9
|
-
Requires-Dist:
|
10
|
-
Requires-Dist: openpyxl
|
11
|
-
Requires-Dist: flask-babelex
|
12
|
-
Requires-Dist: deepmerge
|
13
|
-
Requires-Dist: tqdm
|
14
|
-
Requires-Dist: deprecated
|
15
|
-
Requires-Dist: idutils
|
7
|
+
Requires-Python: <3.14,>=3.13
|
8
|
+
Requires-Dist: langcodes>=3.5.0
|
9
|
+
Requires-Dist: oarepo[rdm,tests]<14,>=13
|
16
10
|
Provides-Extra: dev
|
17
|
-
Requires-Dist: pytest>=7.1.2; extra ==
|
18
|
-
Requires-Dist: black; extra == "dev"
|
19
|
-
Requires-Dist: isort; extra == "dev"
|
20
|
-
Requires-Dist: autoflake; extra == "dev"
|
21
|
-
Requires-Dist: oarepo-tools; extra == "dev"
|
11
|
+
Requires-Dist: pytest>=7.1.2; extra == 'dev'
|
22
12
|
Provides-Extra: tests
|
23
|
-
Requires-Dist: pytest>=7.1.2; extra ==
|
24
|
-
|
25
|
-
Requires-Dist: psutil; extra == "tests"
|
26
|
-
Dynamic: license-file
|
13
|
+
Requires-Dist: pytest>=7.1.2; extra == 'tests'
|
14
|
+
Description-Content-Type: text/markdown
|
27
15
|
|
28
16
|
# OARepo runtime
|
29
17
|
|
@@ -172,4 +160,4 @@ Will print/write to file a json with the following format:
|
|
172
160
|
```
|
173
161
|
```json
|
174
162
|
|
175
|
-
```
|
163
|
+
```
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2025 CESNET z.s.p.o.
|
3
|
+
#
|
4
|
+
# This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
|
5
|
+
#
|
6
|
+
# oarepo-runtime is free software; you can redistribute it and/or modify it
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
8
|
+
#
|
9
|
+
|
10
|
+
"""OARepo Runtime package.
|
11
|
+
|
12
|
+
This package provides support for custom fields identification and iteration and `invenio oarepo cf init`
|
13
|
+
initialization tool for customfields.
|
14
|
+
"""
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
|
18
|
+
from .api import Model
|
19
|
+
from .ext import OARepoRuntime
|
20
|
+
from .proxies import current_runtime
|
21
|
+
|
22
|
+
__version__ = "2.0.0dev3"
|
23
|
+
|
24
|
+
__all__ = ("Model", "OARepoRuntime", "__version__", "current_runtime")
|
@@ -0,0 +1,111 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2025 CESNET z.s.p.o.
|
3
|
+
#
|
4
|
+
# This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
|
5
|
+
#
|
6
|
+
# oarepo-runtime is free software; you can redistribute it and/or modify it
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
8
|
+
#
|
9
|
+
|
10
|
+
"""Runtime API classes that are returned from the current_runtime instance."""
|
11
|
+
|
12
|
+
from __future__ import annotations
|
13
|
+
|
14
|
+
from typing import TYPE_CHECKING, cast
|
15
|
+
|
16
|
+
from invenio_records_resources.proxies import current_service_registry
|
17
|
+
|
18
|
+
if TYPE_CHECKING:
|
19
|
+
from flask_babel.speaklater import LazyString
|
20
|
+
from invenio_drafts_resources.records.api import Draft
|
21
|
+
from invenio_records_resources.records.api import RecordBase
|
22
|
+
from invenio_records_resources.services import RecordService, RecordServiceConfig
|
23
|
+
|
24
|
+
|
25
|
+
class Model[
|
26
|
+
S: RecordService = RecordService,
|
27
|
+
C: RecordServiceConfig = RecordServiceConfig,
|
28
|
+
R: RecordBase = RecordBase,
|
29
|
+
D: Draft = Draft,
|
30
|
+
]:
|
31
|
+
"""Model configuration.
|
32
|
+
|
33
|
+
Every model in oarepo repository must have this configuration which must be
|
34
|
+
registered in the `oarepo.runtime` extension via the OAREPO_MODELS config
|
35
|
+
variable.
|
36
|
+
"""
|
37
|
+
|
38
|
+
name: str | LazyString
|
39
|
+
version: str
|
40
|
+
description: str | LazyString | None = None
|
41
|
+
global_search_enabled: bool = False
|
42
|
+
|
43
|
+
def __init__( # noqa: PLR0913 more attributes as we are creating a config
|
44
|
+
self,
|
45
|
+
name: str | LazyString,
|
46
|
+
version: str,
|
47
|
+
service: str | S,
|
48
|
+
# params with default values
|
49
|
+
service_config: C | None = None,
|
50
|
+
description: str | LazyString | None = None,
|
51
|
+
record: type[R] | None = None,
|
52
|
+
draft: type[D] | None = None,
|
53
|
+
global_search_enabled: bool = True,
|
54
|
+
):
|
55
|
+
"""Initialize the model configuration.
|
56
|
+
|
57
|
+
:param name: Name of the model, human readable.
|
58
|
+
:param version: Version of the model, should be a valid semantic version.
|
59
|
+
:param description: Description of the model, human readable.
|
60
|
+
:param service: Name of the service inside the `current_service_registry` or
|
61
|
+
a configured service instance.
|
62
|
+
:param service_config: Service configuration, if not provided,
|
63
|
+
if will be taken from the service.
|
64
|
+
:param record: Record class, if not provided, it will be taken from the service
|
65
|
+
configuration.
|
66
|
+
:param draft: Draft class, if not provided, it will be taken from the service
|
67
|
+
configuration.
|
68
|
+
"""
|
69
|
+
self.name = name
|
70
|
+
self.version = version
|
71
|
+
self.description = description
|
72
|
+
self.global_search_enabled = global_search_enabled
|
73
|
+
|
74
|
+
# lazy getters ...
|
75
|
+
self._record = record
|
76
|
+
self._draft = draft
|
77
|
+
self._service = service
|
78
|
+
self._service_config = service_config
|
79
|
+
|
80
|
+
@property
|
81
|
+
def service(self) -> S:
|
82
|
+
"""Get the service."""
|
83
|
+
if isinstance(self._service, str):
|
84
|
+
return cast(
|
85
|
+
"S",
|
86
|
+
current_service_registry.get(self._service), # type: ignore[attr-defined]
|
87
|
+
)
|
88
|
+
return self._service
|
89
|
+
|
90
|
+
@property
|
91
|
+
def service_config(self) -> C:
|
92
|
+
"""Get the service configuration."""
|
93
|
+
if self._service_config is not None:
|
94
|
+
return self._service_config
|
95
|
+
return cast("C", self.service.config)
|
96
|
+
|
97
|
+
@property
|
98
|
+
def record_cls(self) -> type[R]:
|
99
|
+
"""Get the record class."""
|
100
|
+
if self._record is None:
|
101
|
+
return cast("type[R]", self.service.config.record_cls)
|
102
|
+
return self._record
|
103
|
+
|
104
|
+
@property
|
105
|
+
def draft_cls(self) -> type[D] | None:
|
106
|
+
"""Get the draft class."""
|
107
|
+
if self._draft is None:
|
108
|
+
if hasattr(self.service.config, "draft_cls"):
|
109
|
+
return cast("type[D]", self.service.config.draft_cls)
|
110
|
+
return None
|
111
|
+
return self._draft
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2025 CESNET z.s.p.o.
|
3
|
+
#
|
4
|
+
# This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
|
5
|
+
#
|
6
|
+
# oarepo-runtime is free software; you can redistribute it and/or modify it
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
8
|
+
#
|
9
|
+
"""OAREPO Runtime CLI module."""
|
10
|
+
|
11
|
+
from __future__ import annotations
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2025 CESNET z.s.p.o.
|
3
|
+
#
|
4
|
+
# This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
|
5
|
+
#
|
6
|
+
# oarepo-runtime is free software; you can redistribute it and/or modify it
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
8
|
+
#
|
9
|
+
"""OARepo extensions to the index command."""
|
10
|
+
|
11
|
+
from __future__ import annotations
|
12
|
+
|
13
|
+
import click
|
14
|
+
from flask.cli import with_appcontext
|
15
|
+
from invenio_search.cli import index, search_version_check
|
16
|
+
from invenio_search.cli import init as original_init
|
17
|
+
|
18
|
+
from oarepo_runtime.services.records.mapping import update_all_records_mappings
|
19
|
+
|
20
|
+
|
21
|
+
@index.command()
|
22
|
+
@click.option("--force", is_flag=True, default=False)
|
23
|
+
@with_appcontext
|
24
|
+
@search_version_check
|
25
|
+
@click.pass_context
|
26
|
+
def init(ctx: click.Context, force: bool) -> None:
|
27
|
+
"""Initialize registered aliases and mappings.
|
28
|
+
|
29
|
+
This command initializes the search indices by creating templates, component templates,
|
30
|
+
index templates, and the actual indices. It will also create all dynamic mappings
|
31
|
+
defined inside the models.
|
32
|
+
"""
|
33
|
+
ctx.invoke(original_init, force=force)
|
34
|
+
update_all_records_mappings()
|
@@ -0,0 +1,92 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2025 CESNET z.s.p.o.
|
3
|
+
#
|
4
|
+
# This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
|
5
|
+
#
|
6
|
+
# oarepo-runtime is free software; you can redistribute it and/or modify it
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
8
|
+
#
|
9
|
+
|
10
|
+
"""Config module."""
|
11
|
+
|
12
|
+
from __future__ import annotations
|
13
|
+
|
14
|
+
from typing import TYPE_CHECKING, Any
|
15
|
+
|
16
|
+
from invenio_vocabularies import __version__ as vocabularies_version
|
17
|
+
|
18
|
+
from .api import Model
|
19
|
+
|
20
|
+
if TYPE_CHECKING:
|
21
|
+
from collections.abc import Callable
|
22
|
+
|
23
|
+
from flask import Flask
|
24
|
+
|
25
|
+
|
26
|
+
def build_config[T](config_class: type[T], app: Flask, *args: Any, **kwargs: Any) -> T:
|
27
|
+
"""Build the configuration for the service.
|
28
|
+
|
29
|
+
This function is used to build the configuration for the service.
|
30
|
+
"""
|
31
|
+
build_config: Callable[[Flask], T] | None = getattr(config_class, "build", None)
|
32
|
+
if build_config is not None and callable(build_config):
|
33
|
+
if args or kwargs:
|
34
|
+
raise ValueError("Can not pass extra arguments when invenio ConfigMixin is used")
|
35
|
+
return build_config(app)
|
36
|
+
return config_class(*args, **kwargs)
|
37
|
+
|
38
|
+
|
39
|
+
#
|
40
|
+
# Configuration for the extension.
|
41
|
+
#
|
42
|
+
|
43
|
+
OAREPO_MODELS: dict[str, Model] = {
|
44
|
+
# default invenio vocabularies
|
45
|
+
"vocabularies": Model(
|
46
|
+
name="vocabularies",
|
47
|
+
version=vocabularies_version,
|
48
|
+
service="vocabularies",
|
49
|
+
description="Base (non-specialized) invenio vocabularies",
|
50
|
+
global_search_enabled=False,
|
51
|
+
),
|
52
|
+
# affiliations
|
53
|
+
"affiliations": Model(
|
54
|
+
name="affiliations",
|
55
|
+
version=vocabularies_version,
|
56
|
+
service="affiliations",
|
57
|
+
description="Affiliations vocabulary",
|
58
|
+
global_search_enabled=False,
|
59
|
+
),
|
60
|
+
# funders
|
61
|
+
"funders": Model(
|
62
|
+
name="funders",
|
63
|
+
version=vocabularies_version,
|
64
|
+
service="funders",
|
65
|
+
description="Funders vocabulary",
|
66
|
+
global_search_enabled=False,
|
67
|
+
),
|
68
|
+
# awards
|
69
|
+
"awards": Model(
|
70
|
+
name="awards",
|
71
|
+
version=vocabularies_version,
|
72
|
+
service="awards",
|
73
|
+
description="Awards vocabulary",
|
74
|
+
global_search_enabled=False,
|
75
|
+
),
|
76
|
+
# names
|
77
|
+
"names": Model(
|
78
|
+
name="names",
|
79
|
+
version=vocabularies_version,
|
80
|
+
service="names",
|
81
|
+
description="Names vocabulary",
|
82
|
+
global_search_enabled=False,
|
83
|
+
),
|
84
|
+
# subjects
|
85
|
+
"subjects": Model(
|
86
|
+
name="subjects",
|
87
|
+
version=vocabularies_version,
|
88
|
+
service="subjects",
|
89
|
+
description="Subjects vocabulary",
|
90
|
+
global_search_enabled=False,
|
91
|
+
),
|
92
|
+
}
|