As pointed out by @sphuber , functions outside the commandline interface should not prompt for user input.
I originally thought there were many places where this happens but after searching for prompt( in the codebase, it turns out these two are the only ones:
As pointed out by @sphuber , functions outside the commandline interface should not prompt for user input.
I originally thought there were many places where this happens but after searching for
prompt(
in the codebase, it turns out these two are the only ones:https://github.com/aiidateam/aiida-core/blob/5da7120645b6cdb751d6db54431ead38417d2345/aiida/manage/external/postgres.py#L114-L127
https://github.com/aiidateam/aiida-core/blob/5da7120645b6cdb751d6db54431ead38417d2345/aiida/manage/external/postgres.py#L161-L174
Since they don't really need the internals of the
Postgres
class, they can be moved to stand-alone functions somewhere in the utils of the cli.