Skip to content

[docs] enumerate options in --help #863

@jameslamb

Description

@jameslamb

Description

Working on setting up a new organization and pipelines to upload packages to it, I've been working with anaconda-client.

I've found that for some commands, --help doesn't have sufficient information for me to figure out how to use the CLI.

For example:

$ anaconda org upload

 Usage: anaconda org upload [OPTIONS]

 Upload packages to your Anaconda repository

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯

$ anaconda org login
 Usage: anaconda org login [OPTIONS]                                                                                                                               
                                                                                                                                                                   
 Authenticate a user.                                                                                                                                              
                                                                                                                                                                   
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                                                                                                     │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Generated the above with these versions:

$ anaconda --version
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Package           ┃ Version ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ anaconda-client   │ 1.14.1  │
│ anaconda-auth     │ 0.14.2  │
│ anaconda-cli-base │ 0.8.2   │
└───────────────────┴─────────

This issue is a feature request. I think it'd be helpful if every command's --help printed at least the following:

  • list of all available options
  • for each option:
    • enough information to choose a valid value
    • description of the impact of choosing different values

Benefits of this work

  • make it easier to be self-sufficient with the CLI, without needing to look at source code or the documentation website

Notes

As a side note, I eventually ended up reading source code to figure out how to use the CLI.

The documentation at https://www.anaconda.com/docs/tools/anaconda-org/maintainer-guide/upload-packages and similar pages also did not enumerate all options and the effects of different values, and the "Ask AI" thing you get dropped into from searching outright was not useful. For example, when I asked it for the valid values for -t to anaconda upload, it first incorrectly told me only conda, then told me to email [email protected]. When I told it it was wrong it also told me to click a "thumbs down" button that didn't actually exist.

In the source code, I found the valid values here:

class PackageType(enum.Enum):
CONDA = 'conda'
ENV = 'env'
FILE = 'file'
NOTEBOOK = 'ipynb'
STANDARD_PYTHON = 'pypi'
STANDARD_R = 'r'
PROJECT = 'project'
INSTALLER = 'installer'

Thanks for your time and consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions