From 836dce5edd029c905f2050e80b563c79c354e0c0 Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:43:24 +0000 Subject: [PATCH] #3826: Temporarily add CFG experiments --- .../utils/recipe_test_workflow/chris.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 esmvaltool/utils/recipe_test_workflow/chris.py diff --git a/esmvaltool/utils/recipe_test_workflow/chris.py b/esmvaltool/utils/recipe_test_workflow/chris.py new file mode 100644 index 0000000000..0c523934c0 --- /dev/null +++ b/esmvaltool/utils/recipe_test_workflow/chris.py @@ -0,0 +1,21 @@ +# Used esmvt-rtw env with my branch of ESMValCore installed per: +# https://docs.esmvaltool.org/en/latest/quickstart/installation.html#using-the-development-version-of-the-esmvalcore-package +import esmvalcore +from esmvalcore.config import CFG, Config, Session + +# Show I'm working and to be friendly +print("Hello Chris!") + +print("ESMValCore Version:", esmvalcore.__version__) + +# Generate an InvalidConfigParameter Error +# my_list = [1, 2, 3] +# CFG["config_file"] = my_list + +# Generate a Deprecation Warning +CFG["config_file"] = "not_a_dir_but_i_still_work" + +# Config file not present +print(CFG['config_file']) + +print(CFG.__dict__['_mapping'].keys())