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

positional argument propagation? #37

Open
AlJohri opened this issue Jan 10, 2020 · 3 comments
Open

positional argument propagation? #37

AlJohri opened this issue Jan 10, 2020 · 3 comments

Comments

@AlJohri
Copy link

AlJohri commented Jan 10, 2020

I don't want to specify multiple tasks on the CLI, just a single task at a time. For me, &&, is sufficient for running multiple tasks.

Instead, I want full ARG propagation. For example, I want to be be able to run:

runner lab notebooks/test.ipynb --debug

where the task_lab is defined as simply propagating the entire "$@" to jupyter lab with some default options already set.

Is this possible? I get an error saying the notebooks/test.ipynb task doesn't exist so its presumably thinking each positional argument is a task.

@stylemistake
Copy link
Owner

its presumably thinking each positional argument is a task.

Correct.

It only propagates arguments that begin with a dash. Can't suggest any workaround, because Runner CLI simply wasn't designed for this, and it will all be hacky. You can roll your own argument parser instead of using Runner CLI.

You may also take a look at the future version in the next branch. Although it's a work in progress, the core idea is that everything is DIY, and it has a huge library of helper functions which you can copy/include and use in your own launcher/build script, in your case, this file: https://github.com/stylemistake/runner/blob/next/lib/argparse.sh

@AlJohri
Copy link
Author

AlJohri commented Jan 15, 2020

Cool, thanks! Will the next version by any chance allow disabling task chaining to allow for full argument propagation?

@stylemistake
Copy link
Owner

Yeah, I'll take it into consideration.

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

2 participants