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

Supporting cwl:hints in addition to cwl:requirements for input objects #918

Open
tom-tan opened this issue Nov 25, 2020 · 9 comments
Open
Milestone

Comments

@tom-tan
Copy link
Member

tom-tan commented Nov 25, 2020

This feature will be helpful to implement a full-featured platform with another platform that only supports CommandLineTool.

Here is a use case:

The spec allows us to implement platforms that only support the CommandLineTool.

A workflow platform may choose to only implement the Command Line Tool Description part of the CWL specification.

One idea to implement a full-featured platform is to implement only the control of the steps and to delegate the executions of the CommandLineTool to other platforms that support CommandLineTool.

Thanks to the cwl:requirements, we can easily impelement an inheritance of requirements; just generating an input object with cwl:requirements and pass it to the other platform to execute CommandLineTool.

However, there are no official ways to override hints. It would be nice to support cwl:hints in addition to cwl:requirements.

@mr-c
Copy link
Member

mr-c commented Nov 25, 2020

Dear @tom-tan , thanks for sharing this issue!

I would accept a PR against the branch https://github.com/common-workflow-language/cwl-v1.2/tree/1.2.1_proposed that implemented this ; unless @tetron or others think that this would be too much to add in a bugfix release. If they disagree, then it would have to wait for CWL v1.3 or v2.0 (which ever comes first).

You could implement this as a namespaced extension on your own, tom_tan:hints or similar.

Or you could get a similar result by using cwl:requirements only if the class was not already listed there or listed in the CommandLineTools requirements section. But this would have a different meaning than hints, unless you were doing this in a context where you controlled all the pieces and you knew that the particular hint would be applied and thus adding it as a requirement would not cause a problem.

@tom-tan
Copy link
Member Author

tom-tan commented Nov 25, 2020

Thank you for the suggestion, @mr-c!

I will send a request for it and will introduce my own namespace to override hints for my workflow engine until it is merged.

@tetron
Copy link
Member

tetron commented Nov 25, 2020

This would be a new feature so it cannot go into a point release. However there are a couple of workarounds:

  1. Create a wrapper Workflow at runtime which has the desired hints section.
  2. Scan the hints section of the CommandLineTool and determine which hints would actually be inherited, and then provide those as requirements in the input object.

@tom-tan
Copy link
Member Author

tom-tan commented Nov 25, 2020

Thank you for the information and suggestion, @tetron!

So how to do with this issue?
Keep it open until v1.3 or close it?

@mr-c
Copy link
Member

mr-c commented Nov 25, 2020

I'm going to move this to the main CWL repo and mark it cwlnext

@mr-c mr-c transferred this issue from common-workflow-language/cwl-v1.2 Nov 25, 2020
@mr-c mr-c added this to the cwlnext milestone Nov 25, 2020
@tom-tan
Copy link
Member Author

tom-tan commented May 16, 2022

This feature will be helpful to implement a full-featured platform with another platform that only supports CommandLineTool.

Sorry, I found that cwl:requirements and cwl:hints (proposed in this issue) do not help to implement platforms that only supports CommandLineTool because they have different priority from the inherited requirements and hints.

The spec of v1.2 says about cwl:requirements as follows:

If implementations allow this, then such requirements should be combined with any requirements present in the corresponding Process as if they were specified there.

On the other hand, it also says:

If the same process requirement appears at different levels of the workflow, the most specific instance of the requirement is used, ...

That is, cwl:requirements takes precedence over the requirements inherited from the enclosing workflow.

Therefore, what we want for implementing platforms for CommandLineTool is cwl:inherited-requirements rather than cwl:requirements.

@tom-tan
Copy link
Member Author

tom-tan commented May 16, 2022

IMO discussing cwl:inherited-requirements has different scope from what I first proposed in this issue.
Can we rename the title of this issue, or close it and open a new issue for cwl:inherited-requirements?

@mr-c
Copy link
Member

mr-c commented Sep 12, 2022

I'd like to hear more about how adding cwl:inherited-requirements to a CommandLineTool input object differs from using cwl:requirements + cwl:hints in the CommandLineTool input object

@mr-c
Copy link
Member

mr-c commented Sep 12, 2022

Ah, the priority!

Okay, I understand. Then there should be both cwl:inherited-requirements and cwl:inherited-hints available for the input objects for CommandLineTool and ExpressionTool only engines

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

3 participants