The Wayback Machine - https://web.archive.org/web/20200524100720/https://github.com/iterative/dvc/issues/3642
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

Consistent cmd option order? #3642

Open
jorgeorpinel opened this issue Apr 17, 2020 · 5 comments
Open

Consistent cmd option order? #3642

jorgeorpinel opened this issue Apr 17, 2020 · 5 comments

Comments

@jorgeorpinel
Copy link
Member

@jorgeorpinel jorgeorpinel commented Apr 17, 2020

Extracted from #3608 (comment)

To match docs, where options have been ordered manually from more to less important (at least that's the idea).

Example difference:

λ dvc commit -h
usage: dvc commit [-h] [-q | -v] [-f] [-d] [-R] [targets [targets ...]]
...

optional arguments:
  -h, --help            show this help message and exit
  -q, --quiet           Be quiet.
  -v, --verbose         Be verbose.
  -f, --force      Commit even if hash value for dependencies/outputs changed.
  -d, --with-deps  Commit all dependencies of the specified target.
  -R, --recursive  Commit cache for subdirectories of the specified directory.

(DVC 0.93.0)

vs. https://dvc.org/doc/command-reference/commit#options:

image

@jorgeorpinel
Copy link
Member Author

@jorgeorpinel jorgeorpinel commented Apr 17, 2020

I'm wondering whether -h -q -v can be moved to the bottom of all cmd -h outputs as a first step..

@efiop
Copy link
Member

@efiop efiop commented Apr 17, 2020

@jorgeorpinel They probably could be moved with some hack or something, but I would urge you to consider if this is really worth it.

@efiop
Copy link
Member

@efiop efiop commented Apr 17, 2020

@jorgeorpinel I guess worth elaborating that moving -h/-v would require a non-trivial hack for argparse, which is probably too much effort for this kind of change. Not as easy as moving few lines around, unfortunately 🙁

@jorgeorpinel
Copy link
Member Author

@jorgeorpinel jorgeorpinel commented Apr 18, 2020

Yes, -h -q -v def. don't seem worth trying to move. I'm not sure about the other ones though, let's say you have 20 lines in your terminal vertically (most people will have more but still) you use -h on a big command like run and scroll back to the top of the output. Shouldn't the more commonly used options be shown first? It could potentially save time and make the experience a little better.

It's probably marginal so I'm not obsessing over this or anything. We can just leave it open and if we never get to it just close it at some point. Or close it if you feel strongly against this, np on my side 🙂

@efiop
Copy link
Member

@efiop efiop commented Apr 22, 2020

@jorgeorpinel Those are really good points! If we look at it that way, maybe it is worth hacking it at some point. Also, interesting to note that things like awscli don't even use argparse and use their own implementation to be able to polish the experience. I don't have a strong opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.