broadinstitute / single_cell_portal

Tutorials, workflows, and convenience scripts for Single Cell Portal
https://singlecell.broadinstitute.org/single_cell
BSD 3-Clause "New" or "Revised" License
47 stars 25 forks source link

CLI `verbose` option, refined messaging #78

Closed eweitz closed 5 years ago

eweitz commented 5 years ago

This generally improves UX for our public CLI, manage_study.py. These changes will:

I've tested them locally. See #77 for related work.

This satisfies SCP-1894.

eweitz commented 5 years ago

is it desirable for a bare "python manage_study.py" command to trigger the gcloud authentication process?

That historical handling seems convenient and secure, but perhaps it could be improved.

As noted in scp_api.py, it'd be nice if credentials could be read from a file. Perhaps the file could the value of the GOOGLE_APPLICATION_CREDENTIALS environment variable or a new one like SCP_APPLICATION_CREDENTIALS. That might be a better default, e.g. the first place we look when processing a manage_study.py command that lacks the --token argument.

bistline commented 5 years ago

Since none of the gcloud auth methods write to GOOGLE_APPLICATION_CREDENTIALS anymore, this seems unlikely. We'd have to do it ourselves as part of this codebase. gcloud say to use gcloud auth print-access-token for accessing tokens.