Skip to content

local/non-cluster profile #14

Description

@Maarten-vd-Sande

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions