idutils
idutils copied to clipboard
idutils: Restructure module to be configurable and readable
Closes: https://github.com/inveniosoftware/idutils/issues/103
The config on the overlay would look like this:
IDUTILS_CUSTOM_PID_SCHEMES = [
("test", lambda x: True),
]
from invenio_rdm_records.config import RDM_RECORDS_IDENTIFIERS_SCHEMES, RDM_RECORDS_PERSONORG_SCHEMES
RDM_RECORDS_IDENTIFIERS_SCHEMES = {
**RDM_RECORDS_IDENTIFIERS_SCHEMES,
"test": {"label": _("Test"), "validator": lambda x: True, "datacite": "Test"},
}
RDM_RECORDS_PERSONORG_SCHEMES = {
**RDM_RECORDS_PERSONORG_SCHEMES,
"test": {"label": _("Test"), "validator": lambda x: True, "datacite": "Test"},
}
Affected modules that would need a minor release: (bottom to top)
cds-rdm
invenio-app-rdm
invenio-rdm-records
invenio-banners
invenio-communities
invenio-administration
invenio-drafts-resources
invenio-github
invenio-jobs
invenio-pages
invenio-requests
invenio-users-resources
invenio-vocabularies
invenio-records-resources
commonmeta-py
datacite
marshmallow-utils
https://github.com/inveniosoftware/idutils/pull/104#discussion_r1800657890
That's good but maybe better to attack this when we work on the new major release?
I'm supportive of making the module extensible....but the current implementation breaks usage of idutils outside of flask https://github.com/inveniosoftware/idutils/issues/105