-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Account for gregorian/julian offset before 1582 in spa.julian_day_dt
#2249
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
Conversation
dgapitts
commented
Oct 9, 2024
- PR to fix issues Failed unit test for nrel 2008 solar position algorithm #2077
- Tests added - details in this gist https://gist.github.com/dgapitts/a8749b5b9aa5413f350606314d48fb1b
- I am familiar with the contributing guidelines
Thanks @dgapitts. Ideally the verification with expected values would be included as a new test in pvlib's test suite. Would you like to add that to this PR as well? I am happy to provide guidance if so. |
Sure @kandersolar I can add the tests to
|
I agree, adding all the cases makes sense. I suggest creating a new test function at the bottom of the |
First, I wrote and tested the extra tests in a pytest separate file.
Next when I append this test to test_spa.py I got this
So to get around this, I add
|
Thanks @dgapitts, that's pretty much what I was imagining. A few tweaks are needed:
|
I have pushed a commit (correct-test-indention-and-class) as requested @kandersolar. Sorry for delay, I was having some issues with my local python venv. Fortunately fixed/rebuilt now and tests working locally again:
|
@dgapitts you can ignore the failure for that "Top Ranked Issues" action. |
There is also a linter error:
added |
2 blank lines before a function, one blank line at the end of a file. |
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.
I took the liberty of fixing a remaining linter issue, and adding a "what's new" entry for this.
Thanks @kurt-rhee for noting the issue and @dgapitts for implementing the fix!
spa.julian_day_dt
thank you @dgapitts! |