#!jinja2

title = "Matt Shin's 1000 task example with slow parsing"

description = """This suite motivated some optimization of config
parsing and task proxy definition, resulting in a speed up factor 
of 2 to 3 for suite validation."""

{% set N_TASKS = 1000 %}
{% set N_FAMS = 4 %}
{% set ITEMS = ["egg", "ham", "bacon", "sausage", "beans", "tomato", "chips", "mushrooms", "blackpudding"] %}
[scheduling]
    [[dependencies]]
    graph = """
{% for i in range(N_TASKS) %}
build => run{{ "%04d"|format(i) }}
{% endfor %}
"""
    [runtime]
        [[root]]
            script = "echo $CYLC_TASK_ID"
        [[FAM00]]
            inherit = root
            {% for i in range(1, N_FAMS) %}
        [[FAM{{ "%02d"|format(i) }}]]
            inherit = FAM{{ "%02d"|format(i - 1) }}
            [[[environment]]]
{% for j in range(10) %}
{% for item in ITEMS %}
{{ item|upper }}_{{ "%02d_%02d"|format(i, j) }} = "{{ item }} {{ "%02d %02d"|format(i, j) }}"
{% endfor %}
{% endfor %}
{% endfor %}
{% for i in range(N_TASKS) %}
        [[run{{ "%04d"|format(i) }}]]
            inherit = FAM{{ "%02d"|format(N_FAMS - 1) }}
{% endfor %} 
