sib-swiss / glittr

A web application for finding and comparing bioinformatics training materials on GitHub and GitLab
https://glittr.org
MIT License
35 stars 1 forks source link

API endpoint in bioschemas markup #17

Closed GeertvanGeest closed 8 months ago

GeertvanGeest commented 11 months ago

To add glittr material to TeSS it needs to be bioschemas markup using the TraingMaterial profile. The required properties should be mapped, but this should be relatively straightforward. This API endpoint could be in e.g. glittr.org/api/bioschemas .

GeertvanGeest commented 11 months ago

To say it in the words of Finn Bacall: Have a single API endpoint that returns an array of JSON-LD that contains all your bioschemas resources. We would be using the TrainingMaterial profile: https://bioschemas.org/profiles/TrainingMaterial/1.0-RELEASE It would be up to @GeertvanGeest to map the current field we have in glittr to bioschemas properties.

GeertvanGeest commented 8 months ago

I checked https://training-collection-dev.vital-it.ch/api/bioschemas and most looks good.

I validated the json with https://validator.schema.org/ and found one error with each entry:

Screenshot 2024-01-31 at 09 00 36

This should be url instead of website.

@ppalagi here's an example of an entry, can you double check for any further issues?:

[
    {
        "@context": "https:\/\/schema.org",
        "@type": "LearningResource",
        "@id": "https:\/\/github.com\/jakevdp\/PythonDataScienceHandbook",
        "http:\/\/purl.org\/dc\/terms\/conformsTo": {
            "@id": "https:\/\/bioschemas.org\/profiles\/TrainingMaterial\/1.0-RELEASE",
            "@type": "CreativeWork"
        },
        "description": "Python Data Science Handbook: full text in Jupyter Notebooks",
        "keywords": "Python",
        "name": "jakevdp\/PythonDataScienceHandbook",
        "author": [
            {
                "@type": "Person",
                "name": "Jake Vanderplas"
            },
            {
                "@type": "Organization",
                "name": "Google"
            }
        ],
        "contributor": [
            {
                "@type": "Person",
                "name": "Jake Vanderplas"
            },
            {
                "@type": "Organization",
                "name": "Google"
            }
        ],
        "website": "http:\/\/jakevdp.github.io\/PythonDataScienceHandbook",
        "dateCreated": "2016-08-10T14:24:36+02:00",
        "dateModified": "2024-01-30T22:50:12+01:00",
        "license": [
            "http:\/\/choosealicense.com\/licenses\/mit\/"
        ]
    }
]

It would be good to add topics/tags to the about property, and include their provenance, e.g. like this:

    "about": [
        {
            "@type": "DefinedTerm",
            "@id": "http://edamontology.org/topic_3168",
            "inDefinedTermSet": "http://edamontology.org",
            "termCode": "topic_3168",
            "name": "Sequencing"
        },
        {
            "@type": "DefinedTerm",
            "@id": "http://edamontology.org/topic_3227",
            "inDefinedTermSet": "http://edamontology.org",
            "termCode": "topic_3227",
            "name": "Variant calling"
        }
    ]
yhaefligsib commented 8 months ago

Tested live and schema validation returned 0 errors / warnings :+1:

https://validator.schema.org/#url=https%3A%2F%2Fglittr.org%2Fapi%2Fbioschemas