Skip to content

Commit ff7de82

Browse files
committed
Add whatsnew
1 parent 33e15a5 commit ff7de82

File tree

2 files changed

+45
-9
lines changed

2 files changed

+45
-9
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _whatsnew_01300:
2+
3+
4+
v0.13.0 (June XX, 2025)
5+
------------------------
6+
7+
Breaking Changes
8+
~~~~~~~~~~~~~~~~
9+
* Remove the ``outputformat='basic'`` option in :py:func:`~pvlib.iotools.get_pvgis_tmy`
10+
and :py:func:`~pvlib.iotools.read_pvgis_tmy`. (:pull:`2416`)
11+
12+
Bug fixes
13+
~~~~~~~~~
14+
15+
16+
Enhancements
17+
~~~~~~~~~~~~
18+
19+
20+
Documentation
21+
~~~~~~~~~~~~~
22+
23+
24+
Testing
25+
~~~~~~~
26+
27+
28+
Maintenance
29+
~~~~~~~~~~~
30+
31+
32+
Contributors
33+
~~~~~~~~~~~~
34+
* Adam R. Jensen (:ghuser:`AdamRJensen`)

pvlib/iotools/pvgis.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,8 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
523523
# raise exception if pvgis format isn't in ['csv', 'json', 'epw']
524524
else:
525525
err_msg = (
526-
"pvgis format '{:s}' was unknown, must be either 'json', 'csv', or 'epw'.")\
527-
.format(outputformat)
526+
"pvgis format '{:s}' was unknown, must be either 'json', 'csv', or"
527+
" 'epw'.").format(outputformat)
528528
raise ValueError(err_msg)
529529

530530
if map_variables:
@@ -589,7 +589,6 @@ def _parse_pvgis_tmy_csv(src):
589589
return data, months_selected, inputs, meta
590590

591591

592-
593592
def read_pvgis_tmy(filename, pvgis_format=None, map_variables=True):
594593
"""
595594
Read a file downloaded from PVGIS.
@@ -642,7 +641,7 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=True):
642641
outputformat = Path(filename).suffix[1:].lower()
643642
else:
644643
outputformat = pvgis_format
645-
# parse the pvgis file based on the output format, either 'epw', 'json', or 'csv'
644+
# parse pvgis file based on outputformat, either 'epw', 'json', or 'csv'
646645

647646
# EPW: use the EPW parser from the pvlib.iotools epw.py module
648647
if outputformat == 'epw':
@@ -652,7 +651,8 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=True):
652651
data, meta = read_epw(filename)
653652
months_selected, inputs = None, None
654653

655-
# NOTE: json and csv output formats have parsers defined as private functions in this module
654+
# NOTE: json and csv output formats have parsers defined as private
655+
# functions in this module
656656

657657
# JSON: use Python built-in json module to convert file contents to a
658658
# Python dictionary, and pass the dictionary to the _parse_pvgis_tmy_json()
@@ -667,16 +667,18 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=True):
667667

668668
elif outputformat == 'csv':
669669
try:
670-
data, months_selected, inputs, meta = _parse_pvgis_tmy_csv(filename)
670+
data, months_selected, inputs, meta = \
671+
_parse_pvgis_tmy_csv(filename)
671672
except AttributeError: # str/path has no .read() attribute
672673
with open(str(filename), 'rb') as fbuf:
673-
data, months_selected, inputs, meta = _parse_pvgis_tmy_csv(fbuf)
674+
data, months_selected, inputs, meta = \
675+
_parse_pvgis_tmy_csv(fbuf)
674676

675677
else:
676678
# raise exception if pvgis format isn't in ['csv','epw','json']
677679
err_msg = (
678-
"pvgis format '{:s}' was unknown, must be either 'epw', 'json', or 'csv'"
679-
).format(outputformat)
680+
"pvgis format '{:s}' was unknown, must be either 'json', 'csv',"
681+
"or 'epw'").format(outputformat)
680682
raise ValueError(err_msg)
681683

682684
if map_variables:

0 commit comments

Comments
 (0)