8000 Make leap_day=True default for PSM3 (deprecation) by AdamRJensen · Pull Request #1511 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Make leap_day=True default for PSM3 (deprecation) #1511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 15, 2022
Merged
Changes from 1 commit
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
Next Next commit
Add deprecation for leap_day
  • Loading branch information
AdamRJensen committed Aug 1, 2022
commit 62aae52cd57efc00947d700d1cea4f27d2a54d6b
10 changes: 9 additions & 1 deletion pvlib/iotools/psm3.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
attributes=ATTRIBUTES, leap_day=False, full_name=PVLIB_PYTHON,
attributes=ATTRIBUTES, leap_day=None, full_name=PVLIB_PYTHON,
affiliation=PVLIB_PYTHON, map_variables=None, timeout=30):
"""
Retrieve NSRDB PSM3 timeseries weather data from the PSM3 API. The NSRDB
Expand Down Expand Up @@ -165,6 +165,14 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
attributes = [amap.get(a, a) for a in attributes]
attributes = list(set(attributes)) # remove duplicate values

if leap_day is None:
warnings.warn(
'The ``get_psm3`` function will default to leap_day=True '
'starting in pvlib 0.11.0. Specify leap_day=True '
'to enable this behavior now, or specify leap_day=False '
'to hide this warning.', pvlibDeprecationWarning)
leap_day = False

# required query-string parameters for request to PSM3 API
params = {
'api_key': api_key,
Expand Down
0