client icon indicating copy to clipboard operation
client copied to clipboard

Truncated command help text for `dagshub repo --help`

Open guysmoilov opened this issue 1 year ago • 3 comments

Tried running dagshub repo --help and this is the full help text that gets printed:

Usage: dagshub repo [OPTIONS] COMMAND [ARGS]...

  Operations on repo: currently only 'create'

Options:
  --help  Show this message and exit.

Commands:
  create  create a repo and:

guysmoilov avatar Jun 11 '23 13:06 guysmoilov

Hi, there. This seems to be an issue with click itself (See here). However if we make the fix specified in the link, it could be corrected. I think I should be able to do this. Can this be assigned to me?

gokullan avatar Jun 14 '23 09:06 gokullan

@gokullan Sure, thank you, go ahead!

guysmoilov avatar Jun 14 '23 11:06 guysmoilov

I've worked on it and one solution is to use short_help instead of help. This is what I obtained:

Usage: dagshub repo [OPTIONS] COMMAND [ARGS]...

  Operations on repo: currently only 'create'

Options:
  --help  Show this message and exit.

Commands:
  create  create a repo and:
          
          optional- upload files to 'data' dir, .zip and .tar files are
          extracted, other formats copied as is.
          
          optional- clone repo locally.
          
          example 1:  dagshub repo create mytutorial -u
          "http://example.com/data.csv" --clone
          
          example 2:  dagshub --host "https://www.dagshub.com" repo create
          mytutorial2 -u "http://0.0.0.0:8080/index.html" --clone --verbose

I tried other ways to manipulate the string (to eliminate some of the newlines), but this was the best I could do. Is this okay?

This issue pops up because create is a sub-command (of repo). And click doesn't handle these sub-commands the way we expect it to ...

gokullan avatar Jun 14 '23 14:06 gokullan