Skip to content

[WIP] Adopt ghi_clear variable name for clearsky GHI #2273

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bf1c0d8
irradiance.py: ghi_from_poa() and clearsky_index()
RDaxini Oct 21, 2024
37d17b8
clearsky.py: haurwitz(), detect_clearsky
RDaxini Oct 21, 2024
9fa9fdc
clearsky.py: detect_clearsky
RDaxini Oct 21, 2024
00ffbd9
irradiance.py: dirindex()
RDaxini Oct 21, 2024
b21e1eb
modify tests
RDaxini Oct 25, 2024
57288e7
add deprecation warning
RDaxini Nov 21, 2024
00d7b70
Update clearsky.py
RDaxini Nov 25, 2024
6c78cb8
Merge remote-tracking branch 'upstream/main' into ghi_clear
RDaxini Nov 25, 2024
5b273df
fix unrelated linting issues
RDaxini Nov 25, 2024
38a409d
fix unrelated linting issue
RDaxini Nov 25, 2024
263ad4e
Update test_clearsky.py
RDaxini Nov 25, 2024
ba5ffaa
Revert "Update test_clearsky.py"
RDaxini Nov 25, 2024
f45cf19
Reapply "Update test_clearsky.py"
RDaxini Nov 25, 2024
d7a6f83
Revert "Update test_clearsky.py"
RDaxini Nov 25, 2024
fbd49e9
Revert "fix unrelated linting issue"
RDaxini Nov 25, 2024
84987b0
Revert "fix unrelated linting issues"
RDaxini Nov 25, 2024
1622571
Revert "Merge remote-tracking branch 'upstream/main' into ghi_clear"
RDaxini Nov 25, 2024
5879282
Revert "Update clearsky.py"
RDaxini Nov 25, 2024
bbe9d4f
Revert "add deprecation warning"
RDaxini Nov 25, 2024
aeab5cc
Revert "modify tests"
RDaxini Nov 25, 2024
9be20a6
Revert "irradiance.py: dirindex()"
RDaxini Nov 25, 2024
efdbbd8
Revert "clearsky.py: detect_clearsky"
RDaxini Nov 25, 2024
feab85c
Revert "clearsky.py: haurwitz(), detect_clearsky"
RDaxini Nov 25, 2024
c9c6900
Revert "irradiance.py: ghi_from_poa() and clearsky_index()"
RDaxini Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,9 @@ jobs:
- name: Build packages
run: python -m build

