Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

[Backport release-0.7] Custom driver descriptions#695

Merged
mangelajo merged 6 commits intorelease-0.7from
backport-690-to-release-0.7
Oct 8, 2025
Merged

[Backport release-0.7] Custom driver descriptions#695
mangelajo merged 6 commits intorelease-0.7from
backport-690-to-release-0.7

Conversation

@jumpstarter-backport-bot
Copy link

Bot-based backport to release-0.7, triggered by a label in #690.

introducing new format in addition to the simple
methods:
  method: "command"
you can now specify per-method customization with:
methods:
  method:
    description: "This shows up in the CLI"
    method: "echo Hello"
    timeout: 5

(cherry picked from commit e94dc35)
this allows override of the default strings to show up in the jmp shell CLI.

the Driver descriptions can be customized with:
exporter:
  driver_x:
    type: x
    description: "this driver does x"
    methods_description:
      "method1": "this method does y"
      "method2": "this method does z"
    config:
      ...

- Add driver_click_group decorator in client/decorators.py for CLI generation. Annotated method will be used as CLI group description(driver).
- Add driver_click_command decorator to use when there is no group (a single command driver)
- Add description and methods_description field to DriverClient, retrieved via GetReport call from server.
- Add description and methods_description field to Driver base class, only when customized (i.e. defaults are not transmitted).

The infrastructure is using a single DriverInstanceReport message to save on RPC calls.

(cherry picked from commit 46f94b1)
… decorator

Replace @click.group decorators with @driver_click_group and @click.command with @driver_click_command in all drivers,
and use it to provide server-side driver description.

The CLI client will retrieve customized driver's description via GetReport() from the exporter.
When there's no customization it falls back to locally provided default in docstring or help=.

(cherry picked from commit bedc72f)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Oct 08 2025 to showcase some of the refinements we've made.

Comment @coderabbitai help to get the list of available commands and usage tips.

@mangelajo mangelajo enabled auto-merge October 8, 2025 10:13
Copy link
Member

@mangelajo mangelajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backwards compatibility verified.

@mangelajo mangelajo merged commit 7f6c784 into release-0.7 Oct 8, 2025
14 checks passed
@mangelajo mangelajo deleted the backport-690-to-release-0.7 branch October 8, 2025 10:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants