{# Action list component #} {% set phase_labels = {"prep": "Prep", "script": "Experiment", "cleanup": "Clean up"} %} {# Steps that no longer line up with the deck that is loaded. The deck is edited independently of the workflows built on top of it, so a saved step can point at a module, method or parameter that has since changed. #} {% set compat = namespace(flagged=0, blocking=0, phases=[]) %} {% for phase, phase_buttons in (buttons_dict or {}).items() %} {% for entry in phase_buttons or [] %} {% if entry.get('issues') %} {% set compat.flagged = compat.flagged + 1 %} {% if entry['issues'] | selectattr('severity', 'equalto', 'error') | list %} {% set compat.blocking = compat.blocking + 1 %} {% endif %} {% if phase not in compat.phases %} {% set compat.phases = compat.phases + [phase] %} {% endif %} {% endif %} {% endfor %} {% endfor %} {% set deck_note = deck_compatibility_note(script) if deck_compatibility_note is defined else none %} {% if deck_note or compat.flagged %}
{% if deck_note %}{{ deck_note }}{% endif %} {% if compat.flagged %} {{ compat.flagged }} step{{ 's' if compat.flagged != 1 }} no longer match{{ '' if compat.flagged != 1 else 'es' }} the deck ({% for phase in compat.phases %}{{ phase_labels.get(phase, phase) }}{{ ', ' if not loop.last }}{% endfor %}). Hover the icon beside a step for the reason. {% endif %}
{% endif %}
{% include 'components/python_code_overlay.html' %}
{% if warning %} {% endif %}