diff --git a/CHANGES.md b/CHANGES.md index 7b5489a2..61b1558a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,12 @@ creating a new release entry be sure to copy & paste the span tag with the updated. Only the first match gets replaced, so it's fine to leave the old ones in. --> +## __cylc-rose-1.3.1 (Upcoming)__ + +### Fixes + +[#248](https://github.com/cylc/cylc-rose/pull/248) - Make sure that rose stem sets variables in `[jinja2:suite.rc]` not `[jinja2]`. + ## __cylc-rose-1.3.0 (Released 2023-07-21)__ ### Fixes diff --git a/cylc/rose/stem.py b/cylc/rose/stem.py index a5c2b494..2d107739 100644 --- a/cylc/rose/stem.py +++ b/cylc/rose/stem.py @@ -453,7 +453,7 @@ def process(self): # Get the name of the template section to be used: template_type = get_rose_vars( Path(url) / "rose-stem")["templating_detected"] - self.template_section = f'[{template_type}]' + self.template_section = f'[{template_type}:suite.rc]' # Versions of variables with hostname prepended for working copies url_host = self._prepend_localhost(url) diff --git a/tests/unit/test_rose_stem_units.py b/tests/unit/test_rose_stem_units.py index 3f0d868f..dbf787c1 100644 --- a/tests/unit/test_rose_stem_units.py +++ b/tests/unit/test_rose_stem_units.py @@ -22,11 +22,12 @@ from types import SimpleNamespace from cylc.rose.stem import ( + _get_rose_stem_opts, ProjectNotFoundException, RoseStemVersionException, RoseSuiteConfNotFoundException, StemRunner, - get_source_opt_from_args + get_source_opt_from_args, ) from metomi.rose.reporter import Reporter @@ -291,3 +292,31 @@ def test__deduce_mirror(): } project = 'someproject' StemRunner._deduce_mirror(source_dict, project) + + +def test_process_template_engine_set_correctly(monkeypatch): + """Defines are correctly assigned a [