Skip to content

Conversation

@EttoreM
Copy link

@EttoreM EttoreM commented Dec 8, 2025

This PR addresses #48.

Rules implemented (so far)

# Rule sh:severity
1 There SHOULD be a DownloadAction entity representing the action of downloading the referenced workflow. sh:Warning
2 RootDataEntity --> mentions SHOULD reference the DownloadAction entity, if this exists. sh:Warning
3 DownloadAction --> name MUST be a human-readable summary of the download action. sh:Violation
4 DownloadAction MAY have startTime property if action begun sh:Info
5 DownloadAction --> startTime MUST follow the RFC 3339 standard sh:Violation
6 DownloadAction SHOULD have endTime property if action ended sh:Warning
7 DownloadAction --> endTime MUST follow the RFC 3339 standard sh:Violation
8 DownloadAction SHOULD have actionStatus property sh:Warning
9 DownloadAction --> actionStatus MUST one of the allowed values sh:Violation
10 The RO-Crate of the downloaded Workflow MAY be represented by an entity of type Dataset (i) (ii) sh:Info
11 The RO-Crate of the downloaded Workflow SHOULD be referenced by DownloadAction --> result (i) (ii) sh:Warning
12 The property sameAs of the entity representing the downloaded workflow MUST point to the same entity as RootDataEntity --> mainEntity (ii) sh:Violation
13 DownloadedWorkflow --> distribution MUST reference the same entity as DownloadAction --> object (ii) sh:Violation

(i) The validator will fire up this rule as not met with a MAY whether the user has downloaded the workflow RO-Crate or nor, or whether the Workflow RO-Crate was downloaded in the current RO-Crate or outside of it.


Rules not yet implemented

The following rule was not implemented as a SHACL shape, as it is not clear how this would be done. Also, the rules that are logically subsequent to this one have been implemented assuming the Workflow RO-Crate has indeed been downloaded (this may need to be reconsidered @elichad , @douglowe , @alexhambley)

# Rule sh:severity
1 The Workflow RO-Crate MAY be downloaded and unpacked into this crate. sh:Warning

@EttoreM EttoreM linked an issue Dec 8, 2025 that may be closed by this pull request
@EttoreM EttoreM self-assigned this Dec 8, 2025
@douglowe
Copy link

douglowe commented Dec 8, 2025

I've updated the Workflow Retrieval phase in the spreadsheet.

We need to look at the downloaded Workflow RO-Crate, as well as the workflow retrieval object.

        {
            "@id": "workflow/289/",
            "sameAs": {
                "@id": "https://workflowhub.eu/workflows/289?version=1"
            },
            "@type": "Dataset",
            "name": "CWL Protein MD Setup tutorial with mutations",
            "conformsTo": {
                "@id": "https://w3id.org/workflowhub/workflow-ro-crate/1.0"
            },
            "distribution": {
                "@id": "https://workflowhub.eu/workflows/289/ro_crate?version=1"
            }
        },

The existence of this object is only a MAY - but we have a few SHOULD requirements to fulfil if it does exist. I can't see anything within this object which marks it specifically as the downloaded workflow ro-crate - so I think we will have to infer this from the 'sameAs' field.

Copy link

@douglowe douglowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review, sorry. I'll try to complete it later today.

sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:minLength 10 ;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should specific a minimum length for these strings.

Copy link
Author

@EttoreM EttoreM Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requirement is that the name MUST be a descriptive, human-readable summary of the download action. I totally agree that 10 characters (or any other number) for minimum length is arbitrary. On the other end this is a baseline rule encouraging users to insert meaningful names rather than, say "XY".
I think we should reach an agreement on this point (@elichad, @douglowe , @alexhambley @stain). Just as a reminder, a minimal length of 10 was already enforced for at least another phase that has been merge into dev.

@EttoreM EttoreM requested a review from douglowe December 18, 2025 11:12
Copy link

@douglowe douglowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this now - other than the minimum length of a string ;-) but we can cover that in the meeting now

@douglowe
Copy link

I can rebase this though - so we don't have the merge conflicts

@douglowe douglowe force-pushed the 48-implement-workflow-retrieval-phase-ruleset branch 2 times, most recently from cb6e783 to b836a4b Compare December 22, 2025 16:30
@douglowe douglowe force-pushed the 48-implement-workflow-retrieval-phase-ruleset branch from b836a4b to 69584f0 Compare December 22, 2025 16:32
…i) Existence of entity representing the downloaded workflow is now a MAY (before it was a SHOULD).
(
"The entity represented the downloaded workflow is not properly defined in the "
"RO-Crate and/or it is not referenced by `DownloadAction` --> `result`."
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is causing the errors for the CI/CD tests - which are complaining about not getting a string literal.

I would replace this code with:

expected_triggered_issues=[
     "The entity represented the downloaded workflow is not properly defined in the "
     + "RO-Crate and/or it is not referenced by `DownloadAction` --> `result`."
]

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

Successfully merging this pull request may close these issues.

Implement Workflow Retrieval Phase Ruleset

3 participants