Skip to content

Commit 20efa61

Browse files
khsraliagoscinski
authored andcommitted
review applied
1 parent 1d7f3e3 commit 20efa61

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/source/topics/calculations/usage.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ Using the ``COPY`` mode, the target path defines another location (on the same f
625625
'stash': {
626626
'source_list': ['aiida.out', 'output.txt'],
627627
'target_base': '/storage/project/stash_folder',
628-
'stash_mode': StashMode.COPY,
628+
'stash_mode': StashMode.COPY.value,
629629
}
630630
}
631631
}
@@ -649,7 +649,7 @@ To avoid this scenario, you can instead, stash via a separate calculation job, f
649649
.. code-block:: python
650650
651651
from aiida.common.datastructures import StashMode
652-
from aiida.orm import load_node
652+
from aiida.orm import load_node, load_computer
653653
654654
StashCalculation = CalculationFactory('core.stash')
655655
@@ -658,12 +658,12 @@ To avoid this scenario, you can instead, stash via a separate calculation job, f
658658
659659
inputs = {
660660
'metadata': {
661-
'computer': Computer.collection.get(label="localhost"),
661+
'computer': load_computer(label="localhost"),
662662
'options': {
663663
'stash': {
664664
'source_list': ['aiida.out', 'output.txt'],
665665
'target_base': '/scratch/',
666-
'stash_mode': StashMode.COPY,
666+
'stash_mode': StashMode.COPY.value,
667667
},
668668
},
669669
},

src/aiida/calculations/stash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class StashCalculation(CalcJob):
2626
2727
inputs = {
2828
'metadata': {
29-
'computer': Computer.collection.get(label="localhost"),
29+
'computer': load_computer(label="localhost"),
3030
'options': {
3131
'resources': {'num_machines': 1},
3232
'stash': {
33-
'stash_mode': StashMode.COPY,
33+
'stash_mode': StashMode.COPY.value,
3434
'target_base': '/scratch/my_stashing/',
3535
'source_list': ['aiida.in', '_aiidasubmit.sh'],
3636
},

0 commit comments

Comments
 (0)