New experimental eb2 CLI using click#4961
New experimental eb2 CLI using click#4961Crivella wants to merge 18 commits intoeasybuilders:developfrom
eb2 CLI using click#4961Conversation
- Fixed beahvore of defaults with `store_or_None` - Fixed checking defaults vs list/tuple instead of flattened value - Added checks for list values in covert comming from the defaults
|
This looks kind of nice, but I'm not a big fan of introducing a required 3rd party dependency. Is there any way we can support this opt-in, for example by defining an environment variable like |
|
We could make use of probably not only for this but also for all the optional dependencies we specify in Then we add a check on top of |
click CLI wrapper around normal CLIeb2 CLI using click
|
So for now the The approach of using an ENV variable i think make sense if we decide to merge |
Enabling
Using pip and optional python dependencies:
pip install easybuild-framework[eb2]How it works
EasyBuildOptionsand use them to generate a CLI withclickclick+rich_clickto have a fancier looking CLIclickis only used for the nicer help and auto completion, but the parameters are still passed as is to the normal parserAutocomplete
From click docs add the following to the
.bashrcor venv activation script.Alternatively see aiida-core EC to activate it as a module
Advantages
bashzshfishshellsTODO
Maybe
clicknatively and divide the commands in subgroups to have an easier to readhelpHow would this look like
eb2 --help
Error
Normal build run