Skip to content

Help for subcommand #2395

@kenahoo

Description

@kenahoo

If the user calls dvc push --unknown-option, it would be great if the displayed help text was about the options for push. Currently here's what happens:

% dvc push --dry-run
ERROR: unrecognized arguments: --dry-run

Having any troubles?. Hit us up at https://dvc.org/support, we are always happy to help!
usage: dvc [-h] [-q | -v] [-V] COMMAND ...

Data Version Control

optional arguments:
  -h, --help     show this help message and exit
  -q, --quiet    Be quiet.
  -v, --verbose  Be verbose.
  -V, --version  Show program's version.

Available Commands:
  COMMAND        Use dvc COMMAND --help for command-specific help.
    init         Initialize DVC in the current directory.
    get          Download data from DVC repository.
    get-url      Download or copy files from URL.
    destroy      Remove DVC-files, local DVC config and data cache.
    add          Take data files or directories under DVC control.
    remove       Remove DVC-file outputs.
    move         Rename or move a DVC controlled data file or a directory.
    unprotect    Unprotect data files or directories.
    run          Generate a stage file from a command and execute the command.
    repro        Check for changes and reproduce stages and dependencies.
    pull         Pull data files from a DVC remote storage.
    push         Push data files to a DVC remote storage.
    fetch        Fetch data files from a DVC remote storage.
    status       Show changed stages, compare local cache and a remote storage.
    gc           Collect unused data from DVC cache or a remote storage.
    import       Download data from DVC repository and take it under DVC control.
    import-url   Download or copy file from URL and take it under DVC control.
    config       Get or set config options.
    checkout     Checkout data files from cache.
    remote       Manage remote storage configuration.
    cache        Manage cache settings.
    metrics      Commands to add, manage, collect and display metrics.
    install      Install DVC git hooks into the repository.
    root         Relative path to the repository's directory.
    lock         Lock DVC-files.
    unlock       Unlock DVC-files.
    pipeline     Manage pipelines.
    commit       Save changed data to cache and update DVC-files.
    diff         Show a diff of a DVC controlled data file or a directory.
    version      Show DVC version and system/environment informaion.
    update       Update data artifacts imported from other DVC repositories.

This may not be easy to achieve with argparse, not sure.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions