-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Standardize pvgis_tmy to return (data,meta) #2470
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
Standardize pvgis_tmy to return (data,meta) #2470
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make this function easier to use for many people, I am sure!
A few minor comments below.
# Re-create original outputs (prior to #2470) | ||
months_selected = meta['months_selected'] | ||
inputs = meta['inputs'].copy() | ||
del inputs['descriptions'] | ||
meta['inputs'] = meta['inputs']['descriptions'] | ||
del meta['months_selected'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a little hacky to me. Ok if it's just to get the API change in for this release, but let's at least open an issue to update the expected values to match the new format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #2472
docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.The
pvlib.iotools.get_pvgis_tmy
andread_pvigs_tmy
currently do not follow the iotools standard convention of returning a tuple with (data,meta). Instead, the functions currently output(data,moths_selected,inputs,meta)
, which is causing a lot of confusion for new users, particularly this is a major pain point during intro tutorials. This PR introduces a breaking change by changing the output of the functions to follow the iotools standard convention.Related to #2462.