diff --git a/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/workflow.rst b/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/workflow.rst index 9ac2129a1d..759101436b 100644 --- a/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/workflow.rst +++ b/esmvaltool/utils/recipe_test_workflow/doc/source/user_guide/workflow.rst @@ -30,15 +30,14 @@ The |RTW| performs the following steps: ``configure`` :Description: - Creates and modifies the |ESMValTool| user configuration file + Creates the |ESMValTool| user configuration file :Runs on: Localhost :Executes: The ``configure.py`` script from the |Rose| app :Details: - ``configure`` should run at the start of each cycle after ``clone_latest_esmval`` - has completed; in the case where the next cycle doesn't happen for a week, - the clone could potentially be out of date by the time of the task trigger. + ``configure`` should run at the start of each cycle after + ``install_env_file`` has completed. ``process`` :Description: diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py index f6542d1f81..61dc67cc21 100755 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/app/configure/bin/configure.py @@ -4,29 +4,20 @@ import pprint import yaml -from esmvalcore.config._config_object import Config - -import esmvaltool def main(): """Write the required user configuration file for ESMValTool. - The default configuration values from the latest version of - ESMValTool are updated with the configuration values defined in the - environment for the ``configure`` task and the result is written to - the file defined by ``USER_CONFIG_PATH`` in the ``flow.cylc`` file. + The configuration values defined in the environment for the + ``configure`` task are written to the configuration file defined + by ``USER_CONFIG_PATH`` in the ``flow.cylc`` file. """ - # Get the default configuration values from the latest version of - # ESMValTool. - config_values = get_latest_default_conf_vals() - # Get the configuration values defined in the environment for the # 'configure' task. - config_values_from_task_env = get_config_values_from_task_env() + config_values = get_config_values_from_task_env() - # Update the default configuration values. - config_values.update(config_values_from_task_env) + # Update the configuration from OS environment. user_config_path = os.environ["USER_CONFIG_PATH"] config_values["config_file"] = user_config_path @@ -38,30 +29,6 @@ def main(): write_yaml(user_config_path, config_values) -def get_latest_default_conf_vals(): - """Return the default configuration values from the latest version of - ESMValTool.""" - latest_esmvaltool_dir = os.environ["ESMVALTOOL_DIR"] - default_config_file = os.path.join(latest_esmvaltool_dir, - "config-user-example.yml") - # A dictionary is needed here to avoid the config object from - # converting paths to 'PosixPath' objects, which causes issues when - # writing the YAML file. - config_values = dict(Config._load_user_config(default_config_file)) - - # Update the type of the value of 'config_developer_file' from a - # 'PosixPath' object to a string, to avoid issues when writing the - # YAML file (all other paths will be overwritten). - config_developer_file = str(config_values["config_developer_file"]) - config_values["config_developer_file"] = config_developer_file - - print("Default configuration values from the latest version of ESMValTool " - f"{esmvaltool.__version__} (from '{default_config_file}'): ") - pprint.PrettyPrinter().pprint(config_values) - - return config_values - - def get_config_values_from_task_env(): """Return the configuration values defined in the environment for the ``configure`` task.""" diff --git a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc index 351f71b0c8..06cd7fb3d3 100644 --- a/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc +++ b/esmvaltool/utils/recipe_test_workflow/recipe_test_workflow/flow.cylc @@ -11,9 +11,9 @@ initial cycle point = 1 final cycle point = 10 [[graph]] - R1 = """install_env_file => clone_latest_esmval => configure - configure => process => compare - configure => process => compare""" + R1 = """install_env_file => configure & clone_latest_esmval + configure & clone_latest_esmval => process => compare + configure & clone_latest_esmval => process => compare""" [runtime] [[root]]