aiida-core icon indicating copy to clipboard operation
aiida-core copied to clipboard

CLI: `repository` option missing for `verdi profile setup core.psql_dos`?

Open mbercx opened this issue 1 month ago • 1 comments

Describe the bug

I was trying to use the new verdi profile setup core.psql_dos command to set up a profile based on a YAML file, e.g.:

profile: dev
email: [email protected]
database_name: mc3d-source-dev
database_username: aiida
database_password: password
repository: /home/aiida/project/mc3d-source/repositories/dev

But I don't see the repository option anymore?

$ verdi profile setup core.psql_dos --help
Usage: verdi profile setup core.psql_dos [OPTIONS]

  An AiiDA storage backend that stores data in a PostgreSQL database and disk-
  objectstore repository.

  Note, there were originally two such backends, `sqlalchemy` and `django`.
  The `django` backend was removed, to consolidate access to this storage.

Options:
  --profile PROFILE               The name of the new profile.  [required]
  --set-as-default / --no-set-as-default
                                  Whether to set the profile as the default.
  --email EMAIL                   Email address associated with the data you
                                  generate. The email address is exported
                                  along with the data, when sharing it.
  --first-name NONEMPTYSTRING     First name of the user.  [required]
  --last-name NONEMPTYSTRING      Last name of the user.  [required]
  --institution NONEMPTYSTRING    Institution of the user.  [required]
  --database-engine TEXT          The engine to use to connect to the
                                  database.
  --database-hostname TEXT        The hostname of the PostgreSQL server.
  --database-port INTEGER         The port of the PostgreSQL server.
  --database-username TEXT        The username with which to connect to the
                                  PostgreSQL server.  [required]
  --database-password TEXT        The password with which to connect to the
                                  PostgreSQL server.  [required]
  --database-name TEXT            The name of the database in the PostgreSQL
                                  server.  [required]
  --config FILEORURL              Load option values from configuration file
                                  in yaml format (local path or URL).
  -n, --non-interactive           In non-interactive mode, the CLI never
                                  prompts but simply uses default values for
                                  options that define one.
  -h, --help                      Show this message and exit.

So the command fails when I try to set up the profile.

Your environment

  • Operating system [e.g. Linux]: Ubuntu 22.04 LTS
  • Python version [e.g. 3.7.1]: 3.10.12
  • aiida-core version [e.g. 1.2.1]: 2.5.1

mbercx avatar May 08 '24 10:05 mbercx

That is a bug in v2.5 which is already fixed in main by 43a7d77e5a2defd7c6095df42125d8e9d3666be9 We really need to get v2.6 out soon. Let's get these final blocking PRs merged so we can release!

sphuber avatar May 08 '24 16:05 sphuber