Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local/non-cluster profile #14

Open
Maarten-vd-Sande opened this issue Aug 7, 2019 · 0 comments
Open

local/non-cluster profile #14

Maarten-vd-Sande opened this issue Aug 7, 2019 · 0 comments

Comments

@Maarten-vd-Sande
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant