o2r-project / o2r-meta

Metadata toolsuite for an extract-map-validate workflow supporting reproducible research
Apache License 2.0
2 stars 3 forks source link

Extracted metadata invalid because version is missing in dependencies #91

Closed nuest closed 6 years ago

nuest commented 6 years ago

The o2r metadata schema requires dependencies listed under depends to have a version of type String. When extracting metadata from https://github.com/o2r-project/o2r-muncher/tree/master/test/erc/metatainer-doi and brokering it to o2r, the result does not have the versions. AFAICS it cannot have them. I see two possibilities:

Erroneous metadata

{
    "upload_type": "publication",
    "title": "This is the title: it contains a colon",
    "temporal": {
        "end": null,
        "begin": null
    },
    "spatial": {
        "union": {
            "bbox": [
                [
                    181,
                    181
                ],
                [
                    -181,
                    181
                ],
                [
                    -181,
                    -181
                ],
                [
                    181,
                    -181
                ]
            ]
        },
        "files": []
    },
    "publication_type": "other",
    "publication_date": "2018-03-02",
    "paperLanguage": [],
    "mainfile_candidates": [
        "data/document.Rmd"
    ],
    "mainfile": "data/document.Rmd",
    "license": {
        "uibindings": null,
        "text": null,
        "md": null,
        "data": null,
        "code": null
    },
    "keywords": [
        "lorem",
        "ipsum",
        "dolor",
        "sit",
        "amet"
    ],
    "interaction": [],
    "inputfiles": [],
    "identifier": {
        "reserveddoi": null,
        "doiurl": "https://doi.org/10.5555/12345678",
        "doi": "10.5555/12345678"
    },
    "ercIdentifier": "Yl6eh",
    "displayfile_candidates": [
        "data/document.html"
    ],
    "displayfile": "data/document.html",
    "description": "Tempus eget nunc eu, lobortis condimentum nulla. Nam sagittis massa nec libero luctus facilisis. Suspendisse ac ornare ligula. Morbi non dignissim sem. Pellentesque eleifend neque nec dui interdum varius.\n",
    "depends": [
        {
            "version": null,
            "packageSystem": "https://cloud.r-project.org/",
            "identifier": "RColorBrewer",
            "category": "geo sciences,CRAN Top100"
        },
        {
            "version": null,
            "packageSystem": "https://cloud.r-project.org/",
            "identifier": "dplyr",
            "category": "geo sciences,CRAN Top100"
        },
        {
            "version": null,
            "packageSystem": "https://cloud.r-project.org/",
            "identifier": "ggplot2",
            "category": "geo sciences,CRAN Top100"
        },
        {
            "version": null,
            "packageSystem": "https://cloud.r-project.org/",
            "identifier": "minqa",
            "category": "CRAN Top100"
        },
        {
            "version": null,
            "packageSystem": "https://cloud.r-project.org/",
            "identifier": "PBSmapping",
            "category": "geo sciences"
        }
    ],
    "creators": [
        {
            "orcid": "0000-0002-0166-519X",
            "name": "Ted Tester",
            "affiliation": "University of Munster"
        },
        {
            "orcid": "0000-0003-1021-5374",
            "name": "Carl Connauthora",
            "affiliation": "N.O.N.E"
        }
    ],
    "communities": [
        {
            "identifier": "o2r"
        }
    ],
    "codefiles": [
        "data/document.Rmd"
    ],
    "access_right": "open"
}
ghost commented 6 years ago

not brokering invalid dependencies from raw to o2r would require the broker to know about invalidities. should it call the validator? I think the second possibility you suggest is much easier for now.

nuest commented 6 years ago

I agree! Mixing validation and brokering seems like opening a can of worms.