From 183d0f800ab63733ac14b5ecfccac847755cc07d Mon Sep 17 00:00:00 2001 From: Sebastian Weigand Date: Sun, 29 Aug 2021 16:17:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fixed=20wrong=20value=20for=20mo?= =?UTF-8?q?del=20spec=20deprecation=20and=20spectral=20model=20(#795)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The spectral model (type) freshly added in v0.4 was then called spectral-model. --- glotaran/deprecation/modules/builtin_io_yml.py | 4 ++-- glotaran/deprecation/modules/test/test_builtin_io_yml.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glotaran/deprecation/modules/builtin_io_yml.py b/glotaran/deprecation/modules/builtin_io_yml.py index 0a3aa99dc..0bc5c59df 100644 --- a/glotaran/deprecation/modules/builtin_io_yml.py +++ b/glotaran/deprecation/modules/builtin_io_yml.py @@ -30,10 +30,10 @@ def model_spec_deprecations(spec: MutableMapping[Any, Any]) -> None: deprecate_dict_entry( dict_to_check=spec, - deprecated_usage="type: spectrum", + deprecated_usage="type: spectral-model", new_usage="default-megacomplex: spectral", to_be_removed_in_version="0.7.0", - replace_rules=({"type": "spectrum"}, {"default-megacomplex": "spectral"}), + replace_rules=({"type": "spectral-model"}, {"default-megacomplex": "spectral"}), stacklevel=load_model_stack_level, ) diff --git a/glotaran/deprecation/modules/test/test_builtin_io_yml.py b/glotaran/deprecation/modules/test/test_builtin_io_yml.py index 8cf03f510..873230366 100644 --- a/glotaran/deprecation/modules/test/test_builtin_io_yml.py +++ b/glotaran/deprecation/modules/test/test_builtin_io_yml.py @@ -19,7 +19,7 @@ "model_yml_str, expected_nr_of_warnings, expected_key, expected_value", ( ("type: kinetic-spectrum", 1, "default-megacomplex", "decay"), - ("type: spectrum", 1, "default-megacomplex", "spectral"), + ("type: spectral-model", 1, "default-megacomplex", "spectral"), ( dedent( """