Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.11.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Documentation

Testing
~~~~~~~
* Updated test files to track new PVGIS 5.3 data. (:pull:`2305`)


Requirements
Expand All @@ -70,3 +71,4 @@ Contributors
* Mark Mikofski (:ghuser:`mikofski`)
* matsuobasho (:ghuser:`matsuobasho`)
* Echedey Luis (:ghuser:`echedey-ls`)
* Kevin Anderson (:ghuser:`kandersolar`)
8,761 changes: 8,761 additions & 0 deletions pvlib/data/pvgis_tmy_test.csv

Large diffs are not rendered by default.

8,761 changes: 0 additions & 8,761 deletions pvlib/data/pvgis_tmy_test.dat

This file was deleted.

8,789 changes: 0 additions & 8,789 deletions pvlib/data/tmy_45.000_8.000_2005_2020.csv

This file was deleted.

8,768 changes: 0 additions & 8,768 deletions pvlib/data/tmy_45.000_8.000_2005_2020.epw

This file was deleted.

1 change: 0 additions & 1 deletion pvlib/data/tmy_45.000_8.000_2005_2020.json

This file was deleted.

8,761 changes: 0 additions & 8,761 deletions pvlib/data/tmy_45.000_8.000_2005_2020.txt

This file was deleted.

8,789 changes: 8,789 additions & 0 deletions pvlib/data/tmy_45.000_8.000_2005_2023.csv

Large diffs are not rendered by default.

8,768 changes: 8,768 additions & 0 deletions pvlib/data/tmy_45.000_8.000_2005_2023.epw

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pvlib/data/tmy_45.000_8.000_2005_2023.json

Large diffs are not rendered by default.

8,761 changes: 8,761 additions & 0 deletions pvlib/data/tmy_45.000_8.000_2005_2023.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pvlib/data/tmy_45.000_8.000_userhorizon.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions pvlib/tests/iotools/test_pvgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def test_read_pvgis_hourly_empty_file():
# PVGIS TMY tests
@pytest.fixture
def expected():
return pd.read_csv(DATA_DIR / 'pvgis_tmy_test.dat', index_col='time(UTC)')
return pd.read_csv(DATA_DIR / 'pvgis_tmy_test.csv', index_col='time(UTC)')


@pytest.fixture
Expand All @@ -315,18 +315,18 @@ def userhorizon_expected():
@pytest.fixture
def month_year_expected():
return [
2014, 2011, 2008, 2011, 2009, 2011, 2020, 2006, 2006, 2013, 2007, 2018]
2018, 2007, 2009, 2013, 2008, 2006, 2011, 2010, 2020, 2006, 2007, 2016]


@pytest.fixture
def inputs_expected():
return {
'location': {'latitude': 45.0, 'longitude': 8.0, 'elevation': 250.0},
'meteo_data': {
'radiation_db': 'PVGIS-SARAH2',
'radiation_db': 'PVGIS-SARAH3',
'meteo_db': 'ERA5',
'year_min': 2005,
'year_max': 2020,
'year_max': 2023,
'use_horizon': True,
'horizon_db': 'DEM-calculated'}}

Expand Down Expand Up @@ -564,14 +564,14 @@ def test_read_pvgis_horizon_invalid_coords():


def test_read_pvgis_tmy_map_variables(pvgis_tmy_mapped_columns):
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.json'
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.json'
actual, _, _, _ = read_pvgis_tmy(fn, map_variables=True)
assert all(c in pvgis_tmy_mapped_columns for c in actual.columns)


def test_read_pvgis_tmy_json(expected, month_year_expected, inputs_expected,
meta_expected):
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.json'
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.json'
# infer outputformat from file extensions
pvgis_data = read_pvgis_tmy(fn, map_variables=False)
_compare_pvgis_tmy_json(expected, month_year_expected, inputs_expected,
Expand All @@ -588,7 +588,7 @@ def test_read_pvgis_tmy_json(expected, month_year_expected, inputs_expected,


def test_read_pvgis_tmy_epw(expected, epw_meta):
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.epw'
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.epw'
# infer outputformat from file extensions
pvgis_data = read_pvgis_tmy(fn, map_variables=False)
_compare_pvgis_tmy_epw(expected, epw_meta, pvgis_data)
Expand All @@ -603,7 +603,7 @@ def test_read_pvgis_tmy_epw(expected, epw_meta):

def test_read_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,
meta_expected, csv_meta):
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.csv'
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.csv'
# infer outputformat from file extensions
pvgis_data = read_pvgis_tmy(fn, map_variables=False)
_compare_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,
Expand All @@ -620,7 +620,7 @@ def test_read_pvgis_tmy_csv(expected, month_year_expected, inputs_expected,


def test_read_pvgis_tmy_basic(expected, meta_expected):
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2020.txt'
fn = DATA_DIR / 'tmy_45.000_8.000_2005_2023.txt'
# XXX: can't infer outputformat from file extensions for basic
with pytest.raises(ValueError, match="pvgis format 'txt' was unknown"):
read_pvgis_tmy(fn, map_variables=False)
Expand Down
Loading