You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When a (lazy) callable provided by duty runs and fails, we output a stringified version of the callable: a string that looks like a Python statement (function call). That is not super helpful because one would have to run an interpreter, guess and import the right things, and run this command again, but it might not exist, etc. To improve this, duty accepts a command argument when running a callable: this command will be used instead of the stringified callable when printing the output, so that users can simply copy/paste this CLI command to re-run it.
The issue here is that users have to provide this command manually when writing their duties. When there are many arguments provided to the callable, it can be tedious to rebuild the right command line. Actually, duty's callables already build the command line, so we should add a way to return/reuse these command lines (without running them) automatically.
Describe the solution you'd like
A way to automatically compute the command argument, or to retrieve it from the lazy callable so that users can choose to pass it down with the command parameter.
Describe alternatives you've considered
/
Additional context
/
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When a (lazy) callable provided by duty runs and fails, we output a stringified version of the callable: a string that looks like a Python statement (function call). That is not super helpful because one would have to run an interpreter, guess and import the right things, and run this command again, but it might not exist, etc. To improve this, duty accepts a
command
argument when running a callable: this command will be used instead of the stringified callable when printing the output, so that users can simply copy/paste this CLI command to re-run it.The issue here is that users have to provide this command manually when writing their duties. When there are many arguments provided to the callable, it can be tedious to rebuild the right command line. Actually, duty's callables already build the command line, so we should add a way to return/reuse these command lines (without running them) automatically.
Describe the solution you'd like
A way to automatically compute the
command
argument, or to retrieve it from the lazy callable so that users can choose to pass it down with thecommand
parameter.Describe alternatives you've considered
/
Additional context
/
The text was updated successfully, but these errors were encountered: