mozilla / active-data-recipes

A repository of various activedata queries and recipes
Mozilla Public License 2.0
8 stars 24 forks source link

Combine recipe and query runner into one #19

Closed worldomonation closed 5 years ago

worldomonation commented 6 years ago

The current default when user runs adr in the CLI invokes the recipes parser, which then begins looking for a recipe of the name provided e.g. adr unittest_skip_count.

While this is handy if the default use case is recipes, it is unintuitive if the user intends to run a query. The user must run adr-query ... and if the user does not have tab completion or is new to the tool it can be confusing.

Proposal:

ahal commented 6 years ago

+1

I'd propose:

$ adr recipe <recipe>
$ adr query <query>
$ adr <name>

The last case could just search for <name> in the recipes and possibly even the queries if none were found. We can use argparse's subparsers feature to implement this.

worldomonation commented 5 years ago

Issue has been addressed by https://github.com/mozilla/active-data-recipes/pull/29.