fix: make the input location optional in the run command - #2207
Open
NoiceHax wants to merge 1 commit into
Open
Conversation
The run command always required an input location, so pipelines that do not take any input could only be started by passing an empty string. The input location is now optional. The trailing positional value is only treated as an input when it is not an available pipeline name, and the input options are only built when a location was provided. Signed-off-by: NoiceHax <yashasprakash021@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
runcli command to run pipelines without an input #2203Changes
The
runcommand always required an input location, so a pipeline that takes no input could only be started withrun <pipeline> "".input_locationis now declared withnargs="?". Since argparse gives every positional value to thenargs="+"pipelines list, the trailing value is moved toinput_locationonly when it is not an available pipeline name. The input options are built only when a location was given, so a pipeline that does need an input fails during its own execution instead of at argument parsing.Added a test that runs a pipeline with no input and checks that a trailing pipeline name is not read as an input location. Updated the existing test for the new "arguments are required" message, and the CLI docs.
I could not run the Django test suite locally, since it needs the Docker and PostgreSQL stack. I ran
ruff check,ruff format --check,doc8on the changed docs page, and a standalone script that replays the positional split for everyruninvocation used in the existing tests.AI disclosure: I used Claude Code while writing this patch.
Checklist