-
Notifications
You must be signed in to change notification settings - Fork 42
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
awards/schema.py: read app config for alternate funding validation #429
awards/schema.py: read app config for alternate funding validation #429
Conversation
* Adds a new global conf variable that when set allows an alternative validation of a funding entry that is also permitted by datacite
except KeyError: | ||
ALTERNATE_FUNDING_SCHEMA = None | ||
if ALTERNATE_FUNDING_SCHEMA: | ||
if not id_ and not (number or title): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not required by DataCite, we might want to relax the constraint without adding extra conditions.
I also agree that a config for this specific part might not be the best solution. Let's discuss it quickly IRL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking if you set ALTERNATE_FUNDING_SCHEMA
to True
it would check for number or title. Else it would check as is for number and title.
Also I thought that making it configurable (I am with you that this is not the most elegant way) it wouldn't break stuff for everyone else while enabling us to change it ;)
Relaxing the constraint would be amazing. We’ve had to do some not great workarounds.
|
@karkraeg we quickly checked this internally, and we agree that we can simply align with the DataCite optional/requirements fields without adding a config variable Can you share a screenshot of how the record landing page will look like when the title and/or the other optional info are not provided?
|
Here is how funding looks without a title It's alright but it particularly looks weird when you have a funder by itself (National Science Foundation is in bold, unlike others) On our instance we've shifted the order and emphasis so that the funder comes first and is bolded, since there will always be a funder. |
@ntarocco I would say an award DOI should go in the URL field, and not the grant number field. Grant numbers have a really specific meaning, and grant DOIs are fairly different. It seems a bit weird to mix them in the same field. |
Hi @ntarocco, I'd go with @tmorrell here and say that any DOI or other PID should go into the URL field. You could still paste a DOI to the number field, it works.
|
I will open another PR to adapt https://github.com/inveniosoftware/invenio-app-rdm/blob/35165ab5a0509dd7b7e83bad0af8e7c28b240297/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html#L98-L130 (eventhough the code looks like it should work the way it is...)
|
@ntarocco would you be okay with inveniosoftware/invenio-app-rdm@master...ulbmuenster:invenio-app-rdm:recordlandingpage_funding-display ? Looks like that on the record landing page: |
I agree with @tmorrell 's variant that flips the order (since European Commission
National Science Foundation
"MyCustomFunder" |
That's a good, idea, @slint . But I think this is perhaps too much for this PR?! If there is some voting, I'm clearly 👍 for the grouping! |
How exactly does this relate to this PR? Shouldn't we tackle this in another issue since this one is primarily about relaxing the validation? Is there something missing still? I'd be happy to open a PR in app-rdm for the adaption of the display on the record detail page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@ntarocco I think those best practices suggest using a separate field for the DOI, and URL seems the be the best fit unless we want to add a new field. But I also agree it's a separate issue and we should probably move that to a new issue. |
Hi, is something still missing here that I could help with? |
It was related to my comment above that was not clear. I agree it is for another PR. |
📁 invenio-app-rdm (13.0.0b1.dev18 -> 13.0.0b1.dev20 🌈) 📦 release: v13.0.0b1.dev20 config: add subcommunity invitation request notifications requests: add subcommunity invitation request details page creatibutors: added config for identifiers scheme release: v13.0.0b1.dev19 communities_ui: views: Add RecordPermissionDeniedError Handler semantic-ui: users: header: Pass entrypoint namespace in url_for fix: ui: escape journal title once package: remove unused AUTHORS.rst (inveniosoftware/invenio-app-rdm#2735) records-ui: fix removing community branding * Closes inveniosoftware/invenio-app-rdm#2869. * Passes "null" instead of empty string ("") as the "default" field value when removing community branding from a record. semantic-ui: users: header: Use endpoints from config upgrades: remove record JSONSchema version bump config: removed unecessary INDEXER_DEFAULT_INDEX 📁 invenio-celery (1.3.1 -> 1.3.2 🐛) release: v1.3.2 setup: upper pin packages * step to go forwards with flask >= 3.0 * to have clear boundaries on the invenio packages docs: Typo in the example 📁 invenio-communities (17.4.0 -> 17.5.0 🌈) 📦 release: v17.5.0 service: add data to inivitation req delete unused file and add expiry to email service: add create_subcommunity_invitation_request refactor and fix bugs in sending emails subcommunities: add invitation actions subcommunities: add invitation notifications request: add subcommunity invitation request config: add LogoNotFoundError previously it was a generic error communities: config: Update static page URLs to prevent name collisions 📁 invenio-files-rest (2.2.2 -> 2.2.3 🐛) release: v2.2.3 setup: change to reusable workflows setup: pin dependencies 📁 invenio-i18n (2.1.2 -> 2.2.0 🌈) release: v2.2.0 setup: upper pin packages fix: my-site not overriding packages * the way how babel picks the translations the my-site has to be the last option because it overrides the entries before ext: add bundle entrypoint github: update reusable workflows 📁 invenio-logging (2.1.1 -> 2.1.2 🐛) release: v2.1.2 setup: change to reusable workflows setup: pin dependencies 📁 invenio-rdm-records (16.2.0 -> 16.3.0 🌈) 📦 release: v16.3.0 github: added default license from Github API deposit-ui: fix affiliations rendering during edits release: added custom_fields datacite: improve error logging formatting and grouping * Avoids f-strings in logging calls so that entries are easier to be grouped. * Adds exception info to the logged errors. config: added service schema from config * Added the swhid field to the bibtex schema requests: manage sending notifications 📁 invenio-records-resources (6.4.0 -> 6.5.0 🌈) 📦 release: v6.5.0 queryparser: add CompositeSuggestQueryParser * Introduces a new query parser focused on better accuracy for mappings that contain search-as-you-type or ngram-analyzed fields but also secondary information fields that helps to disambiquate/narrow-down results. 📁 invenio-requests (5.3.0 -> 5.4.0 🌈) 📦 release: v5.4.0 refactor: clean up duplicated imports UI: add seperator on list of requests ui: add subcommunity invitation facet and label ux: set tab title to request title requests: add missing facets and reorder 📁 invenio-vocabularies (6.6.0 -> 6.7.0 🌈) 📦 release: v6.7.0 contrib: improve search accuracy for names, funders, affiliations names: add affiliation acronym in mappings and schema * Dereferences the affiliation `acronym` when indexing names and serving REST API results. This is useful for disambiguating authors in search. affiliations: move RDF and SPARQL as extra dependencies * Moves `rdflib` and `SPARQLWrapper` to extras. affiliation: refactored edmo datastreams subjects: refactoring, updated schema and test subjects: added datastream for gemet vocab awards/schema.py: read app config for alternate funding validation (inveniosoftware/invenio-vocabularies#429) awards: fix description field and mappings awards: add fields start/end date and description
❤️ Thank you for your contribution!
Description
Hi, in order to enable institutions to use a less strict validation for funding entries that still adheres to Datacite this PR adds a global conf variable that when set allows an alternative validation of a funding entry.
Right now Invenio wants if either an award number or title is entered the other:
This is not required by DataCite: https://datacite-metadata-schema.readthedocs.io/en/4.5/properties/fundingreference/
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: