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

custom fields: add CERN fields and custom ID schemes #218

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

kpsherva
Copy link
Contributor

  • IDs: register custom schemes

* IDs: register custom schemes
@@ -63,7 +63,7 @@ services:
environment:
# settings only for development. DO NOT use in production!
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is needed only for full migration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it hurt to increase the memory? I like to test the full migration from time to time

#THEME_FRONTPAGE_TEMPLATE = 'cds_rdm/frontpage.html'
#THEME_FOOTER_TEMPLATE = 'cds_rdm/footer.html'
#THEME_HEADER_TEMPLATE = 'cds_rdm/header.html'
# THEME_FRONTPAGE_TEMPLATE = 'cds_rdm/frontpage.html'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, it was formatting which highlighted it as chane

@@ -214,7 +215,8 @@ from cds_rdm.oidc import (
)
from urllib.parse import quote

CERN_KEYCLOAK_BASE_URL = os.environ.get("INVENIO_CERN_KEYCLOAK_BASE_URL", "https://keycloak-qa.cern.ch/")
CERN_KEYCLOAK_BASE_URL = os.environ.get("INVENIO_CERN_KEYCLOAK_BASE_URL",
"https://keycloak-qa.cern.ch/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that weird indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting was applied

"""Define validator for `custom_scheme`."""
return {
"validator": is_aleph,
"normalizer": lambda value: value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't have to pass this if it is the same as the default here

"validator": is_aleph,
"normalizer": lambda value: value,
"filter": ["aleph"],
"url_generator": None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"""Define validator for `custom_scheme`."""
return {
"validator": is_inspire,
"normalizer": lambda value: value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"validator": is_inspire,
"normalizer": lambda value: value,
"filter": ["inspire"],
"url_generator": None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,57 @@
import re
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing copyright and module docstring.

field="cern:experiments",
ui_widget="AutocompleteDropdown",
display_url="https://greybook.cern.ch/experiment/list",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this displayed?
minor: worth making it a config in case we need to change this?

@zzacharo zzacharo merged commit fff5285 into CERNDocumentServer:master Oct 22, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants