.. _files_generated_by_tut_script:

Files Generated by Tut Script
==============================
    
This section describes the output files from the :ref:`tut_script`, you can see examples in :ref:`simple_tut_example` and :ref:`builtin_tut_example`. 

After running a tutorial script, named 'my_tut_script.pyml', as follows:-

.. code-block:: console

    popy run my_tut_script.pyml

the output folder will contain four new scripts:-

.. code-block::

    my_tut_script.pyml_output/
        <tut_name>_gen.pyml
        <tut_name>_fit.pyml
        <tut_name>_comp.pyml
        <tut_name>_tutsum.pyml
    
Note the tutorial output folder name **my_tut_script.pyml_output** is derived from the tutorial script filename. However the generated script file names are based on the following entry:-

.. code-block:: pyml

    DESCRIPTION: {name: <tut_name>}

This naming convention for output folders and generated scripts is followed by all :ref:`script_formats` in |popy|.

Scripts and description names should be chosen with this in mind, |ie| short names without spaces are recommended. 
    
For a :ref:`tut_script` the four subscripts are run automatically, see :numref:`table_tut_script_sub_outputs` for links to the files generated by the tut subscripts, each in their own sub directories. 

.. _table_tut_script_sub_outputs:

.. list-table::
    :header-rows: 1
    
    * - Script
      - Outputs

    * - <tut_name>_gen.pyml
      - :ref:`files_generated_by_gen_script`

    * - <tut_name>_fit.pyml
      - :ref:`files_generated_by_fit_script`
      
    * - <tut_name>_comp.pyml
      - :ref:`files_generated_by_comp_script`
      
    * - <tut_name>_tutsum.pyml
      - :ref:`files_generated_by_tutsum_script`

If all four scripts execute then you will see a file structure like:-

.. code-block::

    my_tut_script.pyml_output/
        <tut_name>_gen.pyml_output/
        <tut_name>_fit.pyml_output/
        <tut_name>_comp.pyml_output/
        <tut_name>_tutsum.pyml_output/


