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
Make graph_name input consistent across commands #101
Comments
Option 1: Make graph-name a flag always
|
@JakeDawkins, I'm partial to the |
I think that having a |
I think Option 2 makes the most sense, you'll always need a graph name so it makes the most sense for it to be a positional argument.
This also makes sense, especially if we are going to support input from Generally I'd say it's not super great to have multiple required positional arguments and we should do our best to keep those down. However, I also think there is a time and place for multiple positionals - but only when each of them MUST be specified every time that command is run. |
I like having a positional argument when it is the only required argument; otherwise it feels like a strange choice and a challenge for the user to remember. |
@EverlastingBugstopper I was talking with Jesse about this, and I'm not sure how to design the stdin option. He suggested using I'm not super familiar with stdin usage in other CLI tools. Do they usually require |
Oh that's interesting! I've never seen a tool require changes to arguments in order to take Generally I've seen it used in place of arguments that take a file path. (I'd say we would want an error message if someone tried to pass stdin AND specify a schema path) |
@abernix can you elaborate here? It's not directly relevant to this issue, but I could see it affecting design in this issue 😄 Based on my understanding of our conversation, you were talking about supporting a use of stdin like
and not like
right? Or were you saying we could support the second usage as long as we also supported the first? |
From my understanding so far, I think we like the idea of (if we keep it as a flag, I could definitely support renaming it to just |
Just quoting my comment from #99 (comment) for its relevance:
|
I like the graph being positional because of the symmetry with Git, which I believe users will appreciate. The graph name effectively becomes the "remote" that you're interacting with. |
Sure! I would claim that it is common convention to use Just off the very top of my head, Getting a bit out into left-field, but hopefully relatedly: While it's less common to see in practice, the Personally, I find the second example above (without |
Okay, I think it sounds like we're in agreement on having the graph as a positional arg on all commands. Remaining questions/proposals:
Does this all sound reasonable @StephenBarlow @zionts @EverlastingBugstopper @abernix? |
I rather like baking variant into the positional arg exclusively. It elevates variants to where they should be in people's heads. A separate bikeshed that I reckon is outside the scope of this issue: are we sold on |
I like the idea of dropping the variant flag too, especially if the long-term plan is to do that anyway. So I think I'd like to officially propose that idea unless there's objection from a product/future perspective
|
Agree with all three checkmarks of yours @JakeDawkins
💯%, and to be honest, I would even say that requiring the inclusion the (today's) default value of
I think this depends on the final assessment; While the decision record has recommendations it is still as of yet, inconclusive. |
Definitely a duplicate of #99, but I'm going to close that since there is discussion here 🙃
The
schema fetch
command requires the graph id to be passed as a positional arg, where the other commands likepush
require it be passed as a flag--graph-name
.rover schema fetch [OPTIONS] <GRAPH_NAME>
rover schema push [OPTIONS] <SCHEMA_PATH> --graph-name <graph-name>
Maybe we should rethink what things we pass as positional args vs which are passed as flags.
Maybe it's not a big deal that we pass graph-name as a flag one place and a positional arg in other places. If people think that, feel free to say so! I'll provide some options in design below if you do agree that we need to make it consistent
The text was updated successfully, but these errors were encountered: