@@ -304,7 +304,7 @@ def test_read_pvgis_hourly_empty_file():
304
304
# PVGIS TMY tests
305
305
@pytest .fixture
306
306
def expected ():
307
- return pd .read_csv (DATA_DIR / 'pvgis_tmy_test.dat ' , index_col = 'time(UTC)' )
307
+ return pd .read_csv (DATA_DIR / 'pvgis_tmy_test.csv ' , index_col = 'time(UTC)' )
308
308
309
309
310
310
@pytest .fixture
@@ -315,18 +315,18 @@ def userhorizon_expected():
315
315
@pytest .fixture
316
316
def month_year_expected ():
317
317
return [
318
- 2014 , 2011 , 2008 , 2011 , 2009 , 2011 , 2020 , 2006 , 2006 , 2013 , 2007 , 2018 ]
318
+ 2018 , 2007 , 2009 , 2013 , 2008 , 2006 , 2011 , 2010 , 2020 , 2006 , 2007 , 2016 ]
319
319
320
320
321
321
@pytest .fixture
322
322
def inputs_expected ():
323
323
return {
324
324
'location' : {'latitude' : 45.0 , 'longitude' : 8.0 , 'elevation' : 250.0 },
325
325
'meteo_data' : {
326
- 'radiation_db' : 'PVGIS-SARAH2 ' ,
326
+ 'radiation_db' : 'PVGIS-SARAH3 ' ,
327
327
'meteo_db' : 'ERA5' ,
328
328
'year_min' : 2005 ,
329
- 'year_max' : 2020 ,
329
+ 'year_max' : 2023 ,
330
330
'use_horizon' : True ,
331
331
'horizon_db' : 'DEM-calculated' }}
332
332
@@ -564,14 +564,14 @@ def test_read_pvgis_horizon_invalid_coords():
564
564
565
565
566
566
def test_read_pvgis_tmy_map_variables (pvgis_tmy_mapped_columns ):
567
- fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020 .json'
567
+ fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023 .json'
568
568
actual , _ , _ , _ = read_pvgis_tmy (fn , map_variables = True )
569
569
assert all (c in pvgis_tmy_mapped_columns for c in actual .columns )
570
570
571
571
572
572
def test_read_pvgis_tmy_json (expected , month_year_expected , inputs_expected ,
573
573
meta_expected ):
574
- fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020 .json'
574
+ fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023 .json'
575
575
# infer outputformat from file extensions
576
576
pvgis_data = read_pvgis_tmy (fn , map_variables = False )
577
577
_compare_pvgis_tmy_json (expected , month_year_expected , inputs_expected ,
@@ -588,7 +588,7 @@ def test_read_pvgis_tmy_json(expected, month_year_expected, inputs_expected,
588
588
589
589
590
590
def test_read_pvgis_tmy_epw (expected , epw_meta ):
591
- fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020 .epw'
591
+ fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023 .epw'
592
592
# infer outputformat from file extensions
593
593
pvgis_data = read_pvgis_tmy (fn , map_variables = False )
594
594
_compare_pvgis_tmy_epw (expected , epw_meta , pvgis_data )
@@ -603,7 +603,7 @@ def test_read_pvgis_tmy_epw(expected, epw_meta):
603
603
604
604
def test_read_pvgis_tmy_csv (expected , month_year_expected , inputs_expected ,
605
605
meta_expected , csv_meta ):
606
- fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020 .csv'
606
+ fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023 .csv'
607
607
# infer outputformat from file extensions
608
608
pvgis_data = read_pvgis_tmy (fn , map_variables = False )
609
609
_compare_pvgis_tmy_csv (expected , month_year_expected , inputs_expected ,
@@ -620,7 +620,7 @@ def test_read_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,
620
620
621
621
622
622
def test_read_pvgis_tmy_basic (expected , meta_expected ):
623
- fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020 .txt'
623
+ fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023 .txt'
624
624
# XXX: can't infer outputformat from file extensions for basic
625
625
with pytest .raises (ValueError , match = "pvgis format 'txt' was unknown" ):
626
626
read_pvgis_tmy (fn , map_variables = False )
0 commit comments