Skip to content

Deprecate modelchain.basic_chain #1401

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 4 commits into from
Feb 16, 2022
Merged

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 and Milestone are assigned to the Pull Request and linked Issue.

See #1385 (comment)

Do we remove functions from the API listing at deprecation or at removal? SingleAxisTracker and some other deprecated things are currently listed, so I've not removed basic_chain here.

@kandersolar kandersolar added this to the 0.9.1 milestone Feb 9, 2022
@mikofski
Copy link
Member

mikofski commented Feb 9, 2022

I think there is some Sphinx “deprecated” directive, and also like “new since vX.Y” — I think we should use that:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html

@kandersolar
Copy link
Member Author

Yes there is! Our nice @deprecated decorator actually automatically inserts it into the docstring, so no need for us to do it manually:

new_doc = (('\n.. deprecated:: %(since)s'
'\n %(message)s\n\n' %
{'since': since, 'message': message}) + old_doc)

Result:

image

and

image

@wholmgren
Copy link
Member

Do we remove functions from the API listing at deprecation or at removal? SingleAxisTracker and some other deprecated things are currently listed, so I've not removed basic_chain here.

Yes, I think we should and that we have in the past.

@cwhanse
Copy link
Member

cwhanse commented Feb 9, 2022

Do we remove functions from the API listing at deprecation or at removal?

I favor removal at removal. If a user gets a deprecation message, they may want to look at the old documentation as part of their migration work. Removing it from the API listing makes it a bit harder to find.

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.

Thanks @kanderso-nrel My preference for retaining documentation until removal is not a blocker if the majority feels otherwise.

Copy link
Member

@wholmgren wholmgren left a comment

Choose a reason for hiding this comment

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

ModelChain.with_sapm is a more direct replacement for basic_chain, so should we also/alternatively recommend that to users in the what's new and deprecation message?

@wholmgren wholmgren merged commit 93e8404 into pvlib:master Feb 16, 2022
@kandersolar kandersolar deleted the basic_chain branch February 16, 2022 20:13
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.

4 participants