{%- if not job_name is defined -%}
    {% set job_name=basename %}
{%- endif -%}

echo "${txtgrn}Running${bldblk}: '{{ job_name }}'${txtrst}"
echo "${txtgrn}Input${bldblk}: '{{ filename }}'${txtrst}"
{%- for outputfile in comm.output_files %}
echo "${txtgrn}Output${bldblk}: '{{ outputfile }}'${txtrst}"
{%- endfor %}

echo "${txtblu}Description${txtrst}: {{ comm.description }}"

{% if virtualenv %}
echo "${txtred}Loading python virtualenv ${txtrst}: {{ virtualenv }}"
. {{ virtualenv }}/bin/activate
{% elif comm.virtualenv %}
echo "${txtred}Loading python virtualenv ${txtrst}: {{ comm.virtualenv }}"
. {{ comm.virtualenv }}/bin/activate
{% endif %}

{%- for p in comm.path %}
echo "${txtpur}In path:${txtrst} {{ p }}"
PATH="{{ p }}:$PATH"
{% endfor %}

{%- for p in comm.module %}
module load {{ m }}
{% endfor %}
