-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds functionality to write all files involved in the execution of a workflow to disk. This is achieved via the new `ProcessDumper` class, which exposes the top-level `dump` method, while `verdi process dump` provides a wrapper for access via the CLI. Instantiating the `ProcessDumper` class is used to set the available options for the dumping. These are the `-o/--overwrite` option, the `--io-dump-paths` option which can be used to provide custom subdirectories for the folders created for each `CalculationNode` (the dumped data being the `CalculationNode` repository, its `retrieved` outputs, as well as the linked node inputs and outputs), the `-f/--flat` option that disables the creation of these subdirectories, thus creating all files in a flat hierarchy (for each step of the workflow), and the `--include-inputs/--exclude-inputs` (`--include-outputs/--exclude-outputs`) options to enable/disable the dumping of linked inputs (outputs) for each `CalculationNode`. In addition, a `README` is created in the parent dumping directory, as well as `.aiida_node_metadata.yaml` files with the `Node`, `User`, and `Computer` information in the subdirectories created for each `ProcessNode`. Nested workchains with considerable file I/O were needed for meaningful testing of this feature, so it was required to extend the `generate_calculation_node` fixture of `conftest.py`. Moreover, the `generate_calculation_node_add` and `generate_workchain_multiply_add` fixtures that actually run the `ArithmeticAddCalculation` and `MultiplyAddWorkchain` were also added. These could in the future possibly be used to reduce code duplication where the objects are being constructed in other parts of the test suite (benchmarking of manually constructing the `ProcessNode`s vs. running the `Process` will still have to be conducted). Lastly, the `generate_calculation_node_io` and `generate_workchain_node_io` were added in `test_processes.py`, which actually create the `CalculationNode`s and `WorkflowNode`s that are used for the tests of the dumping functionality. Co-Authored-By: Junfeng Qiao <[email protected]>
- Loading branch information
Showing
11 changed files
with
1,222 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
########################################################################### | ||
# Copyright (c), The AiiDA team. All rights reserved. # | ||
# This file is part of the AiiDA code. # | ||
# # | ||
# The code is hosted on GitHub at https://github.com/aiidateam/aiida-core # | ||
# For further information on the license, see the LICENSE.txt file # | ||
# For further information please visit http://www.aiida.net # | ||
########################################################################### | ||
"""Modules related to the dumping of AiiDA data.""" | ||
|
||
__all__ = ('processes',) |
Oops, something went wrong.