Skip to content

Commit

Permalink
put back old values
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Feb 4, 2025
1 parent d0e30e2 commit 2d1c7c5
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions tests/antares/services/local_services/test_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ def test_local_study_has_settings(self, local_study):

def test_local_study_has_correct_default_general_properties(self, local_study):
expected_general_properties = GeneralParameters(**{
"mode": "economy",
"mode": "Economy",
"horizon": "",
"nb_years": 1,
"simulation_start": 1,
"simulation_end": 365,
"january_first": "monday",
"first_month_in_year": "january",
"first_week_day": "monday",
"january_first": "Monday",
"first_month_in_year": "January",
"first_week_day": "Monday",
"leap_year": False,
"year_by_year": False,
"building_mode": "automatic",
Expand Down Expand Up @@ -272,7 +272,7 @@ def test_local_study_has_correct_optimization_parameters(self, local_study):
"simplex_range": "week",
"transmission_capacities": "local-values",
"include_constraints": True,
"include_hurdle_costs": True,
"include_hurdlecosts": True,
"include_tc_minstablepower": True,
"include_tc_min_ud_time": True,
"include_dayahead": True,
Expand Down Expand Up @@ -1225,7 +1225,7 @@ def test_areas_sets_ini_content(self, tmp_path, local_study):
expected_sets_ini_content = """[all areas]
caption = All areas
comments = Spatial aggregates on all areas
output = False
output = false
apply-filter = add-all
"""
Expand Down Expand Up @@ -1289,9 +1289,9 @@ def test_area_optimization_ini_content(self, tmp_path, local_study):
expected_optimization_ini_path = study_antares_path / "input" / "areas" / "area1" / "optimization.ini"

expected_optimization_ini_content = """[nodal optimization]
non-dispatchable-power = True
dispatchable-hydro-power = True
other-dispatchable-power = True
non-dispatchable-power = true
dispatchable-hydro-power = true
other-dispatchable-power = true
spread-unsupplied-energy-cost = 0
spread-spilled-energy-cost = 0
Expand Down Expand Up @@ -1332,9 +1332,9 @@ def test_custom_area_optimization_ini_content(self, tmp_path, local_study):
tmp_path / local_study.name / "input/areas" / area_to_create / "optimization.ini"
)
expected_optimization_ini_content = """[nodal optimization]
non-dispatchable-power = True
dispatchable-hydro-power = False
other-dispatchable-power = True
non-dispatchable-power = true
dispatchable-hydro-power = false
other-dispatchable-power = true
spread-unsupplied-energy-cost = 0
spread-spilled-energy-cost = 0
Expand Down Expand Up @@ -1465,11 +1465,11 @@ def test_areas_have_default_properties(self, tmp_path, local_study_w_areas):
# Given
expected_default_properties = {
"nodal optimization": {
"non-dispatchable-power": "True",
"dispatchable-hydro-power": "True",
"other-dispatchable-power": "True",
"spread-unsupplied-energy-cost": "0",
"spread-spilled-energy-cost": "0",
"non-dispatchable-power": "true",
"dispatchable-hydro-power": "true",
"other-dispatchable-power": "true",
"spread-unsupplied-energy-cost": "0.000000",
"spread-spilled-energy-cost": "0.000000",
},
"filtering": {
"filter-synthesis": "hourly, daily, weekly, monthly, annual",
Expand All @@ -1495,11 +1495,11 @@ def test_areas_with_custom_properties(self, tmp_path, local_study):
)
expected_properties = {
"nodal optimization": {
"non-dispatchable-power": "True",
"dispatchable-hydro-power": "False",
"other-dispatchable-power": "True",
"non-dispatchable-power": "true",
"dispatchable-hydro-power": "false",
"other-dispatchable-power": "true",
"spread-unsupplied-energy-cost": "1.000000",
"spread-spilled-energy-cost": "0",
"spread-spilled-energy-cost": "0.000000",
},
"filtering": {
"filter-synthesis": "hourly, daily, weekly, monthly, annual",
Expand Down Expand Up @@ -1621,17 +1621,17 @@ def test_create_link_sets_ini_content(self, tmp_path, local_study_w_areas):
# Given
link_to_create = "fr_it"
expected_content = """[it]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
Expand All @@ -1656,17 +1656,17 @@ def test_created_link_has_default_local_properties(self, tmp_path, local_study_w
# Given
link_to_create = "fr_it"
expected_ini_content = """[it]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
Expand Down Expand Up @@ -1705,17 +1705,17 @@ def test_created_link_has_custom_properties(self, tmp_path, local_study_w_areas)
filter_year_by_year={FilterOption.WEEKLY, FilterOption.DAILY},
)
expected_ini_content = """[it]
hurdles-cost = False
loop-flow = True
use-phase-shifter = True
hurdles-cost = false
loop-flow = true
use-phase-shifter = true
transmission-capacities = infinite
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = daily, weekly
comments =
Expand Down Expand Up @@ -1745,33 +1745,33 @@ def test_multiple_links_created_from_same_area(self, tmp_path, local_study_w_are
local_study_w_areas.create_area("at")
links_to_create = ["fr_at", "at_it"]
expected_ini_string = """[fr]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
[it]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
Expand Down Expand Up @@ -1804,33 +1804,33 @@ def test_multiple_links_created_from_same_area_are_alphabetical(self, tmp_path,
local_study_w_areas.create_area("at")
links_to_create = ["at_it", "fr_at"]
expected_ini_string = """[fr]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
[it]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
Expand Down Expand Up @@ -1878,17 +1878,17 @@ def test_created_link_has_default_ui_values(self, tmp_path, local_study_w_areas)
actual_ini_file = tmp_path / local_study_w_areas.name / "input" / "links" / "fr" / "properties.ini"
actual_ini = ConfigParser()
expected_ini_string = """[it]
hurdles-cost = False
loop-flow = False
use-phase-shifter = False
hurdles-cost = false
loop-flow = false
use-phase-shifter = false
transmission-capacities = enabled
asset-type = ac
link-style = plain
link-width = 1
colorr = 112
colorg = 112
colorb = 112
display-comments = True
display-comments = true
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
Expand Down Expand Up @@ -1916,17 +1916,17 @@ def test_created_link_with_custom_ui_values(self, tmp_path, local_study_w_areas)
actual_ini_file = tmp_path / local_study_w_areas.name / "input" / "links" / "fr" / "properties.ini"
actual_ini = ConfigParser()
expected_ini_string = """[it]
hurdles-cost = True
loop-flow = False
use-phase-shifter = False
hurdles-cost = true
loop-flow = false
use-phase-shifter = false
transmission-capacities = ignore
asset-type = gaz
link-style = dot
link-width = 1
colorr = 234
colorg = 123
colorb = 0
display-comments = True
display-comments = true
filter-synthesis = hourly, weekly, monthly
filter-year-by-year = hourly, daily, weekly, monthly, annual
comments =
Expand Down Expand Up @@ -2014,7 +2014,7 @@ def test_constraints_ini_have_correct_default_content(
expected_ini_contents = """[0]
name = test constraint
id = test constraint
enabled = True
enabled = true
type = hourly
operator = less
filter-year-by-year = hourly
Expand Down Expand Up @@ -2049,7 +2049,7 @@ def test_constraints_and_ini_have_custom_properties(self, local_study_with_const
expected_ini_content = """[0]
name = test constraint
id = test constraint
enabled = True
enabled = true
type = hourly
operator = less
filter-year-by-year = hourly
Expand All @@ -2059,7 +2059,7 @@ def test_constraints_and_ini_have_custom_properties(self, local_study_with_const
[1]
name = test constraint two
id = test constraint two
enabled = False
enabled = false
type = weekly
operator = both
comments = test comment
Expand Down Expand Up @@ -2093,7 +2093,7 @@ def test_constraint_term_and_ini_have_correct_defaults(self, local_study_with_co
expected_ini_contents = """[0]
name = test constraint
id = test constraint
enabled = True
enabled = true
type = hourly
operator = less
filter-year-by-year = hourly
Expand All @@ -2117,13 +2117,13 @@ def test_constraint_term_with_offset_and_ini_have_correct_values(
expected_ini_contents = """[0]
name = test constraint
id = test constraint
enabled = True
enabled = true
type = hourly
operator = less
filter-year-by-year = hourly
filter-synthesis = hourly
group = default
at%fr = 0%1
at%fr = 0.000000%1
"""
# When
Expand Down

0 comments on commit 2d1c7c5

Please sign in to comment.