Description
When running verdi computer configure local localhost
interactively, I get a default value for the connection cooldown time.
However, this throws an exception:
$ verdi computer configure local localhost -n
Usage: verdi computer configure local [OPTIONS] COMPUTER
Error: Missing option "--safe-interval".
This is unexpected, since it should simply take the default value in non-interactive mode.
I thought that was an easy fix and started looking into the code, only to encounter the fact that the cli setup for transport plugins is really convoluted.
In particular, the options are translated from some custom internal key/value representation
aiida-core/aiida/transports/plugins/ssh.py
Lines 63 to 77 in a825865
aiida-core/aiida/transports/transport.py
Lines 57 to 64 in a825865
to click using a lot of "machinery".
Is this really necessary?
This isn't high-priority but couldn't we just use the simpler approach from data
plugins, where a plugin simply adds a new command to an existing group?
Mentioning @giovannipizzi @sphuber for comment.