idutils icon indicating copy to clipboard operation
idutils copied to clipboard

idutils: Restructure module to be configurable and readable

Open sakshamarora1 opened this issue 1 year ago • 2 comments

Closes: https://github.com/inveniosoftware/idutils/issues/103

sakshamarora1 avatar Sep 30 '24 14:09 sakshamarora1

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"},
}

sakshamarora1 avatar Oct 02 '24 15:10 sakshamarora1

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

sakshamarora1 avatar Oct 02 '24 15:10 sakshamarora1

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?

zzacharo avatar Oct 15 '24 09:10 zzacharo

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

tmorrell avatar Oct 15 '24 15:10 tmorrell