-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
While playing around with cookiecutter I made a 'local' profile. I'm not sure about how useful it is, but since I made it, why not let you decide:
cookiecutter.json
{
"profile_name": null,
"cores": null,
"resources": "",
"config": "",
"conda": ["True", "False"],
"singularity": ["True", "False"],
"keep_going": ["True", "False"],
"additional": ""
}
{{cookiecutter.profile_name}}/config.yaml
# execution
cores: {{cookiecutter.cores}}
{% if cookiecutter.resources|length -%}
resources:
{%- for keyval in cookiecutter.resources.replace(' ', '').split(',') -%}
{% set key, value = keyval.replace(':', '=').split('=') %}
- {{key}}: {{value}}
{%- endfor %}
{%- endif %}
{% if cookiecutter.config|length -%}
config:
{%- for keyval in cookiecutter.config.replace(' ', '').split(',') -%}
{% set key, value = keyval.replace(':', '=').split('=') %}
- {{key}}: {{value}}
{%- endfor %}
{%- endif %}
keep-going: {{cookiecutter.keep_going}}
# environment
use-conda: {{cookiecutter.conda}}
use-singularity: {{cookiecutter.singularity}}
{% if cookiecutter.additional|length -%}
# additional options
{%- for keyval in cookiecutter.additional.replace(' ', '').split(',') -%}
{% set key, value = keyval.replace(':', '=').split('=') %}
{{key}}: {{value}}
{%- endfor %}
{%- endif %}
example result:
# execution
cores: 46
resources:
- parallel_downloads: 1
- mem_gb: 64
config:
- ascp_path: $HOME/.aspera/connect/bin/ascp
- ascp_key: $HOME/.aspera/connect/etc/asperaweb_id_dsa.openssh
keep-going: True
# environment
use-conda: True
use-singularity: False
# additional options
force: True
summary: True
Metadata
Metadata
Assignees
Labels
No labels