-
Notifications
You must be signed in to change notification settings - Fork 47
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
global: allow operational options in reana.yaml #400
global: allow operational options in reana.yaml #400
Conversation
Needs rebase ⏭ |
698fe43
to
d4604b4
Compare
3a5d2a4
to
3c1bb65
Compare
@@ -38,7 +40,7 @@ def workflow_uuid_or_name(ctx, param, value): | |||
return value | |||
|
|||
|
|||
def yadage_load(workflow_file, toplevel='.'): | |||
def yadage_load(workflow_file, toplevel='.', **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is consuming these **kwargs
? We already unpack toplevel
which is the only one we are interested in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set other inputs.options
such as initdir
, its value will get here and this function would fail. With **kwargs
we can filter out these options that are not needed on validation time. I agree it's a bit hacky but it's cleanest and safest way I could come up with. If you have any other idea please let me know 🙂
|
||
except ValidationError as e: | ||
e.message = str(e) | ||
raise e | ||
|
||
|
||
def cwl_load(workflow_file): | ||
def cwl_load(workflow_file, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. For CWL workflows, when passing TARGET: foo
for example, it will end up here.
Allows setting workflow engine specific options e.g. `toplevel` for yadage workflows. closes reanahub#356
17ac56c
to
25125d9
Compare
c27c364
to
b7c546c
Compare
This logic is moved to r-w-e-yadage. reanahub/reana-workflow-engine-yadage#150
In favor of `check_output` which is compatible with Python 2.7
773a770
to
e2eb481
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well 👍
WRT second item (run CWL with target), it does not seem to work for our demo workflows in a pure cwltool
environment... So we need first to investigate that. Hence this is good to go 🚀
closes #356
reana.yaml
could be like:TODO:
reana.yaml
operational options on creation.-o TARGET ...
successfully.