.. _tutorials/project/project: ============================= Creating a New SIERRA Project ============================= .. IMPORTANT:: There are several :xref:`sample projects ENGINE : "stage 1, 2, 3, 4, 5" CORE --> EXECENV : "stage 1, 2" CORE --> PROJECT : "stage 1, 3, 4" ENGINE <.. PROJECT : "built against\n(not portable)" @enduml Steps ===== #. Create the directory which will hold your :term:`Project`. The directory *containing* your project (i.e., it's parent directoly) must be on :envvar:`SIERRA_PLUGIN_PATH` or SIERRA won't be able to find your project. For example, if your project is ``fizzbuzz.awesome``, and that directory is in ``projects`` as ``/path/to/projects/fizzbuzz.awesome``, then some subpath of ``/path/to/projects`` needs to be on :envvar:`SIERRA_PLUGIN_PATH`. #. Create the following directory structure within your project directory (or copy and modify the one from an existing project, such as the SIERRA sample projects). - ``config/`` - Plugin YAML configuration root. This directory is required for all projects. Within this directory, the following files are used (not all files are required when running a stage that utilizes them): .. tab-set:: .. tab-item:: ``main.yaml`` Main SIERRA configuration file. This file is required for all pipeline stages. See :ref:`tutorials/project/config` for documentation. .. tab-item:: ``controllers.yaml`` Configuration for controllers (input file/graph generation). This file is required for all pipeline stages. See :ref:`tutorials/project/config` for documentation. .. tab-item:: ``graphs.yaml`` Configuration for graph generation. This file is optional. Used by multiple plugins. An incomplete list: - :ref:`plugins/prod/graphs`, - :ref:`plugins/compare/graphs` - :ref:`plugins/prod/render` .. tab-item:: ``models.yaml`` Configuration for intra- and inter-experiment models. This file is optional. If it is present, models defined in it will be run in stage 3. See :ref:`plugins/proc/modelrunner` for documentation. - ``generators/`` - Classes to enable SIERRA to generate changes to template expdef files needed by your project. This directory is required for all SIERRA projects. .. tab-set:: .. tab-item:: ``scenario.py`` Specifies classes and functions to enable SIERRA to generate expdef file modifications to the :ref:`--expdef-template` based on what is passed pas ``--scenario`` on the cmdline. Contains the parser for parsing the contents of ``--scenario`` into a dictionary which can be used to configure experiments. This file is required. See :ref:`tutorials/project/generators/scenario` for documentation. .. tab-item:: ``experiment.py`` Contains extensions to the per-:term:`Experiment` and per-:term:`Experimental Run` configuration that SIERRA performs. See :ref:`tutorials/project/generators/exp` for documentation. This file is optional. - ``variables/`` - Additional variables (including batch criteria) defined by the plugin/project that can be directly or indirectly used by the :ref:`--batch-criteria` and ``--scenario`` cmdline arguments. This directory is optional. - ``cmdline.py`` - Specifies cmdline extensions specific to the plugin/project. This file is required, because all projects have to define the ``--controller`` and ``--scenario`` arguments used by SIERRA. See :ref:`tutorials/plugins/devguide/cmdline` for steps. - ``project.py`` - Magic cookie python file that tells SIERRA that the enclosing directory is a project plugin. #. Configure your project so SIERRA understands how to generate :term:`Experimental Run` inputs and process outputs correctly by following :ref:`tutorials/project/config`. #. Define graphs to be generated from :term:`Experiment` outputs by following :ref:`plugins/prod/graphs`. Strictly speaking this is optional, but automated graph generation during stage 4 is one of the most useful parts of SIERRA, so its kind of silly if you don't do this. #. Setup your :ref:`--expdef-template` appropriately by following :ref:`user-guide/experiment-templates`. Optional Steps ============== #. Define additional batch criteria to investigate variables of interest specific to your project by following :ref:`tutorials/project/new-bc`. #. Define one or more :term:`Models ` to run to compare with empirical data.