Skip to content

Commit 65b6810

Browse files
Bugfix/atmos refract typo (#2592)
* Prevent atmos_refract docstring typo regression Add tests to ensure parameter name is documented as 'atmos_refract' (not 'atmos_refrac') in spa_python and solar_position docstrings. Related to #2532 * Fix atmos_refract parameter name typo in docstrings Correct parameter name from 'atmos_refrac' to 'atmos_refract' in docstrings for solarposition.spa_python and spa.solar_position to match the actual function signatures. Update whatsnew to describe this change. Closes #2532 * Break long lines up in test files * Revert "Break long lines up in test files" This reverts commit 452876d. * Revert "Prevent atmos_refract docstring typo regression" This reverts commit 216db9e. * Add PR number and contributer name to whatsnew
1 parent eaac4f8 commit 65b6810

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

docs/sphinx/source/whatsnew/v0.13.2.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Enhancements
4747
Documentation
4848
~~~~~~~~~~~~~
4949
* Provide an overview of single-diode modeling functionality in :ref:`singlediode`. (:pull:`2565`)
50+
* Fix typo in parameter name ``atmos_refract`` in :py:func:`pvlib.solarposition.spa_python`
51+
and :py:func:`pvlib.spa.solar_position`. (:issue:`2532`, :pull:`2592`)
5052

5153

5254
Testing
@@ -69,3 +71,4 @@ Contributors
6971
~~~~~~~~~~~~
7072
* Will Hobbs (:ghuser:`williamhobbs`)
7173
* Cliff Hansen (:ghuser:`cwhanse`)
74+
* Joseph Radford (:ghuser:`josephradford`)

pvlib/solarposition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def spa_python(time, latitude, longitude,
314314
using time.year and time.month from pandas.DatetimeIndex.
315315
For most simulations the default delta_t is sufficient.
316316
The USNO has historical and forecasted delta_t [3]_.
317-
atmos_refrac : float, optional
317+
atmos_refract : float, optional
318318
The approximate atmospheric refraction (in degrees)
319319
at sunrise and sunset.
320320
how : str, optional, default 'numpy'

pvlib/spa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ def solar_position(unixtime, lat, lon, elev, pressure, temp, delta_t,
10571057
degrees C; used for atmospheric correction
10581058
delta_t : float or array
10591059
Difference between terrestrial time and UT1.
1060-
atmos_refrac : float
1060+
atmos_refract : float
10611061
The approximate atmospheric refraction (in degrees)
10621062
at sunrise and sunset.
10631063
numthreads: int, optional, default 8

0 commit comments

Comments
 (0)