From ef30b170a2cba6971388daef10b37f2a0d3efb6f Mon Sep 17 00:00:00 2001 From: Siddharth Kaul Date: Mon, 1 May 2023 00:48:35 +0530 Subject: [PATCH 1/4] Made "data" argument in the mc.run_model_from_effective_irradiance as a required argument. --- pvlib/modelchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/modelchain.py b/pvlib/modelchain.py index ccf2e614f3..1ff4add72e 100644 --- a/pvlib/modelchain.py +++ b/pvlib/modelchain.py @@ -1907,7 +1907,7 @@ def _run_from_effective_irrad(self, data=None): return self - def run_model_from_effective_irradiance(self, data=None): + def run_model_from_effective_irradiance(self, data): """ Run the model starting with effective irradiance in the plane of array. From 3643c0bdc8da50ddf2a9f778fffe9e92081a2867 Mon Sep 17 00:00:00 2001 From: Siddharth Kaul Date: Mon, 1 May 2023 01:33:41 +0530 Subject: [PATCH 2/4] Maded "data" argument required for subfunction _prepare_temperature and _run_from_effective_irrad --- pvlib/modelchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/modelchain.py b/pvlib/modelchain.py index 1ff4add72e..a29dd52eea 100644 --- a/pvlib/modelchain.py +++ b/pvlib/modelchain.py @@ -1686,7 +1686,7 @@ def _prepare_temperature_single_array(self, data, poa): self.temperature_model() return self - def _prepare_temperature(self, data=None): + def _prepare_temperature(self, data): """ Sets cell_temperature using inputs in data and the specified temperature model. @@ -1878,7 +1878,7 @@ def run_model_from_poa(self, data): return self - def _run_from_effective_irrad(self, data=None): + def _run_from_effective_irrad(self, data): """ Executes the temperature, DC, losses and AC models. From e356141102cdecce66696df88cfda9ac69c30f91 Mon Sep 17 00:00:00 2001 From: Siddharth Kaul Date: Tue, 2 May 2023 01:04:35 +0530 Subject: [PATCH 3/4] Removed "default None" from docstring --- pvlib/modelchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/modelchain.py b/pvlib/modelchain.py index a29dd52eea..f6fad98975 100644 --- a/pvlib/modelchain.py +++ b/pvlib/modelchain.py @@ -1699,7 +1699,7 @@ def _prepare_temperature(self, data): Parameters ---------- - data : DataFrame, default None + data : DataFrame May contain columns ``'cell_temperature'`` or ``'module_temperaure'``. @@ -1884,7 +1884,7 @@ def _run_from_effective_irrad(self, data): Parameters ---------- - data : DataFrame, or tuple of DataFrame, default None + data : DataFrame, or tuple of DataFrame If optional column ``'cell_temperature'`` is provided, these values are used instead of `temperature_model`. If optional column `module_temperature` is provided, `temperature_model` must be From 0b03273f0a583c8d80095d54eac1ff83b609bc29 Mon Sep 17 00:00:00 2001 From: Siddharth Kaul Date: Tue, 2 May 2023 01:05:03 +0530 Subject: [PATCH 4/4] Added bug fix comment in v0.9.6 and contributors name. --- docs/sphinx/source/whatsnew/v0.9.6.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.9.6.rst b/docs/sphinx/source/whatsnew/v0.9.6.rst index f21fe80ac6..86f819a784 100644 --- a/docs/sphinx/source/whatsnew/v0.9.6.rst +++ b/docs/sphinx/source/whatsnew/v0.9.6.rst @@ -15,7 +15,8 @@ Enhancements Bug fixes ~~~~~~~~~ - +* `data` can no longer be left unspecified in + :py:meth:`pvlib.modelchain.ModelChain.run_model_from_effective_irradiance`. (:issue:`1713`, :pull:`1720`) Testing ~~~~~~~ @@ -37,3 +38,4 @@ Requirements Contributors ~~~~~~~~~~~~ * Adam R. Jensen (:ghuser:`adamrjensen`) +* Siddharth Kaul (:ghuser:`k10blogger`)