Account for gregorian/julian offset before 1582 in spa.julian_day_dt#2249
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. |
kandersolar
left a comment
There was a problem hiding this comment.
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! |