- name: List distribution file sizes
run: du -h dist/*

- name: Check metadata verification
run: python -m twine check --strict dist/*

- name: Ensure that the wheel installs successfully
run: |
mkdir ./tmp
pip install $(find dist -type f -name "*.whl") --target=./tmp

- name: List installed file sizes
run: du -h pvlib
working-directory: ./tmp

# only publish distribution to PyPI for tagged commits
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/top-ranked-issues.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Contributing
============

We need your help to make pvlib-python a great tool!
Please see the [Contributing page](https://pvlib-python.readthedocs.io/en/stable/contributing/index.html) for more on how you can contribute.
Please see the [Contributing page](http://pvlib-python.readthedocs.io/en/stable/contributing.html) for more on how you can contribute.
The long-term success of pvlib-python requires substantial community support.


Expand Down
Binary file not shown.
2 changes: 0 additions & 2 deletions docs/sphinx/source/contributing/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _contributing:

============
Contributing
============
Expand Down
189 changes: 2 additions & 187 deletions docs/sphinx/source/contributing/style_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pvlib python generally follows the `PEP 8 -- Style Guide for Python Code
is 79 characters.

pvlib python uses a mix of full and abbreviated variable names. See
:ref:`nomenclature`.
:ref:`variables_style_rules`. We could be better about consistency.
Prefer full names for new contributions. This is especially important
for the API. Abbreviations can be used within a function to improve the
readability of formulae.
Expand Down Expand Up @@ -70,81 +70,6 @@ the ``docs/readthedocs.org:pvlib-python`` link within the checks
status box at the bottom of the pull request.


.. _reference_style:

References
----------
pvlib-python is transitioning to the `IEEE reference style <https://journals.ieeeauthorcenter.ieee.org/wp-content/uploads/sites/7/IEEE_Reference_Guide.pdf>`_,
which should be used in all new contributions. At minimum, a reference should
include:

* Author list (for more than six authors, list only the first with et al.)
* Publication title
* Publisher (journal title, laboratory name, etc.)
* Year of publication
* DOI (if available)

The recommended citation style for several media types is as follows:

**Journal article**:

Author initials and surname, "Title of article," abbreviated journal
title, vol. number, issue number, page numbers, Abbreviated Month Year.

**Book**:

Author initials. Author Surname, "Chapter title" in Book Title, xth ed.
City of Publisher, (only U.S. State), Country: Abbrev. of Publisher, year,
ch. x, sec. x, pp. xxx–xxx.

**Technical report**:

Author initials. Author Surname, "Report title" Abbrev. publisher name,
City of publisher, Abbrev. State, Country, Rep. xxx, year

The example below shows how to cite material and generate a reference list
using the IEEE style in a docstring::

This is the recommended citation for the pvlib-python project [1]_. There
are also some conference papers linked to pvlib, for example [2]_.

Other types of reference you may find in the pvlib-python documentation
include books [3]_, technical reports [4]_, and websites [5]_.

References
----------
.. [1] K. Anderson, C. Hansen, W. Holmgren, A. Jensen, M. Mikofski,
and A Driesse. "pvlib python: 2023 project update." J. Open Source
Softw. vol. 8, no. 92, pp. 5994, Dec 2023,
:doi:`10.21105/joss.05994`.

.. [2] J. S. Stein, "The Photovoltaic Performance Modeling Collaborative
(PVPMC)," In Proc. 38th IEEE Photovoltaic Specialists Conference
(PVSC), Austin, TX, USA, 2012, pp. 3048-3052,
:doi:`10.1109/PVSC.2012.6318225`.

.. [3] J. A. Duffie and W. A. Beckman, "Solar Radiation" in Solar
Engineering of Thermal Processes, 3rd ed, New York, USA, J. Wiley
and Sons, 2006, ch. 1, sec. 1.5, pp.9-11.

.. [4] R. Bird and C. Riordan, "Simple solar spectral model for direct and
diffuse irradiance on horizontal and tilted planes at the earth’s
surface for cloudless atmospheres", NREL, Golden, CO, USA, Technical
Report TR-215-2436, 1984, :doi:`10.2172/5986936`.

.. [5] "PVPMC Home." Sandia National Laboratories PV Performance Modeling
Collaborative. Accessed: Oct. 17, 2024. [Online.] Available:
<https://pvpmc.sandia.gov/>_

Things to note:

* In-text numeric citations are a number inside square brackets, followed
by an underscore, e.g. ``[1]_``.
* To include a DOI, you can use pvlib's custom ``:doi:``
`Sphinx role <https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html>`_,
followed by the DOI inside a set of backticks.


.. _building-the-documentation:

Building the documentation
Expand All @@ -163,7 +88,7 @@ An easy way to do this is with::

Note: Anaconda users may have trouble using the above command to update an
older version of docutils. If that happens, you can update it with ``conda``
(e.g. ``conda install docutils=0.21``) and run the above command again.
(e.g. ``conda install docutils=0.15.2``) and run the above command again.

Once the ``doc`` dependencies are installed, navigate to ``/docs/sphinx`` and
execute::
Expand All @@ -182,116 +107,6 @@ Note that Windows users need not have the ``make`` utility installed as pvlib
includes a ``make.bat`` batch file that emulates its interface.


.. _example-docstring:

Example Docstring
-----------------

Here is a template for a function docstring that encapsulates the main
features that may be used in any docstring. Note that not all sections are
required for every function.

.. code-block:: python

def example_function(poa_global, exponents, degree_symbol, time_ref='UT',
optional_arg=None):
r"""
One-sentence summary of the function (no citations).

A longer description of the function. This can include citations
(references) to literature [1]_, websites [2]_, and other code elements
such as functions (:py:func:`pvlib.location.lookup_altitude`) and
classes (:py:class:`pvlib.location.Location`).

.. versionadded:: 0.0.1
There are many more purpose-specific directives, admonitions and such
available at `this link <admonitions>`_. E.g.: ``.. versionchanged::``,
``.. deprecated::``, ``.. note::`` and ``.. warning::``.

.. _admonitions: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#admonitions-messages-and-warnings

Parameters
----------
poa_global : numeric
Plane-of-array global irradiance, see :term:`poa_global`. [Wm⁻²].
exponents : array-like
A list of exponents. [x⁰¹²³⁴⁵⁶⁷⁸⁹⁻].
degree_symbol : pandas.Series or pandas.DataFrame
It's different from superscript zero. [°].
time_ref : ``'UT'`` or ``'TST'``, default: ``'UT'``
``'UT'`` (universal time) or ``'TST'`` (True Solar Time).
optional_arg : integer, optional
A description of ``optional_arg``. [Unitless].

Specify a suitable datatype for each parameter. Other common
data types include ``str``, ``bool``, ``float``, ``numeric``
and ``pandas.DatetimeIndex``.

Returns
-------
name : numeric
A description of the return value.

Raises
------
ValueError
If ``poa_global`` is negative.
KeyError
If ``time_ref`` does not exist.

Notes
-----
This section can include additional information about the function.

For example, an equation using LaTeX markup:

.. math::

a = \left(\frac{b}{c}\right)^2

where :math:`a` is the result of the equation, and :math:`b` and :math:`c`
are inputs.

Or a figure with a caption:

.. figure:: ../../_images/pvlib_logo_horiz.png
:scale: 10%
:alt: alternate text
:align: center

Figure caption.

See Also
--------
pvlib.location.lookup_altitude, pvlib.location.Location

Examples
--------
>>> example_function(1, 1, pd.Series([1]), "TST", 2)
'Something'

References
----------
A IEEE citation to a relevant reference. You may use an automatic
citation generator to format the citation correctly.

.. [1] Anderson, K., Hansen, C., Holmgren, W., Jensen, A., Mikofski, M.,
and Driesse, A. "pvlib python: 2023 project update." Journal of Open
Source Software, 8(92), 5994, (2023). :doi:`10.21105/joss.05994`.
.. [2] J. Smith and J. Doe. "Obama inaugurated as President." CNN.com.
Accessed: Feb. 1, 2009. [Online.]
Available: http://www.cnn.com/POLITICS/01/21/obama_inaugurated/index.html
"""
a = "Some"
b = "thing"
return a + b

A preview of how this docstring would render in the documentation can be seen in the
following file: :download:`Example docstring<../_images/example_function_screenshot.png>`.

Remember that to show the docstring in the documentation, you must list
the function in the appropriate ``.rst`` file in the ``docs/sphinx/source/reference`` folder.

.. _example-gallery:

Example Gallery
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/source/contributing/testing.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _testing:

Testing and benchmarking
========================
Testing
=======

.. _overview:

Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pvlib python
that-use-pvlib-python>`_ page for inspiration and listing of your
application.

There is a :ref:`variable naming convention <nomenclature>` to
There is a :ref:`variable naming convention <variables_style_rules>` to
ensure consistency throughout the library.


Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ User Guide
clearsky
bifacial
weather_data
variables_style_rules
singlediode
nomenclature
faq
Loading
Loading