Skip to content

Commit

Permalink
fix(api): corrected minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdiwahada committed Jan 8, 2025
1 parent 8422f37 commit d0dc243
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/antares/craft/service/local_services/link_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def sort_link_properties_dict(ini_dict: Dict[str, str]) -> Dict[str, str]:
"display-comments",
"filter-synthesis",
"filter-year-by-year",
"comments",
]
return dict(sorted(ini_dict.items(), key=lambda item: dict_order.index(item[0])))

Expand Down
9 changes: 9 additions & 0 deletions tests/antares/services/local_services/test_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,7 @@ def test_create_link_sets_ini_content(self, tmp_path, local_study_w_areas):
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
"""

Expand Down Expand Up @@ -1717,6 +1718,7 @@ def test_created_link_has_default_local_properties(self, tmp_path, local_study_w
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
"""
expected_ini = ConfigParser()
Expand Down Expand Up @@ -1765,6 +1767,7 @@ def test_created_link_has_custom_properties(self, tmp_path, local_study_w_areas)
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = daily, weekly
comments =
"""
expected_ini = ConfigParser()
Expand Down Expand Up @@ -1804,6 +1807,7 @@ def test_multiple_links_created_from_same_area(self, tmp_path, local_study_w_are
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
[it]
hurdles-cost = false
Expand All @@ -1819,6 +1823,7 @@ def test_multiple_links_created_from_same_area(self, tmp_path, local_study_w_are
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
"""
expected_ini = ConfigParser()
Expand Down Expand Up @@ -1861,6 +1866,7 @@ def test_multiple_links_created_from_same_area_are_alphabetical(self, tmp_path,
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
[it]
hurdles-cost = false
Expand All @@ -1876,6 +1882,7 @@ def test_multiple_links_created_from_same_area_are_alphabetical(self, tmp_path,
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
"""
expected_ini = ConfigParser()
Expand Down Expand Up @@ -1933,6 +1940,7 @@ def test_created_link_has_default_ui_values(self, tmp_path, local_study_w_areas)
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
"""
expected_ini = ConfigParser()
Expand Down Expand Up @@ -1970,6 +1978,7 @@ def test_created_link_with_custom_ui_values(self, tmp_path, local_study_w_areas)
display-comments = true
filter-synthesis = hourly, weekly, monthly
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
"""
expected_ini = ConfigParser()
Expand Down

0 comments on commit d0dc243

Please sign in to comment.