From 2a371bff81c6fe9a77479b504abe8a614a8cf860 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Fri, 14 Mar 2025 11:31:26 -0400 Subject: [PATCH 01/10] whatsnew cleanup --- docs/sphinx/source/whatsnew/v0.11.3.rst | 57 +++++++++++-------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index 62c7c29c57..db76b2358c 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -6,67 +6,60 @@ v0.11.3 (Anticipated March, 2025) Breaking Changes ~~~~~~~~~~~~~~~~ -* The pvlib.location.Location.pytz attribute is now read only. The - pytz attribute is now set internally to be consistent with the - pvlib.location.Location.tz attribute. (:issue:`2340`, :pull:`2341`) -* Users must now provide ModelChain.spectral_model, or the 'no_loss' spectral - model is assumed. pvlib.modelchain.ModelChain no longer attempts to infer - the spectral model from PVSystem attributes. (:issue:`2017`, :pull:`2253`) +* The :py:attr:`pvlib.location.Location.pytz` attribute is now read only. The + ``pytz`` attribute is now set internally to be consistent with the + :py:attr:`pvlib.location.Location.tz` attribute. (:issue:`2340`, :pull:`2341`) +* Users must now provide :py:attr:`ModelChain.spectral_model`, or the 'no_loss' spectral + model is assumed. :py:class:`~pvlib.modelchain.ModelChain` no longer attempts to infer + the spectral model from :py:class:`~pvlib.pvsystem.PVSystem` attributes. (:issue:`2017`, :pull:`2253`) Bug fixes ~~~~~~~~~ * Add a check to :py:func:`~pvlib.snow.fully_covered_nrel` and :py:func:`~pvlib.snow.coverage_nrel`. The check uses snow depth on the ground to improve modeling for systems with shallow tilt angles. The check - adds a new, optional parameter snow_depth. (:issue:`1171`, :pull:`2292`) + adds a new, optional parameter ``snow_depth``. (:issue:`1171`, :pull:`2292`) * Fix a bug in :py:func:`pvlib.bifacial.get_irradiance_poa` which may have yielded non-zero ground irradiance when the sun was below the horizon. (:issue:`2245`, :pull:`2359`) * Fix a bug where :py:func:`pvlib.transformer.simple_efficiency` could only be imported - using the `from pvlib.transformer` syntax (:pull:`2388`) + using the ``from pvlib.transformer`` syntax. (:pull:`2388`) * :py:class:`~pvlib.modelchain.ModelChain` now requires only a minimal set of parameters to run the SAPM electrical model. (:issue:`2369`, :pull:`2393`) -* Correct keys for First Solar modules in `~pvlib.spectrum.spectral_factor_pvspec` (:issue:`2398`, :pull:`2400`) -* Ensure proper tz and pytz types in pvlib.location.Location. To ensure that - the time zone in pvlib.location.Location remains internally consistent - if/when the time zone is updated, the tz attribute is now the single source +* Correct keys for First Solar modules in `~pvlib.spectrum.spectral_factor_pvspec`. (:issue:`2398`, :pull:`2400`) +* Ensure proper tz and pytz types in :py:class:`~pvlib.location.Location`. To ensure that + the time zone in :py:class:`~pvlib.location.Location` remains internally consistent + if/when the time zone is updated, the ``tz`` attribute is now the single source of time-zone truth, is the single time-zone setter interface, and its getter returns an IANA string. (:issue:`2340`, :pull:`2341`) * :py:func:`~pvlib.iotools.get_pvgis_tmy` with ``outputformat='csv'`` now works with the updated data format returned by PVGIS. (:issue:`2344`, :pull:`2395`) -Deprecations -~~~~~~~~~~~~ - - Enhancements ~~~~~~~~~~~~ * :py:func:`~pvlib.irradiance.gti_dirint` now raises an informative message - when input data don't include values with AOI<90 (:issue:`1342`, :pull:`2347`) -* Reduced space requirements by excluding tests and test files from wheel. + when input data don't include values with AOI<90. (:issue:`1342`, :pull:`2347`) +* Reduce space requirements by excluding tests and test files from wheel. Zipped wheel is now 66% of the previous size, and installed size is 50% of - the previous size. - (:issue:`2271`, :pull:`2277`) + the previous size. (:issue:`2271`, :pull:`2277`) Documentation ~~~~~~~~~~~~~ -* Fix Procedural and Object Oriented simulation examples having slightly different results, in :ref:`introtutorial`. (:issue:`2366`, :pull:`2367`) -* Restructure the user guide with subsections (:issue:`2302`, :pull:`2310`) +* Fix Procedural and Object Oriented simulation examples having slightly different + results in :ref:`introtutorial`. (:issue:`2366`, :pull:`2367`) +* Restructure the user guide with subsections. (:issue:`2302`, :pull:`2310`) * Add references for :py:func:`pvlib.snow.loss_townsend`. (:issue:`2383`, :pull:`2384`) -* Add :term:`ghi_clear` to the :ref:`nomenclature` page (:issue:`2272`, :pull:`2397`) -* Add output variable naming clarifaction to :py:func:`pvlib.pvsystem.calcparams_desoto` and :py:func:`pvlib.pvsystem.calcparams_pvsyst` (:issue:`716`, :pull:`2405`) +* Add :term:`ghi_clear` to the :ref:`nomenclature` page. (:issue:`2272`, :pull:`2397`) +* Add output variable naming clarifaction to :py:func:`pvlib.pvsystem.calcparams_desoto` + and :py:func:`pvlib.pvsystem.calcparams_pvsyst`. (:issue:`716`, :pull:`2405`) Testing ~~~~~~~ -* Moved tests folder to `/tests` and data exclusively used for testing to `/tests/data`. +* Move tests folder to ``/tests`` and data exclusively used for testing to ``/tests/data``. (:issue:`2271`, :pull:`2277`) -* Added Python 3.13 to test suite. (:pull:`2258`) -* Add tests for all input types for the pvlib.location.Location.tz attribute. +* Add Python 3.13 to test suite. (:pull:`2258`) +* Add tests for all input types for the :py:attr:`pvlib.location.Location.tz` attribute. (:issue:`2340`, :pull:`2341`) -* Add tests for time-conversion functions in pvlib.tools. (:issue:`2340`, :pull:`2341`) - - -Requirements -~~~~~~~~~~~~ +* Add tests for time-conversion functions in :py:mod:`pvlib.tools`. (:issue:`2340`, :pull:`2341`) Maintenance From dce1c28a52eb56e9c0516dd035f7d25bbd9dbaa8 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Fri, 14 Mar 2025 11:43:42 -0400 Subject: [PATCH 02/10] add missing contributors --- docs/sphinx/source/whatsnew/v0.11.3.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index db76b2358c..b826c0f58c 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -82,3 +82,11 @@ Contributors * Echedey Luis (:ghuser:`echedey-ls`) * Mark Campanelli (:ghuser:`markcampanelli`) * Max Jackson (:ghuser:`MaxJackson`) +* Anton Driesse (:ghuser:`adriesse`) +* Adam R. Jensen (:ghuser:`AdamRJensen`) +* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`) +* Will Holmgren (:ghuser:`wholmgren`) +* Sophie Pelland (:ghuser:`solphie-pelland`) +* Will Hobbs (:ghuser:`williamhobbs`) +* Karel De Brabandere (:ghuser:`kdebrab`) +* Kenneth J. Sauer (:ghuser:`kjsauer`) From b156f716059b30f847a1c5ade61e9ad25b7f8c46 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Sat, 15 Mar 2025 08:46:48 -0400 Subject: [PATCH 03/10] fix minor docs error from #2244 --- docs/sphinx/source/reference/pv_modeling/system_models.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/reference/pv_modeling/system_models.rst b/docs/sphinx/source/reference/pv_modeling/system_models.rst index 212865144e..fb637ee8ed 100644 --- a/docs/sphinx/source/reference/pv_modeling/system_models.rst +++ b/docs/sphinx/source/reference/pv_modeling/system_models.rst @@ -12,7 +12,7 @@ Sandia array performance model (SAPM) pvsystem.sapm pvsystem.sapm_effective_irradiance - pvsystem.sapm_spectral_loss + spectrum.spectral_factor_sapm inverter.sandia temperature.sapm_cell From adcc026e2e13afaca4db274e225323bb5fea2add Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 15:43:54 -0400 Subject: [PATCH 04/10] misc cleanup --- docs/sphinx/source/whatsnew/v0.11.3.rst | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index 6aac8ca498..dc7a0268f6 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -12,14 +12,14 @@ Breaking Changes * Users must now provide :py:attr:`ModelChain.spectral_model`, or the 'no_loss' spectral model is assumed. :py:class:`~pvlib.modelchain.ModelChain` no longer attempts to infer the spectral model from :py:class:`~pvlib.pvsystem.PVSystem` attributes. (:issue:`2017`, :pull:`2253`) -* The pvlib.location.Location.pytz attribute is now read only. The - pytz attribute is now set internally to be consistent with the - pvlib.location.Location.tz attribute. (:issue:`2340`, :pull:`2341`) -* Users must now provide ModelChain.spectral_model, or the 'no_loss' spectral - model is assumed. pvlib.modelchain.ModelChain no longer attempts to infer - the spectral model from PVSystem attributes. (:issue:`2017`, :pull:`2253`) -* Remove deprecated :py:func:`!pvlib.pvsystem.sapm_spectral_loss`. - (:issue:`2243`, :pull:`2244`) +* The :py:attr:`pvlib.location.Location.pytz` attribute is now read only. The + ``pytz`` attribute is now set internally to be consistent with the + :py:attr:`pvlib.location.Location.tz` attribute. (:issue:`2340`, :pull:`2341`) +* Users must now provide :py:attr:`ModelChain.spectral_model`, or the ``'no_loss'`` spectral + model is assumed. :py:class:`~pvlib.modelchain.ModelChain` no longer attempts to infer + the spectral model from :py:class:`~pvlib.pvsystem.PVSystem` attributes. (:issue:`2017`, :pull:`2253`) +* Remove deprecated :py:func:`!pvlib.pvsystem.sapm_spectral_loss`; use + :py:func:`~pvlib.spectrum.spectral_factor_sapm` instead. (:issue:`2243`, :pull:`2244`) * :py:func:`~pvlib.iotools.read_tmy3` now defaults to ``map_variables=True``. Additionally, the deprecated ``recolumn`` parameter is now removed. (:issue:`2324`, :pull:`2408`) * Remove :py:func:`!pvlib.atmosphere.first_solar_spectral_correction`, deprecated in v0.10.0. @@ -77,7 +77,6 @@ Testing (:issue:`2340`, :pull:`2341`) * Add tests for time-conversion functions in :py:mod:`pvlib.tools`. (:issue:`2340`, :pull:`2341`) - Maintenance ~~~~~~~~~~~ * Fix ReadTheDocs builds by upgrading `readthedocs.yml` configuration @@ -85,7 +84,6 @@ Maintenance * asv 0.4.2 upgraded to asv 0.6.4 to fix CI failure due to pinned older conda. (:pull:`2352`) - Contributors ~~~~~~~~~~~~ * Rajiv Daxini (:ghuser:`RDaxini`) From 1e1eb08f8730b83e1ed53f741e89c0f1ca64db1b Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 15:45:07 -0400 Subject: [PATCH 05/10] rename 0.11.3 to 0.12.0 --- docs/sphinx/source/whatsnew.rst | 2 +- docs/sphinx/source/whatsnew/{v0.11.3.rst => v0.12.0.rst} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename docs/sphinx/source/whatsnew/{v0.11.3.rst => v0.12.0.rst} (98%) diff --git a/docs/sphinx/source/whatsnew.rst b/docs/sphinx/source/whatsnew.rst index 34ade38b4e..ab2ad0ef2a 100644 --- a/docs/sphinx/source/whatsnew.rst +++ b/docs/sphinx/source/whatsnew.rst @@ -6,7 +6,7 @@ What's New These are new features and improvements of note in each release. -.. include:: whatsnew/v0.11.3.rst +.. include:: whatsnew/v0.12.0.rst .. include:: whatsnew/v0.11.2.rst .. include:: whatsnew/v0.11.1.rst .. include:: whatsnew/v0.11.0.rst diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.12.0.rst similarity index 98% rename from docs/sphinx/source/whatsnew/v0.11.3.rst rename to docs/sphinx/source/whatsnew/v0.12.0.rst index dc7a0268f6..3253fb2401 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.12.0.rst @@ -1,8 +1,8 @@ -.. _whatsnew_01130: +.. _whatsnew_01200: -v0.11.3 (Anticipated March, 2025) ---------------------------------- +v0.12.0 (March 19, 2025) +------------------------ Breaking Changes ~~~~~~~~~~~~~~~~ From bd37bbb4e17555646170a1d56e9ffcc6e5670db1 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 16:11:46 -0400 Subject: [PATCH 06/10] add missed edits to contributing guide for new tests location --- docs/sphinx/source/contributing/testing.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sphinx/source/contributing/testing.rst b/docs/sphinx/source/contributing/testing.rst index 0ece283143..88152963f7 100644 --- a/docs/sphinx/source/contributing/testing.rst +++ b/docs/sphinx/source/contributing/testing.rst @@ -20,13 +20,13 @@ typically more efficient to run and debug the tests in your own local environment. To run the tests locally, install the ``test`` dependencies specified in the -`setup.py `_ +`pyproject.toml `_ file. See :ref:`installation` instructions for more information. pvlib's unit tests can easily be run by executing ``pytest`` on the -pvlib directory:: +tests directory:: - pytest pvlib + pytest tests or, for a single module:: @@ -39,7 +39,7 @@ or, for a single test:: We suggest using pytest's ``--pdb`` flag to debug test failures rather than using ``print`` or ``logging`` calls. For example:: - pytest pvlib --pdb + pytest tests --pdb will drop you into the `pdb debugger `_ at the @@ -50,7 +50,7 @@ to the test suite (with rare exceptions). To include all network-dependent tests, include the ``--remote-data`` flag to your ``pytest`` call:: - pytest pvlib --remote-data + pytest tests --remote-data And consider adding ``@pytest.mark.remote_data`` to any network dependent test you submit for a PR. From 6e5a7784866bc35a6b2d91b0ed20c87ced428f90 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 16:12:44 -0400 Subject: [PATCH 07/10] remove missed `fail_on_pvlib_version` decorator for get_am15g --- tests/spectrum/test_irradiance.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/spectrum/test_irradiance.py b/tests/spectrum/test_irradiance.py index 213346e071..df792c0668 100644 --- a/tests/spectrum/test_irradiance.py +++ b/tests/spectrum/test_irradiance.py @@ -4,10 +4,9 @@ import numpy as np from pvlib import spectrum -from tests.conftest import assert_series_equal, fail_on_pvlib_version +from tests.conftest import assert_series_equal -@fail_on_pvlib_version('0.12') def test_get_reference_spectra_am15g(): # test that the reference spectrum is read and interpolated correctly e = spectrum.get_reference_spectra()['global'] From 10f6cce4952c59e093551da49a5d8c8db14c2ea6 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 16:17:35 -0400 Subject: [PATCH 08/10] remove duplicated entries --- docs/sphinx/source/whatsnew/v0.12.0.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.12.0.rst b/docs/sphinx/source/whatsnew/v0.12.0.rst index 3253fb2401..9d94b02aff 100644 --- a/docs/sphinx/source/whatsnew/v0.12.0.rst +++ b/docs/sphinx/source/whatsnew/v0.12.0.rst @@ -6,12 +6,6 @@ v0.12.0 (March 19, 2025) Breaking Changes ~~~~~~~~~~~~~~~~ -* The :py:attr:`pvlib.location.Location.pytz` attribute is now read only. The - ``pytz`` attribute is now set internally to be consistent with the - :py:attr:`pvlib.location.Location.tz` attribute. (:issue:`2340`, :pull:`2341`) -* Users must now provide :py:attr:`ModelChain.spectral_model`, or the 'no_loss' spectral - model is assumed. :py:class:`~pvlib.modelchain.ModelChain` no longer attempts to infer - the spectral model from :py:class:`~pvlib.pvsystem.PVSystem` attributes. (:issue:`2017`, :pull:`2253`) * The :py:attr:`pvlib.location.Location.pytz` attribute is now read only. The ``pytz`` attribute is now set internally to be consistent with the :py:attr:`pvlib.location.Location.tz` attribute. (:issue:`2340`, :pull:`2341`) From ea6834e2466ed99cd001e752b5e03a9bc6a51e4e Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 16:36:18 -0400 Subject: [PATCH 09/10] a few more rst fixes --- docs/sphinx/source/whatsnew/v0.12.0.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.12.0.rst b/docs/sphinx/source/whatsnew/v0.12.0.rst index 9d94b02aff..5f489c9997 100644 --- a/docs/sphinx/source/whatsnew/v0.12.0.rst +++ b/docs/sphinx/source/whatsnew/v0.12.0.rst @@ -29,13 +29,13 @@ Bug fixes :py:func:`~pvlib.snow.coverage_nrel`. The check uses snow depth on the ground to improve modeling for systems with shallow tilt angles. The check adds a new, optional parameter ``snow_depth``. (:issue:`1171`, :pull:`2292`) -* Fix a bug in :py:func:`pvlib.bifacial.get_irradiance_poa` which may have yielded non-zero +* Fix a bug in :py:func:`pvlib.bifacial.infinite_sheds.get_irradiance_poa` which may have yielded non-zero ground irradiance when the sun was below the horizon. (:issue:`2245`, :pull:`2359`) * Fix a bug where :py:func:`pvlib.transformer.simple_efficiency` could only be imported using the ``from pvlib.transformer`` syntax. (:pull:`2388`) * :py:class:`~pvlib.modelchain.ModelChain` now requires only a minimal set of parameters to run the SAPM electrical model. (:issue:`2369`, :pull:`2393`) -* Correct keys for First Solar modules in `~pvlib.spectrum.spectral_factor_pvspec`. (:issue:`2398`, :pull:`2400`) +* Correct keys for First Solar modules in :py:func:`~pvlib.spectrum.spectral_factor_pvspec`. (:issue:`2398`, :pull:`2400`) * Ensure proper tz and pytz types in :py:class:`~pvlib.location.Location`. To ensure that the time zone in :py:class:`~pvlib.location.Location` remains internally consistent if/when the time zone is updated, the ``tz`` attribute is now the single source @@ -73,7 +73,7 @@ Testing Maintenance ~~~~~~~~~~~ -* Fix ReadTheDocs builds by upgrading `readthedocs.yml` configuration +* Fix ReadTheDocs builds by upgrading ``readthedocs.yml`` configuration (:issue:`2357`, :pull:`2358`) * asv 0.4.2 upgraded to asv 0.6.4 to fix CI failure due to pinned older conda. (:pull:`2352`) From c2eee4e81a796240f9f786b5230122d247dda0c4 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 19 Mar 2025 18:27:24 -0400 Subject: [PATCH 10/10] Update docs/sphinx/source/whatsnew/v0.12.0.rst Co-authored-by: RDaxini <143435106+RDaxini@users.noreply.github.com> --- docs/sphinx/source/whatsnew/v0.12.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.12.0.rst b/docs/sphinx/source/whatsnew/v0.12.0.rst index 5f489c9997..98abb20d14 100644 --- a/docs/sphinx/source/whatsnew/v0.12.0.rst +++ b/docs/sphinx/source/whatsnew/v0.12.0.rst @@ -66,7 +66,7 @@ Testing ~~~~~~~ * Move tests folder to ``/tests`` and data exclusively used for testing to ``/tests/data``. (:issue:`2271`, :pull:`2277`) -* Add Python 3.13 to test suite. (:pull:`2258`) +* Add Python 3.13 to test suite. (:issue:`2201`, :pull:`2258`) * Add tests for all input types for the :py:attr:`pvlib.location.Location.tz` attribute. (:issue:`2340`, :pull:`2341`) * Add tests for time-conversion functions in :py:mod:`pvlib.tools`. (:issue:`2340`, :pull:`2341`)