diff --git a/src/aiida_quantumespresso/calculations/pp.py b/src/aiida_quantumespresso/calculations/pp.py index 3821b7036..633af8004 100644 --- a/src/aiida_quantumespresso/calculations/pp.py +++ b/src/aiida_quantumespresso/calculations/pp.py @@ -82,8 +82,8 @@ def define(cls, spec): spec.input('metadata.options.output_filename', valid_type=str, default=cls._DEFAULT_OUTPUT_FILE) spec.input('metadata.options.parser_name', valid_type=str, default='quantumespresso.pp') spec.input('metadata.options.withmpi', valid_type=bool, default=True) - spec.input('metadata.options.keep_plot_file', valid_type=bool, default=False) - spec.input('metadata.options.parse_retrieved_files', valid_type=bool, default=True) + spec.input('metadata.options.keep_data_files', valid_type=bool, default=True) + spec.input('metadata.options.parse_data_files', valid_type=bool, default=True) spec.output('output_parameters', valid_type=orm.Dict) spec.output('output_data', valid_type=orm.ArrayData) @@ -219,10 +219,10 @@ def prepare_for_submission(self, folder): # pylint: disable=too-many-branches,t # distinguish them from one another. The `fileout` filename will be the full data filename with the `fileout` # value as a suffix. retrieve_tuples = [self._FILEOUT, (f'{self._FILPLOT}_*{self._FILEOUT}', '.', 0)] - if self.inputs.metadata.options.keep_plot_file: + if self.inputs.metadata.options.keep_data_files: calcinfo.retrieve_list.extend(retrieve_tuples) # If we do not want to parse the retrieved files, temporary retrieval is meaningless - elif self.inputs.metadata.options.parse_retrieved_files: + elif self.inputs.metadata.options.parse_data_files: calcinfo.retrieve_temporary_list.extend(retrieve_tuples) return calcinfo diff --git a/src/aiida_quantumespresso/parsers/pp.py b/src/aiida_quantumespresso/parsers/pp.py index f847b583f..6c41f9d45 100644 --- a/src/aiida_quantumespresso/parsers/pp.py +++ b/src/aiida_quantumespresso/parsers/pp.py @@ -117,7 +117,7 @@ def get_key_from_filename(filename): matches = re.search(pattern, filename) return matches.group(1) - if self.node.base.attributes.get('parse_retrieved_files', True): + if self.node.base.attributes.get('parse_data_files', True): for filename in filenames: # Directly parse the retrieved files after reading them to memory (`data_raw`). The raw data # of each file is released from memory after parsing, to improve memory usage. diff --git a/tests/calculations/test_pp.py b/tests/calculations/test_pp.py index a837127d3..1a70a36c5 100644 --- a/tests/calculations/test_pp.py +++ b/tests/calculations/test_pp.py @@ -60,11 +60,11 @@ def test_pp_default(fixture_sandbox, generate_calc_job, generate_inputs, file_re file_regression.check(input_written, encoding='utf-8', extension='.in') -def test_pp_keep_plot_file(fixture_sandbox, generate_calc_job, generate_inputs): +def test_pp_keep_data_files(fixture_sandbox, generate_calc_job, generate_inputs): """Test a `PpCalculation` where we want to retrieve the plot file.""" entry_point_name = 'quantumespresso.pp' inputs = generate_inputs() - inputs.metadata.options.keep_plot_file = True + inputs.metadata.options.keep_data_files = True calc_info = generate_calc_job(fixture_sandbox, entry_point_name, inputs) retrieve_list = ['aiida.out', 'aiida.fileout', ('aiida.filplot_*aiida.fileout', '.', 0)] diff --git a/tests/parsers/test_pp.py b/tests/parsers/test_pp.py index 4211651fd..38a08eaff 100644 --- a/tests/parsers/test_pp.py +++ b/tests/parsers/test_pp.py @@ -297,12 +297,12 @@ def test_pp_default_3d( }) -def test_pp_default_3d_keep_plot_file(generate_calc_job_node, generate_parser, generate_inputs_3d, tmpdir): - """Test a `pp.x` calculation where `keep_plot_file=False` meaning files will be parsed from temporary directory.""" +def test_pp_default_3d_keep_data_files(generate_calc_job_node, generate_parser, generate_inputs_3d, tmpdir): + """Test a `pp.x` calculation where `keep_data_files=False` meaning files will be parsed from temporary directory.""" entry_point_calc_job = 'quantumespresso.pp' entry_point_parser = 'quantumespresso.pp' - attributes = {'options': {'keep_plot_file': False}, 'retrieve_temporary_list': ['aiida.fileout']} + attributes = {'options': {'keep_data_files': False}, 'retrieve_temporary_list': ['aiida.fileout']} node = generate_calc_job_node( entry_point_calc_job, test_name='default_3d',