Skip to content

WIP click CLI wrapper around normal CLI #4961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

Crivella
Copy link
Contributor

Enabling

For now manually pip install:

  • pip install click

  • pip install rich-click

  • Extract all the parameters from EasyBuildOptions and use them to generate a CLI with click

  • Uses click + rich_click to have a fancier looking CLI

Autocomplete

From click docs add the following to the .bashrc or venv activation script.

eval "$(_EB2_COMPLETE=bash_source eb2)"

Alternatively see aiida-core EC to activate it as a module

Advantages

  • Nicer looking
  • Automatic integration and autocomplete with bash zsh fish shells

TODO

  • Implement/convert more types for better autocompletion
  • Better integrate logging with rich

Maybe

  • Rewrite the CLI logic to use click natively and divide the commands in subgroups to have an easier to read help

How would this look like

eb2 --help image
Error image
Normal build run image

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.

1 participant