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

Revise dc_ohmic_loss and dc_ohms_from_percent docstrings #2229

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

cwhanse
Copy link
Member

@cwhanse cwhanse commented Sep 26, 2024

  • Closes Inappropriate reference for the function "dc_ohmic_losses" #1601
  • 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.

#1601 points out that the calculations are elementary and referencing the PVsyst help file isn't appropriate. Being elementary, and completely explained in the docstring, obviates the need for a reference IMO.

The docstring for dc_ohms_from_percent was further edited to fix a few typos, adjust to recent style (explanatory Notes section), and clarify module vs. array parameters.

pvlib/pvsystem.py Outdated Show resolved Hide resolved
pvlib/pvsystem.py Outdated Show resolved Hide resolved
pvlib/pvsystem.py Outdated Show resolved Hide resolved
pvlib/pvsystem.py Outdated Show resolved Hide resolved
@cwhanse cwhanse added this to the v0.11.2 milestone Sep 27, 2024
@cwhanse cwhanse merged commit 4cfda4a into pvlib:main Sep 27, 2024
22 of 26 checks passed
@cwhanse
Copy link
Member Author

cwhanse commented Sep 27, 2024

That was a misclick. I thought I was confirming the email associated with the last commit. @pvlib/pvlib-maintainer can do a follow-on if further edits are desired.

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.

A couple edits (I guess GitHub does not allow making direct suggestions after the PR isclosed).

.. math::
L = I \times R^2
Copy link
Member

Choose a reason for hiding this comment

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

This should be L = I^2 R

@@ -14,6 +14,8 @@ Enhancements

Documentation
~~~~~~~~~~~~~
* Edited docstrings for :py:func:`~pvlib.pvsystem.dc_ohms_from_percent` and
:py:func:`~pvlib.pvsystem.dc_ohmic_loss` for clarity. (:issue:`1601`, :pull:`2229`)
Copy link
Member

Choose a reason for hiding this comment

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

should be dc_ohmic_losses, not dc_ohmic_loss

@cwhanse cwhanse mentioned this pull request Sep 30, 2024
5 tasks
kandersolar pushed a commit that referenced this pull request Oct 1, 2024
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.

Inappropriate reference for the function "dc_ohmic_losses"
3 participants