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

Should validation fail for a mismatch in versions? #47

Open
dnlbauer opened this issue Nov 28, 2024 · 2 comments
Open

Should validation fail for a mismatch in versions? #47

dnlbauer opened this issue Nov 28, 2024 · 2 comments

Comments

@dnlbauer
Copy link
Contributor

dnlbauer commented Nov 28, 2024

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 dnlbauer changed the title Should WRROC validation fail for versions < 0.5 Should WRROC validation fail for versions < 0.5? Nov 28, 2024
@dnlbauer dnlbauer changed the title Should WRROC validation fail for versions < 0.5? Should validation fail for a mismatch in versions? Nov 28, 2024
@dnlbauer
Copy link
Contributor Author

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.

@kikkomep
Copy link
Member

kikkomep commented Dec 2, 2024

I believe it is reasonable for validation profiles to check their specific version while also supporting the validation of minor updated versions. Specifically, a profile with version $V_m$ should validate an RO-Crate with profile version $V_{\text{rocrate}}$ provided that $V_m \leq V_{\text{rocrate}} &lt; V_n$ and $V_m &lt; V_n$.

At the current stage of the validator’s development, we have only one version per profile. To enable validation, the most recent version of the profile is used even if it is more recent than the requested version. When multiple versions become available, the validator should automatically select version $V_m$ according to the relationship specified above. However, users can always choose a specific version of the profile to validate against.

In your specific example, the validation still succeeds because the current constraint on the conformsTo property is not strict and accepts any value starting with the prefix https://w3id.org/ro/wfrun/workflow/. Future versions of the profile may specify a stricter constraint.

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

2 participants