Skip to content

Test help output in rich-click CLI is robust to lazy loading of modules. #160

Open
@dwreeves

Description

@dwreeves

TLDR: it's missing the subcommands.

celery --help:

Usage: celery [OPTIONS] COMMAND [ARGS]...

  Celery command entrypoint.

Options:
  -A, --app APPLICATION
  -b, --broker TEXT
  --result-backend TEXT
  --loader TEXT
  --config TEXT
  --workdir PATH
  -C, --no-color
  -q, --quiet
  --version
  --skip-checks          Skip Django core checks on startup. Setting the
                         SKIP_CHECKS environment variable to any non-empty
                         string will have the same effect.
  --help                 Show this message and exit.

Commands:
  amqp     AMQP Administration Shell.
  beat     Start the beat periodic task scheduler.
  call     Call a task by name.
  control  Workers remote control.
  events   Event-stream utilities.
  graph    The ``celery graph`` command.
  inspect  Inspect the worker at runtime.
  list     Get info from broker.
  logtool  The ``celery logtool`` command.
  migrate  Migrate tasks from one broker to another.
  multi    Start multiple worker instances.
  purge    Erase all messages from all known task queues.
  report   Shows information useful to include in bug-reports.
  result   Print the return value for a given task id.
  shell    Start shell session with convenient access to celery symbols.
  status   Show list of workers that are online.
  upgrade  Perform upgrade between versions.
  worker   Start worker instance.

rich-click celery --help:

                                                                                                    
 Usage: celery [OPTIONS] COMMAND [ARGS]...                                                          
                                                                                                    
 Celery command entrypoint.                                                                         
                                                                                                    
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --app             -A  APPLICATION                                                                │
│ --broker          -b  TEXT                                                                       │
│ --result-backend      TEXT                                                                       │
│ --loader              TEXT                                                                       │
│ --config              TEXT                                                                       │
│ --workdir             PATH                                                                       │
│ --no-color        -C                                                                             │
│ --quiet           -q                                                                             │
│ --version                                                                                        │
│ --skip-checks                      Skip Django core checks on startup. Setting the SKIP_CHECKS   │
│                                    environment variable to any non-empty string will have the    │
│                                    same effect.                                                  │
│ --help                             Show this message and exit.                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingRelated to testing, coverage, linting, etc.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions