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

small improvements to the cmds #55

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kcidev/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import click

from kcidev.libs.common import *
from kcidev.subcommands import checkout, commit, patch, results, testretry
from kcidev.subcommands import checkout, commit, patch, maestro_results, testretry


@click.group(
help="Stand alone tool for Linux Kernel developers and maintainers that can test local Linux Kernel changes on a enabled KernelCI server"
help="Stand alone tool for Linux Kernel developers and maintainers to interact with KernelCI."
)
@click.version_option("0.1.0", prog_name="kci-dev")
@click.option(
Expand Down Expand Up @@ -38,7 +38,7 @@ def run():
cli.add_command(checkout.checkout)
cli.add_command(commit.commit)
cli.add_command(patch.patch)
cli.add_command(results.results)
cli.add_command(maestro_results.maestro_results)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aliceinwire @nuclearcat I wonder if we shouldn't in the future have a maestro subcommand and fold all the maestro stuff as subcommands of that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not make also cli too complex. Maybe if commands will be more or less common, we can just hide it in configuration file, like --instance=maestro_production and in config it will be:
[maestro_production]
type=maestro
url=....
But if functionality will be unique, then it is different thing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not make also cli too complex.

completely agree, also we should not make terminology too complex, kci-dev need to be simple to use and "hide" all the KernelCI internal complex structure and terminology.
kci-dev users shouldn't know what is "maestro" for using kci-dev, they just need a way to get results logs from KernelCI.
I could maybe accept some sub-command like "--source="

cli.add_command(testretry.testretry)
cli()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_nodes(url, limit, offset, filter, field):
print_nodes(nodes, field)


@click.command(help="Get results")
@click.command(help="Get results directly from KernelCI's Maestro")
@click.option(
"--nodeid",
required=False,
Expand Down Expand Up @@ -109,7 +109,7 @@ def get_nodes(url, limit, offset, filter, field):
help="Print only particular field(s) from node data",
)
@click.pass_context
def results(ctx, nodeid, nodes, limit, offset, filter, field):
def maestro_results(ctx, nodeid, nodes, limit, offset, filter, field):
config = ctx.obj.get("CFG")
instance = ctx.obj.get("INSTANCE")
url = api_connection(config[instance]["api"])
Expand Down
Loading