From 009e913498a36c13426d35d9d7cb23ecbe8a8431 Mon Sep 17 00:00:00 2001 From: "Adam R. Jensen" <39184289+AdamRJensen@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:49:52 +0100 Subject: [PATCH 1/4] Remove download badges from README (#1941) * Remove download badges * Change conda from pvlib-python to pvlib --- README.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 7a7d94500f..cc1981a269 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ latest release - - + + - - + + @@ -55,17 +55,6 @@ - - Downloads - - - PyPI downloads - - - conda-forge downloads - - - From b67a668378ecb66dfd5d2be6273e22827776a858 Mon Sep 17 00:00:00 2001 From: "Adam R. Jensen" <39184289+AdamRJensen@users.noreply.github.com> Date: Thu, 18 Jan 2024 22:46:36 +0100 Subject: [PATCH 2/4] Update citation in pvlib readme (#1939) * Update joss badge * Update citations section * Update index.rst * Update readme link to markdown * Update citations in index.rst * Remove clutter at bottom of index.rst page * Implement code review changes * Remove indices/tables and contents header --- README.md | 35 ++++++++++++++++------- docs/sphinx/source/index.rst | 55 ++++++++++++++++++++++-------------- 2 files changed, 59 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index cc1981a269..c80f1c7acf 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ zenodo reference - - JOSS reference + + DOI badge @@ -88,17 +88,32 @@ The long-term success of pvlib-python requires substantial community support. Citing ====== -If you use pvlib-python in a published work, please cite: +Many of the contributors to pvlib python work in institutions where +citation metrics are used in performance or career evaluations. If you +use pvlib python in a published work, please cite: - William F. Holmgren, Clifford W. Hansen, and Mark A. Mikofski. +**Recommended citation for the pvlib python project** + + 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). + https://doi.org/10.21105/joss.05994 + + +**Recommended citation for pvlib iotools** + + Jensen, A., Anderson, K., Holmgren, W., Mikofski, M., Hansen, C., Boeman, L., Loonen, R. + "pvlib iotools —- Open-source Python functions for seamless access to solar irradiance data." + Solar Energy, 266, 112092, (2023). + https://doi.org/10.1016/j.solener.2023.112092 + +**Historical citation for pvlib python** + + Holmgren, W., Hansen, C., and Mikofski, M. "pvlib python: a python package for modeling solar energy systems." Journal of Open Source Software, 3(29), 884, (2018). https://doi.org/10.21105/joss.00884 -Please also cite the DOI corresponding to the specific version of -pvlib-python that you used. pvlib-python DOIs are listed at -[Zenodo.org](https://zenodo.org/search?page=1&size=20&q=conceptrecid:593284&all_versions&sort=-version) - If you use pvlib-python in a commercial or publicly-available application, please consider displaying one of the "powered by pvlib" logos: @@ -131,10 +146,10 @@ History and acknowledgement =========================== pvlib python started out as a Python translation of the PVLIB MATLAB -toolbox (developed by the `PVPMC `_ at +toolbox (developed by the [PVPMC](https://pvpmc.sandia.gov/) at Sandia National Laboratories) in 2013 and has grown substantially since then. Today it contains code contributions from over a hundred individuals worldwide -and is maintained by a core group of PV modelers from a variety institutions. +and is maintained by a core group of PV modelers from a variety of institutions. pvlib has been supported directly and indirectly by DOE, NumFOCUS, and Google Summer of Code funding, university research projects, diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst index d8d8d9debd..8e5773d639 100644 --- a/docs/sphinx/source/index.rst +++ b/docs/sphinx/source/index.rst @@ -48,28 +48,37 @@ companies that allow their employees to contribute, and from personal time. Citing pvlib python =================== -Many of the contributors to pvlib-python work in institutions where +Many of the contributors to pvlib python work in institutions where citation metrics are used in performance or career evaluations. If you use pvlib python in a published work, please cite: - William F. Holmgren, Clifford W. Hansen, and Mark A. Mikofski. +**Recommended citation for the pvlib python project** + + 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). + https://doi.org/10.21105/joss.05994 + + +**Recommended citation for pvlib iotools** + + Jensen, A., Anderson, K., Holmgren, W., Mikofski, M., Hansen, C., Boeman, L., Loonen, R. + "pvlib iotools — Open-source Python functions for seamless access to solar irradiance data." + Solar Energy, 266, 112092, (2023). + https://doi.org/10.1016/j.solener.2023.112092 + +**Historical citation for pvlib python** + + Holmgren, W., Hansen, C., and Mikofski, M. "pvlib python: a python package for modeling solar energy systems." Journal of Open Source Software, 3(29), 884, (2018). https://doi.org/10.21105/joss.00884 +**Version specific citation** Please also cite the DOI corresponding to the specific version of pvlib python that you used. pvlib python DOIs are listed at `Zenodo.org `_ -If you use pvlib-python in a commercial or publicly-available -application, please consider displaying one of the "powered by pvlib" -logos: - -.. image:: _images/pvlib_powered_logo_horiz.png - :width: 300 - -.. image:: _images/pvlib_powered_logo_vert.png - :width: 300 Additional pvlib python publications include: @@ -94,6 +103,19 @@ Additional pvlib python publications include: "An Open Source Solar Power Forecasting Tool Using PVLIB-Python," in 43rd Photovoltaic Specialists Conference, 2016. + +Logo +==== +If you use pvlib python in a commercial or publicly-available +application, please consider displaying one of the "powered by pvlib" +logos: + +.. image:: _images/pvlib_powered_logo_horiz.png + :width: 300 + +.. image:: _images/pvlib_powered_logo_vert.png + :width: 300 + License ======= @@ -108,21 +130,12 @@ pvlib python is a `NumFOCUS Affiliated Project Date: Tue, 23 Jan 2024 10:31:09 -0500 Subject: [PATCH 3/4] 1759 resolve attrib error model chain (#1947) * Remove or clause from if clause in infer_temperature_model in ModelChain * Updated what's new * Remove comment about removing or statement in infer_temperature_model in modelchain.py * Added test to verify that error indicating inability to infer temperature model is raised when not providing temperature model to arrays * Update docs/sphinx/source/whatsnew/v0.10.4.rst Co-authored-by: Kevin Anderson * Update pvlib/tests/test_modelchain.py --------- Co-authored-by: Kevin Anderson --- docs/sphinx/source/whatsnew/v0.10.4.rst | 5 +++-- pvlib/modelchain.py | 5 +---- pvlib/tests/test_modelchain.py | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.10.4.rst b/docs/sphinx/source/whatsnew/v0.10.4.rst index 83b04cc01e..df73d68e98 100644 --- a/docs/sphinx/source/whatsnew/v0.10.4.rst +++ b/docs/sphinx/source/whatsnew/v0.10.4.rst @@ -11,7 +11,8 @@ Enhancements Bug fixes ~~~~~~~~~ - +* :py:class:`~pvlib.modelchain.ModelChain` now raises a more useful error when + ``temperature_model_parameters`` are specified on the passed ``system`` instead of on its ``arrays``. (:issue:`1759`). Testing ~~~~~~~ @@ -27,4 +28,4 @@ Requirements Contributors ~~~~~~~~~~~~ - +* :ghuser:`matsuobasho` diff --git a/pvlib/modelchain.py b/pvlib/modelchain.py index 296356971b..d65f262c23 100644 --- a/pvlib/modelchain.py +++ b/pvlib/modelchain.py @@ -1117,10 +1117,7 @@ def infer_temperature_model(self): temperature_model_parameters = tuple( array.temperature_model_parameters for array in self.system.arrays) params = _common_keys(temperature_model_parameters) - # remove or statement in v0.9 - if {'a', 'b', 'deltaT'} <= params or ( - not params and self.system.racking_model is None - and self.system.module_type is None): + if {'a', 'b', 'deltaT'} <= params: return self.sapm_temp elif {'u_c', 'u_v'} <= params: return self.pvsyst_temp diff --git a/pvlib/tests/test_modelchain.py b/pvlib/tests/test_modelchain.py index 0632d34212..72c349c8e6 100644 --- a/pvlib/tests/test_modelchain.py +++ b/pvlib/tests/test_modelchain.py @@ -1305,6 +1305,22 @@ def test_temperature_model_inconsistent(location, sapm_dc_snl_ac_system): spectral_model='no_loss', temperature_model='pvsyst') +def test_temperature_model_not_specified(): + # GH 1759 -- ensure correct error is raised when temperature model params + # are specified on the PVSystem instead of the Arrays + location = Location(latitude=32.2, longitude=-110.9) + arrays = [pvsystem.Array(pvsystem.FixedMount(), + module_parameters={'pdc0': 1, 'gamma_pdc': 0})] + system = pvsystem.PVSystem(arrays, + temperature_model_parameters={'u0': 1, 'u1': 1}, + inverter_parameters={'pdc0': 1}) + with pytest.raises(ValueError, + match='could not infer temperature model ' + 'from system.temperature_model_parameters'): + _ = ModelChain(system, location, + aoi_model='no_loss', spectral_model='no_loss') + + def test_dc_model_user_func(pvwatts_dc_pvwatts_ac_system, location, weather, mocker): m = mocker.spy(sys.modules[__name__], 'poadc') From 6bb149fa8c933ea32a060198864a12887dc5c538 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Tue, 23 Jan 2024 11:00:17 -0500 Subject: [PATCH 4/4] Include pvarray in `__init__.py` (#1951) --- pvlib/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pvlib/__init__.py b/pvlib/__init__.py index 54009506d2..413af8f607 100644 --- a/pvlib/__init__.py +++ b/pvlib/__init__.py @@ -14,6 +14,7 @@ ivtools, location, modelchain, + pvarray, pvsystem, scaling, shading,