Skip to content

Finalize v0.12.0 #2413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 19, 2025
10 changes: 5 additions & 5 deletions docs/sphinx/source/contributing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/pvlib/pvlib-python/blob/main/setup.py>`_
`pyproject.toml <https://github.com/pvlib/pvlib-python/blob/main/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::

Expand All @@ -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 <https://docs.python.org/3/library/pdb.html>`_ at the
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/reference/pv_modeling/system_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
.. _whatsnew_01130:
.. _whatsnew_01200:

Copy link
Contributor

@RDaxini RDaxini Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would adding .. module:: pvlib enable us to omit the pvlib. in front of functions/classes/modules and the ~ we then use to hide it manually anyway?

Suggested change
.. module:: pvlib

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've wondered about that. module or maybe currentmodule. Let's take a look at that sometime (not this time). It sure would be nice to not have to have pvlib. all over the place.


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.
Expand All @@ -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`)
Expand All @@ -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`)
3 changes: 1 addition & 2 deletions tests/spectrum/test_irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down