Skip to content

Commit 7fc59e2

Browse files
committed
Add code outline to architecture docs
1 parent e94a157 commit 7fc59e2

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

docs/source/contributing/architecture.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,67 @@ metplus_point_stat
133133
~~~~~~~~~~~~~~~~~~
134134

135135
These apps are not currently used, but aim to integrate METplus in the workflow.
136+
137+
Code outline
138+
------------
139+
140+
The code of CSET lives in the ``src/CSET/`` directory, arranged as follows:
141+
142+
src/CSET
143+
~~~~~~~~
144+
145+
.. code-block:: text
146+
147+
src/CSET
148+
├── cset_workflow # Detailed below for clarity.
149+
├── operators
150+
│   ├── __init__.py # Code for executing ("baking") recipes.
151+
│   ├── _colorbar_definition.json # Default colourbar definitions.
152+
│   ├── _plot_page_template.html # Template for diagnostic output page.
153+
│   ├── _stash_to_lfric.py # Mapping between STASH codes and LFRic variable names.
154+
│   ├── _utils.py # Common utility code for operators.
155+
│   └── ... # Then lots of operators, as described above.
156+
├── recipes
157+
│   ├── loaders
158+
│   │   ├── __init__.py # Imports all loaders to make available to the rest of CSET.
159+
│   │   └── ... # Then lots of loaders, as described above.
160+
│   ├── __init__.py # Code for parbaking recipes.
161+
│   └── ... # Then lots of recipes, as described above.
162+
├── __init__.py # CLI entrypoint. Sets up logging, parses arguments, etc.
163+
├── __main__.py # Allows running `python -m CSET`.
164+
├── _common.py # Common utility code.
165+
├── extract_workflow.py # Implementation of `cset extract-workflow`.
166+
└── graph.py # Implementation of `cset graph`.
167+
168+
src/CSET/cset_workflow
169+
~~~~~~~~~~~~~~~~~~~~~~
170+
171+
.. code-block:: text
172+
173+
src/CSET/cset_workflow
174+
├── app # Contains the rose apps described above.
175+
│   ├── assign_model_colours
176+
│   │   ├── bin
177+
│   │   │   └── assign_model_colours.py # Executable for app.
178+
│   │   └── rose-app.conf # Rose app configuration. Mostly sets the executable.
179+
│   └── ... # Lots more rose apps in here.
180+
├── bin # Files in bin are automatically on the workflow's PATH.
181+
│   └── app_env_wrapper # Wrapper script to run things in the conda environment.
182+
├── includes # Deprecated; Use loaders instead now.
183+
├── lib # Available for import into cylc's jinja2 templating.
184+
│   └── python
185+
│   └── jinja_utils.py # A couple helper functions used in flow.cylc.
186+
├── meta # Validation and GUI layout for user configuration in rose-suite.conf.
187+
│   ├── diagnostics
188+
│   │   └── rose-meta.conf # Diagnostic configuration.
189+
│   ├── rose-meta.conf # Automatically generated file, don't edit.
190+
│   └── rose-meta.conf.jinja2 # Workflow configuration.
191+
├── opt # Pre-made configurations for consistent evaluation.
192+
│   └── rose-suite-RAL3LFRIC.conf
193+
├── site # Site-specific cylc configuration.
194+
│   └── localhost.cylc
195+
├── flow.cylc # The main workflow definition detailing what and how tasks are run.
196+
├── install_restricted_files.sh # Script for installing site-specific files.
197+
├── README.md
198+
├── rose-suite.conf # User configuration of workflow and diagnostics.
199+
└── rose-suite.conf.example # Blank user configuration to be copied.

0 commit comments

Comments
 (0)