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. 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 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 50% rename from docs/sphinx/source/whatsnew/v0.11.3.rst rename to docs/sphinx/source/whatsnew/v0.12.0.rst index 82ce0a1e32..98abb20d14 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.12.0.rst @@ -1,19 +1,19 @@ -.. _whatsnew_01130: +.. _whatsnew_01200: -v0.11.3 (Anticipated March, 2025) ---------------------------------- +v0.12.0 (March 19, 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`) -* 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. @@ -28,65 +28,56 @@ 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`) -* Fix a bug in :py:func:`pvlib.bifacial.get_irradiance_poa` which may have yielded non-zero + adds a new, optional parameter ``snow_depth``. (:issue:`1171`, :pull:`2292`) +* 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`) + 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 :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 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. (: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 pvlib.tools. (:issue:`2340`, :pull:`2341`) - - -Requirements -~~~~~~~~~~~~ - +* Add tests for time-conversion functions in :py:mod:`pvlib.tools`. (:issue:`2340`, :pull:`2341`) 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`) - Contributors ~~~~~~~~~~~~ * Rajiv Daxini (:ghuser:`RDaxini`) @@ -99,3 +90,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`) 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']