-
Notifications
You must be signed in to change notification settings - Fork 3
Developer Guide
Emma Hogan edited this page Jan 30, 2024
·
33 revisions
- All files must start with the following two comments, where
<year>is either<year_of_first_publication>or<year_of_first_publication>-<year_of_last_modification>:# (C) British Crown Copyright <year>, Met Office. # Please see LICENSE for license details. - Use f-strings
The Cylc: Workflow Design Guide must be followed to ensure CMEW is clear, maintainable, and portable.
Use the following flow diagram to determine where an environment variable should be defined:
---
title: Where should my environment variable be defined?
---
flowchart TB
question_multiple1{"
Is the environmental
variable used by multiple
tasks?
"}
question_multiple2{"
Is the environmental
variable used by multiple
tasks?
"}
question_override{"
Should it be possible to
override the environmental
variable, either by the user
or for testing purposes?
"}
output_global_override["
Define the environmental
variable in the
'rose-suite.conf' file
"]
output_app_override["
Define the environmental
variable in the 'env'
section in the
'rose-app.conf' file
"]
output_global["
Define the environmental
variable in the
'root:environment' section
in the 'flow.cylc' file
"]
output_app["
Define the environmental
variable in the
'(taskname):environment'
section in the
'flow.cylc' file
"]
question_override --Yes--> question_multiple1 --Yes--> output_global_override
question_multiple1 --No--> output_app_override
question_override --No--> question_multiple2 --Yes--> output_global
question_multiple2 --No--> output_app