scikit-hep/uproot-browser

CLI design not user-friendly

Closed this issue · 1 comments

The CLI always requires a sub-command. This is not good design for uproot-browser, which has a dominant default path: open the file and display its contents interactively. It is in the name "uproot-browser".

The right way to handle this is to make browser the default and change behavior only if --plot or --tree are provided as options.

You should not change behavior based on an option. plot and tree take different arguments than browse, so they should not be options. All the key functionality of browse is available via commands so that you can look into a file from the command line or put it into a script.

But making it the default sounds interesting; if browse is not passed, it should act like it was (like how Ruff or Tox 4 work). I'm not sure how easy that is to do with argparse, but we should try to look into it.