intake / xrviz

Interactive visualisation interface for Xarrays
https://xrviz.readthedocs.io
BSD 3-Clause "New" or "Revised" License
105 stars 21 forks source link

Add command line interface #40

Closed hdsingh closed 5 years ago

hdsingh commented 5 years ago

The command xrviz show datafile/url can be use to open the interface directly from the command line. (Please run pip install -e . after fetching this PR)

rsignell-usgs commented 5 years ago

Awesome. I tried xrviz show .\xrviz\sample_data\great_lakes.nc and it worked great!

Two suggestions:

  1. When I tried just xrviz show with no url, I got:

    (xrviz) C:\Users\rsignell\Documents\GitHub\xrviz>xrviz show
    Unable to open the datafile/url.

    But I think what should be returned is the same response as xrviz --help, which is:

    (xrviz) C:\Users\rsignell\Documents\GitHub\xrviz>xrviz --help
    usage: `xrviz show datafile/url`
  2. Need to add an extra section in the documentation: 2019-08-26_7-16-50 renaming "Interface" to "Graphical user interface" and adding a new "Command line interface"

rsignell-usgs commented 5 years ago

The doc looks good! Is it hard to make the CLI give the --help when the user specifies things incorrectly or there is an error?

hdsingh commented 5 years ago

I thought to keep it simple, minimal. So only one option is available here i.e. to pass file/url to the interface. In case of any error encountered in the interface, the error trace is shown in terminal. I am not sure what else should be added to help.

rsignell-usgs commented 5 years ago

All I'm really asking here is to add

usage: `xrviz show datafile/url`

to any error

rsignell-usgs commented 5 years ago

Looks good to me. @martindurant okay for me to merge?

martindurant commented 5 years ago

I have not had a chance to look, but please merge if you are happy with it.

On August 26, 2019 2:41:32 PM EDT, Rich Signell notifications@github.com wrote:

Looks good to me. @martindurant okay for me to merge?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/intake/xrviz/pull/40#issuecomment-524979027

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.