Skip to content

Commit 3def7e3

Browse files
authored
Make "data" argument required in ModelChain.run_model_from_effective_irradiance (#1720)
* Made "data" argument in the mc.run_model_from_effective_irradiance as a required argument. * Maded "data" argument required for subfunction _prepare_temperature and _run_from_effective_irrad * Removed "default None" from docstring * Added bug fix comment in v0.9.6 and contributors name.
1 parent b0ac666 commit 3def7e3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Enhancements
1515

1616
Bug fixes
1717
~~~~~~~~~
18-
18+
* `data` can no longer be left unspecified in
19+
:py:meth:`pvlib.modelchain.ModelChain.run_model_from_effective_irradiance`. (:issue:`1713`, :pull:`1720`)
1920

2021
Testing
2122
~~~~~~~
@@ -37,3 +38,4 @@ Requirements
3738
Contributors
3839
~~~~~~~~~~~~
3940
* Adam R. Jensen (:ghuser:`adamrjensen`)
41+
* Siddharth Kaul (:ghuser:`k10blogger`)

pvlib/modelchain.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@ def _prepare_temperature_single_array(self, data, poa):
16861686
self.temperature_model()
16871687
return self
16881688

1689-
def _prepare_temperature(self, data=None):
1689+
def _prepare_temperature(self, data):
16901690
"""
16911691
Sets cell_temperature using inputs in data and the specified
16921692
temperature model.
@@ -1699,7 +1699,7 @@ def _prepare_temperature(self, data=None):
16991699
17001700
Parameters
17011701
----------
1702-
data : DataFrame, default None
1702+
data : DataFrame
17031703
May contain columns ``'cell_temperature'`` or
17041704
``'module_temperaure'``.
17051705
@@ -1878,13 +1878,13 @@ def run_model_from_poa(self, data):
18781878

18791879
return self
18801880

1881-
def _run_from_effective_irrad(self, data=None):
1881+
def _run_from_effective_irrad(self, data):
18821882
"""
18831883
Executes the temperature, DC, losses and AC models.
18841884
18851885
Parameters
18861886
----------
1887-
data : DataFrame, or tuple of DataFrame, default None
1887+
data : DataFrame, or tuple of DataFrame
18881888
If optional column ``'cell_temperature'`` is provided, these values
18891889
are used instead of `temperature_model`. If optional column
18901890
`module_temperature` is provided, `temperature_model` must be
@@ -1907,7 +1907,7 @@ def _run_from_effective_irrad(self, data=None):
19071907

19081908
return self
19091909

1910-
def run_model_from_effective_irradiance(self, data=None):
1910+
def run_model_from_effective_irradiance(self, data):
19111911
"""
19121912
Run the model starting with effective irradiance in the plane of array.
19131913

0 commit comments

Comments
 (0)