Skip to content

CLI Entry Point

Syed Ibrahim Omer edited this page Apr 13, 2026 · 1 revision

CLI Entry Point (src/cli.py)

This page documents the CLI wiring: arguments, options, and mode routing.

Where it lives

  • Path: src/cli.py
  • Console script: indicators (see pyproject.toml entry point)

Responsibilities

  • Define Click command, arguments, and options
  • Route execution based on flags:
    • --test → run tests/run_tests.py
    • --profile → run profiling/run_profiles.py
    • otherwise → run src/indicators.py:run_main(...)

Mode routing details

Test mode

When --test is passed:

  • The runner tests.run_tests.main(...) is invoked via asyncio.run(...)
  • The process exits with the runner’s exit code

Profiling mode

When --profile is passed:

  • The runner profiling.run_profiles.main(...) is invoked
  • The CLI temporarily replaces sys.argv to pass suite/mode/scenario arguments

Normal mode

When neither --test nor --profile is passed:

  • At least one ticker must be provided, or Click raises a usage error

Related pages:

Clone this wiki locally