inveniosoftware / invenio-vocabularies

Invenio module for managing vocabularies.
https://invenio-vocabularies.readthedocs.io
MIT License
2 stars 42 forks source link

contrib-awards: missing `program` field #251

Closed slint closed 1 year ago

slint commented 1 year ago

On current Zenodo we're also including a program field in the award schema. This field is kind of a 2nd level of hierarchy for a funder (e.g. the EC funder issues grants under the programs FP7, H2020, HE, etc.).

Additionally, we're also serializing an eurepo-type identifier using the program field, meant to be used by OpenAIRE to connect records to grants (see OpenAIRE guidelines and specifics for the identifier). Not sure if this should be included in the identifiers, or just be generated on demand when needed.

The logic to parse the program field and generate the eurepo identifier is:

funding_stream_id = grant_json['funding'][0].get('funding_stream', {}).get('id', '')
funder_program = next(iter(funding_stream_id.split("::")[1:2]), '')  # goes into the `program` field

# this needs to be generated during e.g. DataCite serialization
eurepo_id = 'info:eu-repo/grantAgreement/{}/{}/{}/'.format(
    grant_json['funding'][0]['shortName'],
    funder_program,
    grant_json['code'],
)
ppanero commented 1 year ago

required for Zenodo migration:

Missing program field in the awards datamodel, has to be added (but is backwards compatible so only minor release and and upgrade recipe needed to update the mapping and reimport the awards dump)

slint commented 1 year ago

Implented in https://github.com/inveniosoftware/invenio-vocabularies/pull/265