Skip to content

Commit

Permalink
components
Browse files Browse the repository at this point in the history
  • Loading branch information
Alzbeta Pokorna committed Jan 17, 2025
1 parent d13b601 commit d22020a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
16 changes: 11 additions & 5 deletions oarepo_model_builder_rdm/datatypes/components/published_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ class RDMPublishedServiceComponent(DataTypeComponent):
depends_on = [PublishedServiceComponent]

def before_model_prepare(self, datatype, *, context, **kwargs):
pass
# datatype.definition["published-service"]["base-classes"] = ["invenio_rdm_records.services.services.RDMRecordService"]
# datatype.definition["published-service-config"]["base-classes"] = [
# "oarepo_runtime.services.config.service.PermissionsPresetsConfigMixin",
# "invenio_rdm_records.services.config.RDMRecordServiceConfig"]
# temporary solution before the new model builder
components_to_remove = [
'{{oarepo_runtime.services.files.FilesComponent}}',
'{{invenio_drafts_resources.services.records.components.DraftFilesComponent}}'
]
datatype.service_config["components"] = [
component for component in datatype.service_config["components"]
if component not in components_to_remove
]


8 changes: 5 additions & 3 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
set -e

OAREPO_VERSION=${OAREPO_VERSION:-12}
PYTHON=${PYTHON:-python3.12}
PYTHON=${PYTHON:-python3}
export PIP_EXTRA_INDEX_URL=https://gitlab.cesnet.cz/api/v4/projects/1408/packages/pypi/simple
export UV_EXTRA_INDEX_URL=https://gitlab.cesnet.cz/api/v4/projects/1408/packages/pypi/simple

BUILDER_VENV=".venv-builder"
export INVENIO_INVENIO_RDM_ENABLED=true
Expand Down Expand Up @@ -31,8 +33,8 @@ $PYTHON -m venv $VENV
. $VENV/bin/activate
pip install -U setuptools pip wheel nrp-devtools
$VENV/bin/nrp-devtools proxy 120 &
pip install "oarepo[tests, rdm]==${OAREPO_VERSION}.*" --index-url "http://127.0.0.1:4549/simple" --extra-index-url https://pypi.org/simple
pip install "oarepo[tests, rdm]==${OAREPO_VERSION}.*"

pip install "./build-tests/${MODEL}[tests]" --index-url "http://127.0.0.1:4549/simple" --extra-index-url https://pypi.org/simple
pip install -e "./build-tests/${MODEL}[tests]"
pytest build-tests/$MODEL/tests

0 comments on commit d22020a

Please sign in to comment.