Skip to content
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

Fix error message modelchain.infer_temperature_model error to be more informative #1977

Merged
merged 7 commits into from
Mar 11, 2024

Conversation

matsuobasho
Copy link
Contributor

@matsuobasho matsuobasho commented Feb 22, 2024

Copy link
Member

@cwhanse cwhanse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjust the match text here and I think this is done.

f'If Arrays are not used, check that the PVSystem '
f'attributes `racking_model` and `module_type` '
f'are valid.')
raise ValueError('could not infer temperature model from '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise ValueError('could not infer temperature model from '
raise ValueError('Could not infer temperature model from '

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matsuobasho this capitalization change will also require the tests to be updated. See the test failures here: https://github.com/pvlib/pvlib-python/actions/runs/8146219415/job/22264244062?pr=1977#step:9:134

@cwhanse cwhanse added this to the v0.10.4 milestone Mar 3, 2024
…_model

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
pvlib/modelchain.py Outdated Show resolved Hide resolved
Spelling error correction in error message

Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
@kandersolar
Copy link
Member

@matsuobasho the tests on this PR are failing due to the match text needing to be updated as mentioned above. After that I think this PR will be ready to merge.

@matsuobasho
Copy link
Contributor Author

@kandersolar thank you for the guidance on this, your message about the capitalization in the tests earlier in the week slipped past me. Will address.

…specified with the correct error message from infer_tempertaure_model
Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @matsuobasho!

@kandersolar kandersolar merged commit c4a2b4b into pvlib:main Mar 11, 2024
33 of 34 checks passed
@matsuobasho matsuobasho deleted the fix-error-message-in-modelchain branch March 11, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix error message in ModelChain pertaining to temp_model inference
3 participants