Skip to content

Make CLI docstrings / metadata render well in both --help and generated md file #1108

@georgeh0

Description

@georgeh0

With #1084 we start to generate markdown from docstrings / metadata from python/cocoindex/cli.py.
Since when we create the CLI, we didn't have the auto generated md yet, something aren't rendered very well.

For examples:

  • Something should be backquoted, like APP_FLOW_SPECIFIER and an_installed.module_name in
    APP_FLOW_SPECIFIER: Specifies the application and optionally the target flow.
    Can be one of the following formats:
    - path/to/your_app.py
    - an_installed.module_name
    - path/to/your_app.py:SpecificFlowName
    - an_installed.module_name:SpecificFlowName
  • There're redundant blank lines that break up sentences into separate paragraphs:
    If APP_TARGET (path/to/app.py or a module) is provided, lists flows defined
    in the app and their backend setup status.
    If APP_TARGET is omitted, lists all flows that have a persisted setup in the
    backend.

Goal: make both --help and generated md look well.

To achieve this goal, we need to:

To test it, you may

  • Run cocoindex --help, cocoindex <subcommand> --help
  • View the generated markdown, by
    • Run dev/generate_cli_docs.py
    • Also view the generated markdown in docusaurus by following docs/README.md

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions