diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 91c21b83..c0e69fda 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.11.7] - TBD -- The internal method `save_genome_mass` was added to facilitate the batch saving of genomes +- Genomes are now saved in batches to the workspace - Unusable `export_genome_features_protein_to_fasta` function was removed - The `genbanks_to_genomes` method was added to allow users to upload multiple genome objects at once diff --git a/lib/GenomeFileUtil/core/GenomeInterface.py b/lib/GenomeFileUtil/core/GenomeInterface.py index 990a19a8..66f6bd0a 100644 --- a/lib/GenomeFileUtil/core/GenomeInterface.py +++ b/lib/GenomeFileUtil/core/GenomeInterface.py @@ -93,22 +93,23 @@ def _save_genome_objects( meta_data, hidden_data, ): - ws_inputs = [] - for ws_datatype, data_path, name, meta, hidden in zip( - ws_datatypes, data_paths, names, meta_data, hidden_data - ): - ws_inputs.append( - { - 'type': ws_datatype, - 'data_json_file': data_path, - 'name': name, - 'meta': meta, - 'hidden': hidden, - } - ) - return self.ws_large_data.save_objects( - {'id': workspace_id, 'objects': ws_inputs} + dfu_infos = self.ws_large_data.save_objects( + { + 'id': workspace_id, + 'objects': [ + { + 'type': ws_datatype, + 'data_json_file': data_path, + 'name': name, + 'meta': meta, + 'hidden': hidden, + } for ws_datatype, data_path, name, meta, hidden in zip( + ws_datatypes, data_paths, names, meta_data, hidden_data + ) + ] + } ) + return dfu_infos def _check_shock_response(self, response, errtxt): """