Skip to content
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

Add more logic to minimeta translator's get_funding #2

Open
mslw opened this issue Apr 12, 2023 · 0 comments
Open

Add more logic to minimeta translator's get_funding #2

mslw opened this issue Apr 12, 2023 · 0 comments

Comments

@mslw
Copy link
Owner

mslw commented Apr 12, 2023

Studyminimeta spec defines funding for study/dataset as text (source: INM7/Datasets/datasets_repo wiki on Jugit):

Funding (optional): text or list of texts, name(s) of entities that funded the study, e.g "DFG"
Funding (optional): text or list of texts, name(s) of entities that funded the creation of the dataset, e.g "NIH"

Catalog Metadata defines funding as an object with Name, Identifier, and Description fileds.

This is the current translator's get_funding implementation:

    def get_funding(self):
        program = (
            ".[] | select(.[\"@type\"] == \"Dataset\") | [.funder[]? | "
            "{\"name\": .name, \"identifier\": \"\", \"description\": \"\"}]"
        )
        result = jq.first(program, self.graph) #  [] if nothing found
        return result if len(result) > 0 else None

The translator could try to make up the division, e.g. try to match a pattern with semicolons (name; identifier; description) or pipe symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant