aiida-core
aiida-core copied to clipboard
Inconsistent usage of `setup`/`create`/`configure` in verdi commands `profile`/`user`/`code`/`computer` to make new instances, set and update parameters
This arises from the discussion in issue https://github.com/aiidateam/aiida-core/issues/4981 since this covers more than just theverdi computer setup
command I made a separate issue to it.
Motivation
To make new instances of objects, set parameters, update parameters the verdi commands verdi [profile|user|code|computer|group]
use different command names which is very confusing for new users (at least for me). I can see some reasons for the different naming, but there so strong inconsistencies that result in a bad user experience.
verdi profile setup # make new instance from positional database plugin and set paramaters
verdi user configure # make new instance, set parameters, and update parameters
verdi code create # make new instance and sets parameters taking code plugin as positional argument
verdi code setup # make new instance and set parameters, or update parameters of existing instance
verdi computer setup # make new instance and sets some parameters
verdi computer configure # set remaining parameters taking transport plugin as positional argument
verdi group create # make new instance
Current work in progress
With the changes in PR https://github.com/aiidateam/aiida-core/pull/6198 we can merge verdi computer setup
and configure
to one command as
If we were to migrate the computer setup code to use the DynamicEntryPointCommandGroup we could turn it into a single command. It would work exactly like the verdi code create where you would have verdi computer create and the transport plugin would be the subcommand. So you would have verdi computer create core.local and verdi computer create core.ssh.
https://github.com/aiidateam/aiida-core/issues/4981#issuecomment-2136995240
So with these changes the state would be (correct me if I am wrong)
verdi computer create # make new instance and all parameters taking transport plugin as positional argument
Further suggestions
Since users still want to change computer parameters (see discussion https://github.com/aiidateam/team-compass/issues/12), there would be still some command that allows updating the parameters of the computer
verdi computer create # make new instance and all parameters taking transport plugin as positional argument
verdi computer configure # update parameters
This would clash with the verdi user configure
that is used for the creation and an update of the parameters, so maybe we also split up verdi user configure
into verdi user create
and verdi user configure
Furthermore, there is verdi code setup
that seems redundant to me to verdi code create
In addition, if we go with the naming of create
then verdi profile setup
would be renamed to verdi profile create
.
So the final suggestion would be
verdi profile create # make new instance from positional database plugin and set paramaters
verdi user create # make new instance, set parameters
verdi user configure # and update parameters
verdi code create # make new instance and sets parameters taking code plugin as positional argument
verdi computer create # make new instance and all parameters taking transport plugin as positional argument
verdi computer configure # update parameters
verdi group create # make new instance