-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add show subcommand #85
Conversation
8eb5836
to
3736824
Compare
|
||
def verify_subcommand(command: str): | ||
"""Function to check the first arguments for a valid subcommand""" | ||
if command not in SUBCOMMANDS: | ||
print("[CRITICAL]: Unknown subcommand :%s", (command), file=sys.stderr) | ||
sys.exit("55") | ||
|
||
def verify_switches(switches: list): |
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.
Isn't that the job for validate_options?
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.
Show command seems unique so far because it's only subcommand that accepts following positional arguments. It doesn't make much difference from user perspective (miliseconds maybe) but I think positional and optional arguments should be validated separately. I propose merging verify_subcommand and verify_switches in this commit or after restructure (#84 ).
@@ -589,6 +609,38 @@ def list_tasks(config: dict, options: dict): | |||
|
|||
print(" ".join(task_list)) | |||
|
|||
def show_deployer(config: dict, options: dict): |
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.
maybe it's a moment to move subcommand specific functions to separete file? I'm not 100% sure but if you know how to do that then go.
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.
8a1ce54
to
5af864b
Compare
3ec070f
to
eec3675
Compare
Add function show_deployer and format_show_deployer Add tests for show subcommand in 01 and 02
eec3675
to
f92ccc5
Compare
fixing issue #82