aiida-core
aiida-core copied to clipboard
Don't raise exception for successful `verdi archive import -n`
When doing a dry-run of an archive import, the import_archive function raises the ImportTestRun('test run complete') exception, resulting in a user-facing Critical: output. Is there any particular reason for this behavior, rather than just a Report: that the dry-run is done?
Relevant code here: https://github.com/aiidateam/aiida-core/blob/be0db3cc49506294ae1845b6e746e40cd76f39a9/src/aiida/cmdline/commands/cmd_archive.py#L516-L525
https://github.com/aiidateam/aiida-core/blob/be0db3cc49506294ae1845b6e746e40cd76f39a9/src/aiida/tools/archive/imports.py#L198-L200
s there any particular reason for this behavior, rather than just a Report: that the dry-run is done?
Don't think so. Likely just an oversight. We should really just be catching the ImportTestRun exception separately and issues an echo_success message
Alright, cool! Should be done by #6403.