From 3b6e2c025062970a6e2e4d4c486b39507c6c508a Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Mon, 30 Jan 2023 17:34:38 +0100 Subject: [PATCH] `verdi node delete`: Add verbose list of pks to be deleted The `verdi node delete` command provided no way to a user to introspect which pks would be deleted, just the total number of nodes. A log message on the INFO level is added with the full list of pks to be deleted. A user can use the `-v info` option to print it. --- aiida/cmdline/commands/cmd_node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aiida/cmdline/commands/cmd_node.py b/aiida/cmdline/commands/cmd_node.py index 0f4d86b36f..1743036c14 100644 --- a/aiida/cmdline/commands/cmd_node.py +++ b/aiida/cmdline/commands/cmd_node.py @@ -315,6 +315,7 @@ def _dry_run_callback(pks): if not pks or force: return False echo.echo_warning(f'YOU ARE ABOUT TO DELETE {len(pks)} NODES! THIS CANNOT BE UNDONE!') + echo.echo_info('The nodes with the following pks would be deleted: ' + ' '.join(map(str, pks))) return not click.confirm('Shall I continue?', abort=True) _, was_deleted = delete_nodes(pks, dry_run=dry_run or _dry_run_callback, **traversal_rules)