Skip to content

Commit ebc62d3

Browse files
authored
👌 IMPROVE: Add prepend_text for codes (#71)
Optional key, to define additional `prepend_text`. This is in preparation for adding conda env activation.
1 parent ef5f643 commit ebc62d3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tasks/aiida-code.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
folder: "{{ code_params.folder }}"
99
plugin: "{{ code_params.plugin }}"
1010
description: "{{ plugin.key }} {{ code_params.name }}, original plugin version {{ plugin.value.version }}, executable version {{ code_params.version }}"
11+
prepend_text: "{{ code_params.prepend_text | default('') }}"
1112
loop: "{{ lookup('vars', plugin.value.codes_var) }}"
1213
loop_control:
1314
loop_var: code_params

templates/code.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ input_plugin: "{{ aiida_code.plugin }}"
44
on_computer: true
55
remote_abs_path: "{{ aiida_code.folder | regex_replace('\\$\\{HOME}', current_user_home) }}/{{ aiida_code.executable }}"
66
computer: "{{ aiida_computer_name }}"
7-
prepend_text: "ulimit -s unlimited"
7+
prepend_text: |
8+
ulimit -s unlimited
9+
{{ aiida_code.prepend_text | indent(width=2) }}

0 commit comments

Comments
 (0)