@@ -268,7 +268,7 @@ def location():
268268
269269@pytest .fixture
270270def weather ():
271- times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6H ' )
271+ times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6h ' )
272272 weather = pd .DataFrame ({'ghi' : [500 , 0 ], 'dni' : [800 , 0 ], 'dhi' : [100 , 0 ]},
273273 index = times )
274274 return weather
@@ -350,7 +350,7 @@ def test_with_pvwatts(pvwatts_dc_pvwatts_ac_system, location, weather):
350350
351351def test_run_model_with_irradiance (sapm_dc_snl_ac_system , location ):
352352 mc = ModelChain (sapm_dc_snl_ac_system , location )
353- times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6H ' )
353+ times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6h ' )
354354 irradiance = pd .DataFrame ({'dni' : 900 , 'ghi' : 600 , 'dhi' : 150 },
355355 index = times )
356356 ac = mc .run_model (irradiance ).results .ac
@@ -417,7 +417,7 @@ def test_run_model_from_irradiance_arrays_no_loss(
417417 spectral_model = 'no_loss' ,
418418 losses_model = 'no_loss'
419419 )
420- times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6H ' )
420+ times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6h ' )
421421 irradiance = pd .DataFrame ({'dni' : 900 , 'ghi' : 600 , 'dhi' : 150 },
422422 index = times )
423423 mc_one .run_model (irradiance )
@@ -457,7 +457,7 @@ def test_run_model_from_irradiance_arrays_no_loss_input_type(
457457 spectral_model = 'no_loss' ,
458458 losses_model = 'no_loss'
459459 )
460- times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6H ' )
460+ times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6h ' )
461461 irradiance = pd .DataFrame ({'dni' : 900 , 'ghi' : 600 , 'dhi' : 150 },
462462 index = times )
463463 mc_one .run_model (irradiance )
@@ -487,7 +487,7 @@ def test_ModelChain_invalid_inverter_params_arrays(
487487def test_prepare_inputs_multi_weather (
488488 sapm_dc_snl_ac_system_Array , location , input_type ):
489489 times = pd .date_range (start = '20160101 1200-0700' ,
490- end = '20160101 1800-0700' , freq = '6H ' )
490+ end = '20160101 1800-0700' , freq = '6h ' )
491491 mc = ModelChain (sapm_dc_snl_ac_system_Array , location )
492492 weather = pd .DataFrame ({'ghi' : 1 , 'dhi' : 1 , 'dni' : 1 },
493493 index = times )
@@ -502,7 +502,7 @@ def test_prepare_inputs_multi_weather(
502502def test_prepare_inputs_albedo_in_weather (
503503 sapm_dc_snl_ac_system_Array , location , input_type ):
504504 times = pd .date_range (start = '20160101 1200-0700' ,
505- end = '20160101 1800-0700' , freq = '6H ' )
505+ end = '20160101 1800-0700' , freq = '6h ' )
506506 mc = ModelChain (sapm_dc_snl_ac_system_Array , location )
507507 weather = pd .DataFrame ({'ghi' : 1 , 'dhi' : 1 , 'dni' : 1 , 'albedo' : 0.5 },
508508 index = times )
@@ -564,14 +564,14 @@ def test_ModelChain_times_error_arrays(sapm_dc_snl_ac_system_Array, location):
564564 error_str = r"Input DataFrames must have same index\."
565565 mc = ModelChain (sapm_dc_snl_ac_system_Array , location )
566566 irradiance = {'ghi' : [1 , 2 ], 'dhi' : [1 , 2 ], 'dni' : [1 , 2 ]}
567- times_one = pd .date_range (start = '1/1/2020' , freq = '6H ' , periods = 2 )
568- times_two = pd .date_range (start = '1/1/2020 00:15' , freq = '6H ' , periods = 2 )
567+ times_one = pd .date_range (start = '1/1/2020' , freq = '6h ' , periods = 2 )
568+ times_two = pd .date_range (start = '1/1/2020 00:15' , freq = '6h ' , periods = 2 )
569569 weather_one = pd .DataFrame (irradiance , index = times_one )
570570 weather_two = pd .DataFrame (irradiance , index = times_two )
571571 with pytest .raises (ValueError , match = error_str ):
572572 mc .prepare_inputs ((weather_one , weather_two ))
573573 # test with overlapping, but differently sized indices.
574- times_three = pd .date_range (start = '1/1/2020' , freq = '6H ' , periods = 3 )
574+ times_three = pd .date_range (start = '1/1/2020' , freq = '6h ' , periods = 3 )
575575 irradiance_three = irradiance
576576 irradiance_three ['ghi' ].append (3 )
577577 irradiance_three ['dhi' ].append (3 )
@@ -588,7 +588,7 @@ def test_ModelChain_times_arrays(sapm_dc_snl_ac_system_Array, location):
588588 mc = ModelChain (sapm_dc_snl_ac_system_Array , location )
589589 irradiance_one = {'ghi' : [1 , 2 ], 'dhi' : [1 , 2 ], 'dni' : [1 , 2 ]}
590590 irradiance_two = {'ghi' : [2 , 1 ], 'dhi' : [2 , 1 ], 'dni' : [2 , 1 ]}
591- times = pd .date_range (start = '1/1/2020' , freq = '6H ' , periods = 2 )
591+ times = pd .date_range (start = '1/1/2020' , freq = '6h ' , periods = 2 )
592592 weather_one = pd .DataFrame (irradiance_one , index = times )
593593 weather_two = pd .DataFrame (irradiance_two , index = times )
594594 mc .prepare_inputs ((weather_one , weather_two ))
@@ -617,7 +617,7 @@ def test_run_model_arrays_weather(sapm_dc_snl_ac_system_same_arrays,
617617 'pvwatts' : pvwatts_dc_pvwatts_ac_system_arrays }
618618 mc = ModelChain (system [ac_model ], location , aoi_model = 'no_loss' ,
619619 spectral_model = 'no_loss' )
620- times = pd .date_range ('20200101 1200-0700' , periods = 2 , freq = '2H ' )
620+ times = pd .date_range ('20200101 1200-0700' , periods = 2 , freq = '2h ' )
621621 weather_one = pd .DataFrame ({'dni' : [900 , 800 ],
622622 'ghi' : [600 , 500 ],
623623 'dhi' : [150 , 100 ]},
@@ -634,7 +634,7 @@ def test_run_model_arrays_weather(sapm_dc_snl_ac_system_same_arrays,
634634def test_run_model_perez (sapm_dc_snl_ac_system , location ):
635635 mc = ModelChain (sapm_dc_snl_ac_system , location ,
636636 transposition_model = 'perez' )
637- times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6H ' )
637+ times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6h ' )
638638 irradiance = pd .DataFrame ({'dni' : 900 , 'ghi' : 600 , 'dhi' : 150 },
639639 index = times )
640640 ac = mc .run_model (irradiance ).results .ac
@@ -648,7 +648,7 @@ def test_run_model_gueymard_perez(sapm_dc_snl_ac_system, location):
648648 mc = ModelChain (sapm_dc_snl_ac_system , location ,
649649 airmass_model = 'gueymard1993' ,
650650 transposition_model = 'perez' )
651- times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6H ' )
651+ times = pd .date_range ('20160101 1200-0700' , periods = 2 , freq = '6h ' )
652652 irradiance = pd .DataFrame ({'dni' : 900 , 'ghi' : 600 , 'dhi' : 150 },
653653 index = times )
654654 ac = mc .run_model (irradiance ).results .ac
@@ -812,7 +812,7 @@ def test_prepare_inputs_from_poa_arrays_different_indices(
812812 mc = ModelChain (sapm_dc_snl_ac_system_Array , location )
813813 poa = pd .concat ([weather , total_irrad ], axis = 1 )
814814 with pytest .raises (ValueError , match = error_str ):
815- mc .prepare_inputs_from_poa ((poa , poa .shift (periods = 1 , freq = '6H ' )))
815+ mc .prepare_inputs_from_poa ((poa , poa .shift (periods = 1 , freq = '6h ' )))
816816
817817
818818def test_prepare_inputs_from_poa_arrays_missing_column (
@@ -1078,7 +1078,7 @@ def test_run_model_from_effective_irradiance_arrays_error(
10781078 with pytest .raises (ValueError ,
10791079 match = r"Input DataFrames must have same index\." ):
10801080 mc .run_model_from_effective_irradiance (
1081- (data , data .shift (periods = 1 , freq = '6H ' ))
1081+ (data , data .shift (periods = 1 , freq = '6h ' ))
10821082 )
10831083
10841084
@@ -1790,7 +1790,7 @@ def test_ModelChain_no_extra_kwargs(sapm_dc_snl_ac_system, location):
17901790def test_basic_chain_alt_az (sam_data , cec_inverter_parameters ,
17911791 sapm_temperature_cs5p_220m ):
17921792 times = pd .date_range (start = '20160101 1200-0700' ,
1793- end = '20160101 1800-0700' , freq = '6H ' )
1793+ end = '20160101 1800-0700' , freq = '6h ' )
17941794 latitude = 32.2
17951795 longitude = - 111
17961796 surface_tilt = 0
@@ -1812,7 +1812,7 @@ def test_basic_chain_alt_az(sam_data, cec_inverter_parameters,
18121812def test_basic_chain_altitude_pressure (sam_data , cec_inverter_parameters ,
18131813 sapm_temperature_cs5p_220m ):
18141814 times = pd .date_range (start = '20160101 1200-0700' ,
1815- end = '20160101 1800-0700' , freq = '6H ' )
1815+ end = '20160101 1800-0700' , freq = '6h ' )
18161816 latitude = 32.2
18171817 longitude = - 111
18181818 altitude = 700
@@ -1847,7 +1847,7 @@ def test_basic_chain_altitude_pressure(sam_data, cec_inverter_parameters,
18471847def test_complete_irradiance_clean_run (sapm_dc_snl_ac_system , location ):
18481848 """The DataFrame should not change if all columns are passed"""
18491849 mc = ModelChain (sapm_dc_snl_ac_system , location )
1850- times = pd .date_range ('2010-07-05 9:00:00' , periods = 2 , freq = 'H ' )
1850+ times = pd .date_range ('2010-07-05 9:00:00' , periods = 2 , freq = 'h ' )
18511851 i = pd .DataFrame (
18521852 {'dni' : [2 , 3 ], 'dhi' : [4 , 6 ], 'ghi' : [9 , 5 ]}, index = times )
18531853
@@ -1864,7 +1864,7 @@ def test_complete_irradiance_clean_run(sapm_dc_snl_ac_system, location):
18641864def test_complete_irradiance (sapm_dc_snl_ac_system , location , mocker ):
18651865 """Check calculations"""
18661866 mc = ModelChain (sapm_dc_snl_ac_system , location )
1867- times = pd .date_range ('2010-07-05 7:00:00-0700' , periods = 2 , freq = 'H ' )
1867+ times = pd .date_range ('2010-07-05 7:00:00-0700' , periods = 2 , freq = 'h ' )
18681868 i = pd .DataFrame ({'dni' : [49.756966 , 62.153947 ],
18691869 'ghi' : [372.103976116 , 497.087579068 ],
18701870 'dhi' : [356.543700 , 465.44400 ]}, index = times )
@@ -1897,7 +1897,7 @@ def test_complete_irradiance_arrays(
18971897 sapm_dc_snl_ac_system_same_arrays , location , input_type ):
18981898 """ModelChain.complete_irradiance can accept a tuple of weather
18991899 DataFrames."""
1900- times = pd .date_range (start = '2020-01-01 0700-0700' , periods = 2 , freq = 'H ' )
1900+ times = pd .date_range (start = '2020-01-01 0700-0700' , periods = 2 , freq = 'h ' )
19011901 weather = pd .DataFrame ({'dni' : [2 , 3 ],
19021902 'dhi' : [4 , 6 ],
19031903 'ghi' : [9 , 5 ]}, index = times )
@@ -1932,7 +1932,7 @@ def test_complete_irradiance_arrays(
19321932def test_complete_irradiance_arrays_wrong_length (
19331933 sapm_dc_snl_ac_system_same_arrays , location , input_type ):
19341934 mc = ModelChain (sapm_dc_snl_ac_system_same_arrays , location )
1935- times = pd .date_range (start = '2020-01-01 0700-0700' , periods = 2 , freq = 'H ' )
1935+ times = pd .date_range (start = '2020-01-01 0700-0700' , periods = 2 , freq = 'h ' )
19361936 weather = pd .DataFrame ({'dni' : [2 , 3 ],
19371937 'dhi' : [4 , 6 ],
19381938 'ghi' : [9 , 5 ]}, index = times )
0 commit comments