Skip to content

Rename zenith to solar_zenith in the decomposition models - #2858

Closed
anishmehta24 wants to merge 2 commits into
pvlib:mainfrom
anishmehta24:rename-zenith-to-solar-zenith
Closed

anishmehta24 wants to merge 2 commits into
pvlib:mainfrom
anishmehta24:rename-zenith-to-solar-zenith

Conversation

@anishmehta24

@anishmehta24 anishmehta24 commented Sep 19, 2026

Copy link
Copy Markdown
  • Closes Inconsistent solar zenith parameter naming in decomposition functions #2851
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes. (not needed: no function added or removed)
  • Adds description and name entries in the appropriate "what's new" file in 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`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Five decomposition functions (dirindex, erbs, erbs_driesse, orgill_hollands, campbell_norman) called the solar zenith parameter zenith, while the other four (disc, dirint, boland, louche) call it solar_zenith. All nine now use solar_zenith.

Following the precedent of #2480 (apparent_azimuthsolar_azimuth in tracking.singleaxis), the old keyword keeps working through renamed_kwarg_warning(since='0.16.0'), which emits a pvlibDeprecationWarning and forwards the value; positional callers are unaffected since the parameter position did not change. Docstrings carry a .. versionchanged:: 0.16.0 note in the same style as the ghi_clearskyghi_clear rename. A parametrised test checks that calling with zenith= warns and returns the same result as solar_zenith=.

I didn't set a removal version on the decorator, matching #2480 — happy to add one if you'd like a fixed removal target.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D56yuT4mLP36Um1WF51fEA

Five decomposition functions (dirindex, erbs, erbs_driesse, orgill_hollands,
campbell_norman) called the solar zenith parameter `zenith` while the other
four (disc, dirint, boland, louche) call it `solar_zenith`, so comparing models
needed per-function call adjustments. All nine now use `solar_zenith`; the old
keyword still works through renamed_kwarg_warning with a deprecation warning.

Closes pvlib#2851

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D56yuT4mLP36Um1WF51fEA
@github-actions

Copy link
Copy Markdown

Hey @anishmehta24! 🎉

Thanks for opening your first pull request! We appreciate your
contribution. Please ensure you have reviewed and understood the
contributing guidelines.

If AI is used for any portion of this PR, you must vet the content
for technical accuracy.

@cwhanse

cwhanse commented Sep 19, 2026

Copy link
Copy Markdown
Member

The related issue is not mature yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent solar zenith parameter naming in decomposition functions

2 participants