add -e flag to enrich metadata via external APIs (OpenAlex, OpenAIRE,Zenodo). Fixes #1006#1009
Conversation
|
|
||
|
|
||
| def get_openaire_project(identifier): | ||
| """Busca un proyecto en OpenAIRE por grant ID o call identifier""" |
There was a problem hiding this comment.
Please add this in English
| return None | ||
| record_id = match.group(1) | ||
|
|
||
| url = f"https://zenodo.org/api/records/{record_id}" |
There was a problem hiding this comment.
This should be a constant. Don't we extract the swh ids already in the readmes? It would be nice to check if we already have this information
| - `project_acronym`: Project acronym | ||
| - `grant_id`: Call/grant identifier | ||
| - **Identifier**: Identifier associated with the software (if any), such as Digital Object Identifiers and Software Heritage identifiers (SWH). DOIs associated with publications will also be detected. When using `-e`, the following enrichment identifiers are also added: | ||
| - `openalex_id`: OpenAlex ID for the software |
There was a problem hiding this comment.
OpenAlex does not have ids for software, so far. It has ids for papers. I don't understand this
There was a problem hiding this comment.
I think you mean the OpenAlex id of the publication
| - `grant_id`: Call/grant identifier | ||
| - **Identifier**: Identifier associated with the software (if any), such as Digital Object Identifiers and Software Heritage identifiers (SWH). DOIs associated with publications will also be detected. When using `-e`, the following enrichment identifiers are also added: | ||
| - `openalex_id`: OpenAlex ID for the software | ||
| - `openaire_id`: URL to the OpenAIRE explore page |
There was a problem hiding this comment.
The explore page... of what?
| for citation in results.get(constants.CAT_CITATION, []): | ||
| doi = extract_doi(citation["result"]) | ||
| if doi: | ||
| citation["result"][constants.PROP_OPENALEX_ID] = get_openalex_id(doi) |
There was a problem hiding this comment.
Why are you enriching from both open aire and open alex at the same time?
I would first look for the project info in one (probably openaire, since it also has the info on the projects), and if not found, then I would look in open alex
|
There are comments to address here. Please have a look |
|
@juanjemdIos this PR still has conflicts. Can you please address them? |
dgarijo
left a comment
There was a problem hiding this comment.
There are pending comment
| - `project_acronym`: Project acronym | ||
| - `grant_id`: Call/grant identifier | ||
| - **Identifier**: Identifier associated with the software (if any), such as Digital Object Identifiers and Software Heritage identifiers (SWH). DOIs associated with publications will also be detected. When using `-e`, the following enrichment identifiers are also added: | ||
| - `openalex_id`: OpenAlex ID of the publication |
There was a problem hiding this comment.
This is not the identifier of the software. It is not correct. It's the identifier of the publication, it should not go here
No description provided.