Skip to content

Remove deprecated spectrum.get_am15g function #2409

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

Merged
merged 8 commits into from
Mar 14, 2025

Conversation

kandersolar
Copy link
Member

  • [ ] Closes #xxxx
  • I am familiar with the contributing guidelines
  • 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.

This PR removes the get_am15g function, which was deprecated in v0.11.0 when we added the more general get_reference_spectra function.

@kandersolar kandersolar added this to the v0.12.0 milestone Mar 14, 2025
Comment on lines +15 to +16
* Remove deprecated :py:func:`!pvlib.spectrum.get_am15g` function; use
:py:func:`~pvlib.spectrum.get_reference_spectra` instead. (:pull:`2409`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Remove deprecated :py:func:`!pvlib.spectrum.get_am15g` function; use
:py:func:`~pvlib.spectrum.get_reference_spectra` instead. (:pull:`2409`)
* Remove deprecated :py:func:`~pvlib.spectrum.get_am15g` function; use
:py:func:`~pvlib.spectrum.get_reference_spectra` instead. (:pull:`2409`)

What does the ! do? Should it be a ~?

Copy link
Member Author

Choose a reason for hiding this comment

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

I only learned about ! recently, I think from one of @echedey-ls's PRs if I remember correctly. From https://www.sphinx-doc.org/en/master/usage/referencing.html:

Prefixing with an exclamation mark (!) prevents the creation of a link but otherwise keeps the visual output of the role.

a tilde ~ prefix shortens the link text to the last component of the target.

We're getting rid of get_am15g, so there's no point in trying to link somewhere, but it would be nice (IMHO) to have the same function formatting applied regardless.

Copy link
Contributor

@echedey-ls echedey-ls left a comment

Choose a reason for hiding this comment

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

There are two other references without the do-not-link specifier in:

  • v0.9.3.rst, line 17
  • v0.11.0.rst, line 31

I suggest disabling these links, to avoid visual noise on nitpick=True of linkchecker execution. This minor detail, and LGTM.

@kandersolar kandersolar merged commit 9f5ac3f into pvlib:main Mar 14, 2025
24 of 25 checks passed
@kandersolar kandersolar deleted the am15g branch March 14, 2025 20:25
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.

3 participants