type: map mapping:

layout:
    type: str
    required: true
    enum:
        - tutorial_hands_on
    description: |
        This must be set to `tutorial_hands_on`
title:
    type: str
    required: true
    description: |
        Title of the tutorial (it will appear on the tutorial page and the topic page)
    examples:
        - Clustering in Machine Learning
        - Breve introducción a Galaxy - en español
        - Pangeo ecosystem 101 for everyone - Introduction to Xarray Galaxy Tools
questions:
    type: seq
    sequence:
        - type: str
          required: true
    description: |
        list of questions that will be addressed in the tutorial
    examples:
        - How does Genome assembly work?
        - How do I change Galaxy configs?
        - How to detect and quantify differentially abundant proteins in a HEK-Ecoli Benchmark DIA datatset?
        - What kinds of data do programs store?
objectives:
    type: seq
    sequence:
        - type: str
          required: true
    description: |
        list of learning objectives for the tutorial

        A learning objective is a single sentence describing what a learner will be able to do once they have done the tutorial. Generally it is best to follow a 2C or 3C learning objective such as:

        - Compute (Skill)
        - multiple whole genome assemblies (Objective)
        - in such a way to develop big data processing skills (Result)
    examples:
        - Understand the basic concepts behind phylogenetic trees, as applied to *Mycobacterium tuberculosis*
        - Explore Biodiversity data with taxonomic, temporal and geographical informations
        - Generate a DotPlot emulating the original paper using a different analysis tool
key_points:
    type: seq
    sequence:
        - type: str
          required: true
    description: |
        List of take-home messages. This information will appear at the end
        of the tutorial. These should really be a key point, something that
        should stick in their mind; what you want them to take home from
        the tutorial.
    examples:
        - Pangeo ecosystem enables big data analysis in geosciences
        - "The MiModD suite of tools bundles most of the functionality required to perform mapping-by-sequencing analyses with Galaxy"
        - It can drastically simplify management of large numbers of VMs
edam_ontology:
    type: seq
    sequence:
      - type: str
        pattern: /^topic_[0-9]+$/
        description: |
            An edam ontology id that describes the resource
        examples:
            - topic_3173
gitter:
    type: str
    description: |
        Link to a gitter channel that is more relevant for the tutorial than the default. E.g. a single cell tutorial could use `Galaxy-Training-Network/galaxy-single-cell` to link to their specific chat room.
    examples:
        - Galaxy-Training-Network/galaxy-single-cell
        - galaxy-genome-annotation/Lobby
contributors:
    type: seq
    sequence:
        - type: str
          required: true
          enum:
          - CONTRIBUTORS
          - FUNDERS
          - ORGANISATIONS
    description: |
        List of tutorial contributors. Please use `contributions` instead as it provides more detailed accounting of tutorial history.
    examples:
        - hexylena
        - shiltemann
contributions:
    required: true
    description: |
        List of tutorial contributors. Here we break them down into several broad categories to help contributors identify how they contributed to a specific tutorial.
    examples: |
        contributions:
            authorship:
                - shiltemann
                - bebatut
            editing:
                - hexylena
                - bebatut
                - natefoo
            testing:
                - bebatut
            infrastructure:
                - natefoo
            translation:
                - shiltemann
            funding:
                - gallantries
    type: map
    mapping:
        authorship:
            description: These entities wrote the bulk of the training material, they may have done the analysis, built the workflow, and wrote the text themselves.
            type: seq
            sequence:
            - type: str
              enum:
              - CONTRIBUTORS
              - ORGANISATIONS
        editing:
            type: seq
            description: These entities edited the text, either for spelling and grammar, flow, GTN-fit, or other similar editing categories
            sequence:
            - type: str
              enum:
              - CONTRIBUTORS
              - ORGANISATIONS
        testing:
            type: seq
            description: These entities tested the tutorial to ensure it works correctly for students, or reported issues with the tutorial.
            sequence:
            - type: str
              enum:
              - CONTRIBUTORS
              - ORGANISATIONS
        ux:
            type: seq
            description: These entities contributed UX or Design improvements to this tutorial or the GTN as a whole
            sequence:
            - type: str
              enum:
              - CONTRIBUTORS
              - ORGANISATIONS
        infrastructure:
            type: seq
            description: These entities managed and provided infrastructure to the GTN or for training purposes
            sequence:
            - type: str
              enum:
              - CONTRIBUTORS
              - ORGANISATIONS
              - FUNDERS
        funding:
            type: seq
            description: These entities provided funding support for the development of this resource
            sequence:
            - type: str
              enum:
              - ORGANISATIONS
              - FUNDERS
        translation:
            type: seq
            description: These entities did translation and localisation work on this resource
            sequence:
            - type: str
              enum:
              - CONTRIBUTORS
              - ORGANISATIONS
