Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: Add schema in metadata extensions structure #907

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 43 additions & 40 deletions cds_ils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
)
from invenio_app_ils.config import CELERY_BEAT_SCHEDULE as ILS_CELERY_BEAT_SCHEDULE
from invenio_app_ils.config import RECORDS_REST_ENDPOINTS, RECORDS_REST_FACETS
from invenio_app_ils.documents.api import DOCUMENT_PID_TYPE
from invenio_app_ils.documents.api import DOCUMENT_PID_TYPE, Document
from invenio_app_ils.eitems.api import EITEM_PID_TYPE
from invenio_app_ils.ill.api import (
can_item_circulate,
Expand Down Expand Up @@ -462,45 +462,48 @@ def query_params_modifier(extra_params):
# Fields added to the metadata schema.
ILS_RECORDS_METADATA_EXTENSIONS = {
"document": {
"unit_accelerator": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(),
},
"unit_experiment": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"unit_institution": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"unit_project": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"unit_study": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"standard_review_applicability": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"standard_review_standard_validity": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(),
},
"standard_review_checkdate": {
"elasticsearch": "date",
"marshmallow": SanitizedUnicode(),
},
"standard_review_comment": {
"elasticsearch": "text",
"marshmallow": SanitizedUnicode(),
},
"standard_review_expert": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(),
"schema": Document._schema,
"fields": {
"unit_accelerator": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(),
},
"unit_experiment": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"unit_institution": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"unit_project": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"unit_study": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"standard_review_applicability": {
"elasticsearch": "keyword",
"marshmallow": List(SanitizedUnicode()),
},
"standard_review_standard_validity": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(),
},
"standard_review_checkdate": {
"elasticsearch": "date",
"marshmallow": SanitizedUnicode(),
},
"standard_review_comment": {
"elasticsearch": "text",
"marshmallow": SanitizedUnicode(),
},
"standard_review_expert": {
"elasticsearch": "keyword",
"marshmallow": SanitizedUnicode(),
},
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion requirements.pinned.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ invenio-access==2.0.0
invenio-accounts==3.5.2
invenio-admin==1.4.0
invenio-app==1.3.4
invenio-app-ils==3.0.0rc5
invenio-app-ils==4.0.0rc1
invenio-assets==3.0.2
invenio-banners==1.0.0a1
invenio-base==1.2.16
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ zip_safe = False
install_requires =
fuzzywuzzy>=0.18.0
python-ldap>=3.4.0,<3.5.0
invenio-app-ils[lorem,opensearch2,postgresql]==3.0.0rc5
invenio-app-ils[lorem,opensearch2,postgresql]==4.0.0rc1
sentry-sdk>=0.10.2
# migrator deps
cds-dojson==0.9.0
Expand Down
4 changes: 2 additions & 2 deletions ui/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REACT_APP_UI_ILS_VERSION=1.0.0-alpha.85
REACT_APP_INVENIO_VERSION=3.0.0rc2
REACT_APP_UI_ILS_VERSION=1.0.0-alpha.90
REACT_APP_INVENIO_VERSION=4.0.0rc1
REACT_APP_INVENIO_UI_URL=https://127.0.0.1:5000
REACT_APP_INVENIO_REST_ENDPOINTS_BASE_URL=https://127.0.0.1:5000/api
REACT_APP_OVERLAY_VERSION=2.9.0
Expand Down
86 changes: 43 additions & 43 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.9.0",
"dependencies": {
"@babel/runtime": "^7.9.2",
"@inveniosoftware/react-invenio-app-ils": "^1.0.0-alpha.89",
"@inveniosoftware/react-invenio-app-ils": "^1.0.0-alpha.90",
"@rjsf/core": "^2.5.0",
"@rjsf/semantic-ui": "^2.5.0",
"ajv": "^8.0.0",
Expand Down
Loading