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

Default kwargs in bash apps are lost at command string format time #349

yadudoc opened this Issue Jun 22, 2018 · 0 comments


None yet
1 participant
Copy link

yadudoc commented Jun 22, 2018

We made some changes in 065f5d3 in order to avoid explicit checking and copying of default values to app functions at definition. This was made to support complex objects (eg from pandas) that do not support comparison to Parameter.empty.

In bash applications, we have two stages in which we compose the command string.

  1. Execute the function with *args and **kwargs from call time
  2. Auto format the return string with *args and **kwargs as a shorthand.

In the first phase, defaults from definition time are available, however in the second phase, we rely on formatting the string with just *args, and **kwargs missing the default values attached to the func object.

def foo(a=1, b=2)
    return "echo "a={a} b={b}"

foo(a=0, b=1).result() # This works
foo(b=1).result() # This will result in a KeyError as `a` is missing

@yadudoc yadudoc self-assigned this Jun 22, 2018

@yadudoc yadudoc added the bug label Jun 22, 2018

@yadudoc yadudoc added this to the Parsl-0.6.0 milestone Jun 22, 2018

yadudoc added a commit that referenced this issue Jun 25, 2018

yadudoc added a commit that referenced this issue Jun 25, 2018

@yadudoc yadudoc closed this in 6b7aa54 Jun 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.