Skip to content

Commit

Permalink
🩹 Fixed wrong value for model spec deprecation and spectral model (#795)
Browse files Browse the repository at this point in the history
The spectral model (type) freshly added in v0.4 was then called spectral-model.
  • Loading branch information
s-weigand authored and jsnel committed Sep 16, 2021
1 parent 77d3950 commit 183d0f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions glotaran/deprecation/modules/builtin_io_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
2 changes: 1 addition & 1 deletion glotaran/deprecation/modules/test/test_builtin_io_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
"""
Expand Down

0 comments on commit 183d0f8

Please sign in to comment.