Skip to content

Conversation

@lstein
Copy link
Collaborator

@lstein lstein commented Mar 26, 2023

  • Commands, invocations and their parameters will now autocomplete using introspection.
  • Two types of parameter arguments will also autocomplete:
    • --sampler_name will autocomplete the scheduler name
    • --model will autocomplete the model name
  • There don't seem to be commands for reading/writing image files yet, so path autocompletion is not implemented

- Commands, invocations and their parameters will now autocomplete
  using introspection.
- Two types of parameter *arguments* will also autocomplete:
  - --sampler_name  will autocomplete the scheduler name
  - --model will autocomplete the model name
- There don't seem to be commands for reading/writing image files yet, so
  path autocompletion is not implemented
@hipsterusername
Copy link
Member

Very nice!

Copy link
Contributor

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

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

Works great, thanks!

@Kyle0654
Copy link
Contributor

Is there an autocompleter for ArgParse we could just build on top of? I don't know if that would be worthwhile? e.g. https://github.com/kislyuk/argcomplete

Copy link
Contributor

@Kyle0654 Kyle0654 left a comment

Choose a reason for hiding this comment

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

The model shouldn't be on the command line (since there's no concept of "current" model in nodes). Otherwise, everything looks fine.

lstein added 2 commits March 26, 2023 23:46
1. Prompt has changed to "invoke> ".
2. Function to initialize the autocompleter has been renamed "set_autocompleter()"
@lstein lstein requested a review from Kyle0654 March 27, 2023 16:25
Copy link
Contributor

@Kyle0654 Kyle0654 left a comment

Choose a reason for hiding this comment

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

Approving, but with one suggestion.

@lstein lstein enabled auto-merge March 29, 2023 03:32
@lstein lstein disabled auto-merge March 29, 2023 03:32
@lstein lstein enabled auto-merge March 30, 2023 11:51
@lstein lstein merged commit 054e963 into main Mar 30, 2023
@lstein lstein deleted the feat/node-cli-autocompleter branch March 30, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants