Fix interval keyword argument in oedi_9068 gallery example#2793
Open
karlhillx wants to merge 1 commit into
Open
Fix interval keyword argument in oedi_9068 gallery example#2793karlhillx wants to merge 1 commit into
karlhillx wants to merge 1 commit into
Conversation
Fixes pvlib#2791. The oedi_9068 gallery example calls get_nsrdb_psm4_conus() with interval=5, but the function's parameter is named time_step (the interval name comes from the NSRDB API query string, not the Python signature). This was missed when PR pvlib#2582 migrated the example from get_psm3 (which used interval) to get_nsrdb_psm4_conus (which uses time_step). Changes interval=5 to time_step=5 in the example call. No test changes needed — test_get_nsrdb_psm4_conus_5min already exercises time_step=5 against the function directly.
f6a81be to
dea155f
Compare
There was a problem hiding this comment.
Pull request overview
Fixes a broken gallery example invocation of pvlib.iotools.get_nsrdb_psm4_conus() by replacing the incorrect keyword argument interval with the correct Python parameter name time_step, and documents the fix in the v0.15.3 release notes.
Changes:
- Update
oedi_9068gallery example to callget_nsrdb_psm4_conus(..., time_step=5)instead ofinterval=5. - Add a v0.15.3 “what’s new” entry describing the documentation/example fix (Issue #2791).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/sphinx/source/whatsnew/v0.15.3.rst | Adds a release note entry for the fixed gallery example keyword argument. |
| docs/examples/system-models/oedi_9068.py | Fixes the example’s get_nsrdb_psm4_conus call by using time_step instead of interval. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+146
to
+148
| psm3, psm3_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude, | ||
| api_key, email, | ||
| year=2019, interval=5, | ||
| year=2019, time_step=5, |
Comment on lines
+146
to
+148
| psm3, psm3_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude, | ||
| api_key, email, | ||
| year=2019, interval=5, | ||
| year=2019, time_step=5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2791.
Problem
The
oedi_9068gallery example callsget_nsrdb_psm4_conus()withinterval=5, but the function's parameter is namedtime_step. Theintervalname comes from the NSRDB API query string, not the Python signature — the docstring even notes "Calledintervalin NSRDB API."This was missed when PR #2582 migrated the example from
get_psm3(which usedinterval) toget_nsrdb_psm4_conus(which usestime_step). The maintainer confirmed the fix in #2791.Fix
Changes
interval=5totime_step=5in the example call (one line).Tests
No test changes needed —
test_get_nsrdb_psm4_conus_5minintests/iotools/test_psm4.pyalready exercisestime_step=5against the function directly. The bug was in the gallery example, not the function.