-
Notifications
You must be signed in to change notification settings - Fork 31
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
Operational options: add initfiles #155
Conversation
reana_workflow_engine_yadage/cli.py
Outdated
@@ -53,6 +54,11 @@ def load_yadage_operational_options(ctx, param, operational_options): | |||
operational_options["initdir"] = os.path.join( | |||
workflow_workspace, operational_options.get("initdir", "") | |||
) | |||
|
|||
operational_options["initfiles"] = operational_options.get("initfiles", []) | |||
for i, initfile in enumerate(operational_options["initfiles"]): |
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.
Normally list comprehensions look more complicated than they should, but I feel in this case it would be more illustrative than the explicit loop:
operational_options["initfiles"] = [
os.path.join(workflow_workspace, initfile) for initfile in operational_options.get("initfiles", [])]
There is no need to change anything if you don't think the same after reading the comment :)
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.
I actually prefer list comprehensions, not sure why I didn't think of it here :) I'll change it.
All works nicely. Just making Travis pass left :) |
I think the travis issue happens because we have
|
|
Add operational option
initfiles
that people can use in their reana.yaml, similarly to the options initdir and toplevel.initfiles
expects an array of files to read the input parameters from.Example
closes reanahub/reana#305