crs4 / rocrate-validator

A Python package to validate RO-Crates
Apache License 2.0
7 stars 7 forks source link

Should validation fail for a mismatch in versions? #47

Open dnlbauer opened 2 days ago

dnlbauer commented 2 days ago

The workflow run crate profile specifically states that is validates against the version 0.5 of the workflow run crate specification.

Right now, the validation still succeeds if a smaller version of the specification is used, i.e. https://w3id.org/ro/wfrun/workflow/0.1. Is this an intentional choice or should it be considered a bug?

Example

(...)
    {
      "@id": "./",
      "@type": "Dataset",
      "author": {
        "@id": "https://orcid.org/0000-0001-9447-460X"
      },
      "conformsTo": [
        {
          "@id": "https://w3id.org/ro/wfrun/process/0.1"
        },
        {
          "@id": "https://w3id.org/ro/wfrun/workflow/0.1"
        },
        {
          "@id": "https://w3id.org/workflowhub/workflow-ro-crate/1.0"
        }
      ]
(...)
  },
  {
      "@id": "https://w3id.org/ro/wfrun/workflow/0.1",
      "@type": "CreativeWork",
      "version": "0.1"
    }
(...)
dnlbauer commented 2 days ago

I think this is more of a general question and does not only relate to the workflow run crate profile.

I wonder if validation profiles should check for their specific version or state a range of versions they are compatible with and then validate if the crate conforms to this range of versions.