Module containing predefined command specific CLI options.
Reusable command line interface options for Code commands.
aiida.cmdline.params.options.commands.code.
is_not_on_computer
is_on_computer
Reusable command line interface options for Computer commands.
aiida.cmdline.params.options.commands.computer.
should_call_default_mpiprocs_per_machine
Return True if the scheduler can accept ‘default_mpiprocs_per_machine’, False otherwise.
If there is a problem in determining the scheduler, return True to avoid exceptions.
Reusable command line interface options for the setup commands.
aiida.cmdline.params.options.commands.setup.
get_profile_attribute_default
Return the default value for the given attribute of the profile passed in the context.
attribute – attribute for which to get the current value
ctx – click context which should contain the selected profile
profile attribute default value if set, or None
get_quicksetup_database_name
Determine the database name to be used as default for the Postgres connection in verdi quicksetup
If a value is explicitly passed, that value is returned unchanged.
If no value is passed, the name will be <profile_name>_<os_user>_<hash>, where <os_user> is the name of the current operating system user and <hash> is a hash of the path of the configuration directory.
Note: This ensures that profiles named test_... will have databases named test_... .
test_...
ctx – click context which should contain the contextual parameters
the database name
get_quicksetup_password
Determine the password to be used as default for the Postgres connection in verdi quicksetup
If a value is explicitly passed, that value is returned. If there is no value, the current username in the context will be scanned for in currently existing profiles. If it does, the corresponding password will be used. If no such user already exists, a random password will be generated.
the password
get_quicksetup_repository_uri
Return the repository URI to be used as default in verdi quicksetup
the repository URI
get_quicksetup_username
Determine the username to be used as default for the Postgres connection in verdi quicksetup
If a value is explicitly passed, that value is returned. If there is no value, the name will be based on the name of the current operating system user and the hash of the path of the configuration directory.
the username
get_repository_uri_default
Return the default value for the repository URI for the current profile in the click context.
default repository URI
validate_profile_parameter
Validate that the context contains the option profile and it contains a Profile instance.
BadParameter if the context does not contain a Profile instance for option profile