Skip to content

Address pandas deprecation warnings in test suite#2778

Open
kandersolar wants to merge 1 commit into
pvlib:mainfrom
kandersolar:pd_freq_d
Open

Address pandas deprecation warnings in test suite#2778
kandersolar wants to merge 1 commit into
pvlib:mainfrom
kandersolar:pd_freq_d

Conversation

@kandersolar

Copy link
Copy Markdown
Member
  • [ ] Closes #xxxx
  • 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.
  • [ ] 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.

A trivial PR to address these pandas warnings:

tests/test_pvsystem.py::test_combine_loss_factors
  /home/runner/work/pvlib-python/pvlib-python/tests/test_pvsystem.py:2425: Pandas4Warning: 'd' is deprecated and will be removed in a future version, please use 'D' instead.
    test_index = pd.date_range(start='1990/01/01T12:00', periods=365, freq='d')

tests/test_pvsystem.py::test_combine_loss_factors
  /home/runner/work/pvlib-python/pvlib-python/tests/test_pvsystem.py:2427: Pandas4Warning: 'd' is deprecated and will be removed in a future version, please use 'D' instead.
    loss_2 = pd.Series(.05, index=pd.date_range(start='1990/01/01T12:00',

https://github.com/pvlib/pvlib-python/actions/runs/27138420944/job/80096740936#step:9:90

@kandersolar kandersolar added this to the v0.15.2 milestone Jun 9, 2026
@echedey-ls

Copy link
Copy Markdown
Member

Did you check for other occurrences in the examples gallery? I have trauma with them being ignored in the test CI.

@echedey-ls

Copy link
Copy Markdown
Member

Okay, now I remember. In #2730 - I thought it addressed the whole codebase, and #2664 must have addressed those there in the examples. LGTM :)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants