From 04f3fbaef5c35ba8401ed432c4d820dfe2bad02f Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Thu, 19 Oct 2023 10:12:13 +0200 Subject: [PATCH] `Q2rCalculation`: Add the `output_parameters` output to the spec The `Q2rCalculation` did not declare the `output_parameters` output even though the `Q2rParser` attaches it always. This would lead to the calculation excepting because an unknown output would be attached. This was uncaught by the test because the `Parser.parse_from_node` method does not automatically validate the outputs. This is because the output spec that is checked is that of the `calcfunction` (which accepts anything) and not that of the `Q2rCalculation`. --- src/aiida_quantumespresso/calculations/q2r.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aiida_quantumespresso/calculations/q2r.py b/src/aiida_quantumespresso/calculations/q2r.py index a4650c479..b463012eb 100644 --- a/src/aiida_quantumespresso/calculations/q2r.py +++ b/src/aiida_quantumespresso/calculations/q2r.py @@ -32,6 +32,7 @@ def define(cls, spec): super().define(spec) spec.input('parent_folder', valid_type=(orm.RemoteData, orm.FolderData), required=True) spec.output('force_constants', valid_type=ForceConstantsData) + spec.output('output_parameters', valid_type=orm.Dict) spec.exit_code(330, 'ERROR_READING_FORCE_CONSTANTS_FILE', message='The force constants file could not be read.') # yapf: enable