Skip to content

Commit

Permalink
👌 IMPROVE: Add prepend_text for codes (#71)
Browse files Browse the repository at this point in the history
Optional key, to define additional `prepend_text`.
This is in preparation for adding conda env activation.
  • Loading branch information
chrisjsewell authored Apr 15, 2021
1 parent ef5f643 commit ebc62d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions tasks/aiida-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
folder: "{{ code_params.folder }}"
plugin: "{{ code_params.plugin }}"
description: "{{ plugin.key }} {{ code_params.name }}, original plugin version {{ plugin.value.version }}, executable version {{ code_params.version }}"
prepend_text: "{{ code_params.prepend_text | default('') }}"
loop: "{{ lookup('vars', plugin.value.codes_var) }}"
loop_control:
loop_var: code_params
Expand Down
4 changes: 3 additions & 1 deletion templates/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ input_plugin: "{{ aiida_code.plugin }}"
on_computer: true
remote_abs_path: "{{ aiida_code.folder | regex_replace('\\$\\{HOME}', current_user_home) }}/{{ aiida_code.executable }}"
computer: "{{ aiida_computer_name }}"
prepend_text: "ulimit -s unlimited"
prepend_text: |
ulimit -s unlimited
{{ aiida_code.prepend_text | indent(width=2) }}

0 comments on commit ebc62d3

Please sign in to comment.