subtopic:
    type: str
    description: |
        if the topic has [multiple subtopics defined](/training-material/topics/contributing/tutorials/create-new-topic/tutorial.html#adapt-the-metadata-for-your-topic), you can assign your tutorial to one of those subtopics here. Without this, the tutorial will appear in the "Other tutorials" section on the topic page.
    examples:
        - single-cell
priority:
    type: int
    description: |
        This field allows ordering tutorials within the tutorial list. Tutorials with lower numbered priority come before tutorials with higher numbers.
    examples: 1
zenodo_link:
    type: str
    description: |
        link on Zenodo to the input data for the tutorial
    examples:
        - "https://zenodo.org/record/3706539"
    pattern: /(^$|^https://zenodo.org/records?/[0-9]+/?$|^https://doi.org/10.5281/zenodo.[0-9]+/?$)/
extra:
    type: map
    description: |
        Any additional variables you want to set on the page
    mapping:
      '=': {}
tags:
    type: seq
    sequence:
        - type: str
          required: true
    description: |
        A free form list of tags that are relevant for your tutorial.
    examples:
        - covid-19
        - git-gat
translations:
    type: seq
    sequence:
        - type: str
          required: true
    description: |
        If alternative translations of a material are available, then use this key to indicate which languages have been manually translated.
    examples:
        - en
abbreviations:
    type: map
    mapping:
        "=":
            type: str
            description: |
                The expansion of the abbreviated term.
    description: |
        A dictionary of abbreviations and their expansions.
    examples: |
        abbreviations:
            SQL: Structured Query Language
            API: Application Programming Interface
galaxy_version:
    type: float
    description: |
        Currently unused.
level:
    type: str
    enum:
        - Introductory
        - Intermediate
        - Advanced
    description: |
        Here give a feeling of what level the material is at.
time_estimation:
    type: str
    required: true
    pattern: /^(?:([0-9]*)[Hh])*(?:([0-9]*)[Mm])*(?:([0-9.]*)[Ss])*$/
    description: |
        An estimation of the time needed to complete the hands-on.
    examples:
        - 10M
        - 1H30M
redirect_from:
    type: seq
    sequence:
        - type: str
    description: |
        If a tutorial is renamed to a new location, use this field to list prior locations from which this tutorial was accessible.
    examples:
    - /topics/sequence-analysis/tutorials/de-novo-rad-seq/tutorial
notebook:
    type: map
    examples: |
        notebook:
            language: python
            pyolite: true

        notebook:
            language: python
            snippet: topics/climate/tutorials/pangeo-notebook/preamble.md
    mapping:
        snippet:
            type: str
            description: |
                If you have an alternative preamble for your notebook that students should know before following (e.g. they must load X datasets in their history), it can be listed here.

                This text will be shown in the GTN tutorial, but it will **not** be included in the notebook, giving you a bit better control over mixing setup content which is relevant for Galaxy, with notebook content that can be easy to run for students.
            examples:
                - topics/climate/tutorials/pangeo-notebook/preamble.md
        pyolite:
            type: bool
            description: |
                The GTN has support for JupyterLite and the Pyodide kernel which runs [Python in the browser via webassembly/javascript](https://pyodide.org/en/stable/). This comes with some restrictions:

                - Python only
                - No filesystem access (so no `wget` prep steps)
                - Little to no cell magic

                However, it means we can run a lot of our Python training
                directly in the GTN! And in the future, hopefully, we will
                be able to embed individual cells of the notebook directly
                in the Python training, so the user doesn't even need to
                switch pages.

                Enabling this field will enable pyolite links for this notebook.
        language:
            type: str
            required: true
            enum:
                - python
                - bash
                - r
                - sql
        packages:
            type: seq
            description: |
              A list of packages that must be installed before running this tutorial. This value is not currently used, but might be in the future.
            required: false
            examples:
              - tidyverse
            sequence:
              - type: str
                required: true
lang:
    type: str
    enum:
        - es
        - en
        - fr
    description: |
        The document language.
voice:
    type: map
    description: |
        For materials which are automatically converted into videos via the available mechanisms, this field declares which voice should be used. If this field is not declared, a random voice will be chosen from a list of the best available voices from AWS Polly.
    mapping:
        id:
            type: str
            required: true
        lang:
            type: str
            required: true
        neural:
            type: bool
            required: true
    examples: |
        voice:
            id: Lupe
            lang: es-US
            neural: true
follow_up_training:
    type: seq
    description: list of resources that the reader of the material could follow at the end of the tutorial
    examples:
        - |
            type: internal
            topic_name: statistics
            tutorials:
                - age-prediction-with-ml
        - |
            type: external
            title: The Unix Shell
            link: "http://swcarpentry.github.io/shell-novice/"
        - |
            type: none
            title: "A VM with at least 2 vCPUs and 4 GB RAM, preferably running Ubuntu 18.04 - 20.04."
    sequence:
        - type: map
          required: true
          mapping:
              type:
                  type: str
                  required: true
                  enum:
                      - internal
                      - external
                      - none
                  description: |
                    the type of link
              topic_name:
                  type: str
                  description: |
                    [Internal Only] The name of the topic
              tutorials:
                  type: seq
                  sequence:
                      - type: str
                  description: |
                      [Internal Only] List of required tutorials inside that topic
              title:
                  type: str
                  description: |
                    Title of the external resource
              link:
                  type: str
                  description: |
                    URL of the external resource
requirements:
    type: seq
    description: List of resources that the reader of the material should be familiar with before starting this training. The structure is identical to `follow_up_training`.
    examples:
        - |
            type: internal
            topic_name: statistics
            tutorials:
                - age-prediction-with-ml
        - |
            type: external
            title: The Unix Shell
            link: "http://swcarpentry.github.io/shell-novice/"
        - |
            type: none
            title: "A VM with at least 2 vCPUs and 4 GB RAM, preferably running Ubuntu 18.04 - 20.04."
    sequence:
        - type: map
          required: true
          mapping:
              type:
                  type: str
                  required: true
                  enum:
                      - internal
                      - external
                      - none
                  description: |
                    the type of link
              topic_name:
                  type: str
                  description: |
                    [Internal Only] The name of the topic
              tutorials:
                  type: seq
                  sequence:
                      - type: str
                  description: |
                      [Internal Only] List of required tutorials inside that topic
              title:
                  type: str
                  description: |
                    Title of the external resource
              link:
                  type: str
                  description: |
                    URL of the external resource
copyright:
    type: str
    description: |
      A copyright attribution string, as required by some licenses.
    examples:
        - © Copyright 2021-2023 University of Technology Sydney, The University of Manchester UK and RO-Crate contributors
license:
    type: str
    description: |
        An [SPDX](https://spdx.org/) identifier for the alternative license that is used for that particular material. This is **only** relevant for materials which have been imported from an external source and were originally licensed under another license. For new materials we strongly encourage contributors to not use this key as materials are CC-BY, by default.
    examples:
        - MIT
        - Apache-2.0
draft:
    type: bool
    description: |
        `true` to hide your tutorial from the topic page (optional). This is useful if you need a tutorial for a workshop, but have not finished making it up to GTN standards.
og_image:
    type: str
    description: |
        A custom image to show on the link preview in external applications (e.g. when the URL is pasted into Twitter)
    pattern: /^\/.*/
    examples:
        - /assets/images/gat.png
hands_on:
    type: str
    enum:
        - external
    description: |
        This must be set to `external` to link to an external tutorial
hands_on_url:
    type: str
    description: |
        link to the external tutorial
    examples:
        - "https://docs.qiime2.org/jupyterbooks/cancer-microbiome-intervention-tutorial/index.html#"