Repository: pvlib/pvlib-python
Pull request #772 (2019-08-23 22:15:08)

remove functions marked for 0.7 removal
 - [x] Closes issue #xxxx
 - [x] I am familiar with the [contributing guidelines](http://pvlib-python.readthedocs.io/en/latest/contributing.html).
 - [x] Fully tested. Added and/or modified tests to ensure correct behavior for all reasonable inputs. Tests (usually) must pass on the TravisCI and Appveyor testing services.
 - [x] Updates entries to `docs/sphinx/source/api.rst` for API changes.
 - [x] Adds description and name entries in the appropriate `docs/sphinx/source/whatsnew` file for all changes.
 - [x] Code quality and style is sufficient. Passes LGTM and SticklerCI checks.
 - [x] New code is fully documented. Includes sphinx/numpydoc compliant docstrings and comments in the code where necessary.
 - [x] Pull request is nearly complete and ready for detailed review.



wholmgren: There are a couple of deprecations in ModelChain that I will handle in a follow up PR because they are slightly less straightforward.

Patch:
diff --git a/docs/sphinx/source/whatsnew/v0.7.0.rst b/docs/sphinx/source/whatsnew/v0.7.0.rst
index dd2e580..20668a3 100644
--- a/docs/sphinx/source/whatsnew/v0.7.0.rst
+++ b/docs/sphinx/source/whatsnew/v0.7.0.rst
@@ -10,10 +10,17 @@ compatibility notes.
 **Python 2.7 support ended on June 1, 2019.** (:issue:`501`)
 **Minimum numpy version is now 1.10.4. Minimum pandas version is now 0.18.1.**
 
+API Changes
+~~~~~~~~~~~
+* Calling :py:func:`pvlib.pvsystem.retrieve_sam` with no parameters will raise
+  an exception instead of displaying a dialog.
+
 Enhancements
 ~~~~~~~~~~~~
 * Created two new incidence angle modifier functions: :py:func:`pvlib.pvsystem.iam_martin_ruiz`
   and :py:func:`pvlib.pvsystem.iam_interp`. (:issue:`751`)
+* Added recombination current parameters to bishop88 single-diode functions and also
+  to :py:func:`pvlib.pvsystem.max_power_point`. (:issue:`762`)
 
 Bug fixes
 ~~~~~~~~~
@@ -30,6 +37,16 @@ Testing
 * Added 30 minutes to timestamps in `test_psm3.csv` to match change in NSRDB (:issue:`733`)
 * Added tests for methods in bifacial.py.
 
+Removal of prior version deprecations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Removed `irradiance.extraradiation`.
+* Removed `irradiance.grounddiffuse`.
+* Removed `irradiance.total_irrad`.
+* Removed `irradiance.globalinplane`.
+* Removed `atmosphere.relativeairmass`.
+* Removed `atmosphere.relativeairmass`.
+* Removed `solarposition.get_sun_rise_set_transit`.
+* Removed `tmy` module.
 
 Contributors
 ~~~~~~~~~~~~
@@ -38,3 +55,4 @@ Contributors
 * Oscar Dowson (:ghuser:`odow`)
 * Anton Driesse (:ghuser:`adriesse`)
 * Alexander Morgan (:ghuser:`alexandermorgan`)
+* Miguel Sánchez de León Peque (:ghuser:`Peque`)
diff --git a/pvlib/__init__.py b/pvlib/__init__.py
index 238d481..a1fb92e 100644
--- a/pvlib/__init__.py
+++ b/pvlib/__init__.py
@@ -12,6 +12,3 @@ from pvlib import pvsystem
 from pvlib import spa
 from pvlib import modelchain
 from pvlib import singlediode
-
-# for backwards compatibility for pvlib.tmy module
-from pvlib import tmy
diff --git a/pvlib/atmosphere.py b/pvlib/atmosphere.py
index 743010e..6be7a33 100644
--- a/pvlib/atmosphere.py
+++ b/pvlib/atmosphere.py
@@ -8,7 +8,6 @@ from warnings import warn
 import numpy as np
 import pandas as pd
 
-from pvlib._deprecation import deprecated
 
 APPARENT_ZENITH_MODELS = ('simple', 'kasten1966', 'kastenyoung1989',
                           'gueymard1993', 'pickering2002')
@@ -135,11 +134,6 @@ def get_absolute_airmass(airmass_relative, pressure=101325.):
     return airmass_absolute
 
 
-absoluteairmass = deprecated('0.6', alternative='get_absolute_airmass',
-                             name='absoluteairmass', removal='0.7')(
-                             get_absolute_airmass)
-
-
 def get_relative_airmass(zenith, model='kastenyoung1989'):
     '''
     Gives the relative (not pressure-corrected) airmass.
@@ -246,11 +240,6 @@ def get_relative_airmass(zenith, model='kastenyoung1989'):
     return am
 
 
-relativeairmass = deprecated('0.6', alternative='get_relative_airmass',
-                             name='relativeairmass', removal='0.7')(
-                             get_relative_airmass)
-
-
 def gueymard94_pw(temp_air, relative_humidity):
     r"""
     Calculates precipitable water (cm) from ambient air temperature (C)
diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py
index 55b4552..2749ca7 100644
--- a/pvlib/irradiance.py
+++ b/pvlib/irradiance.py
@@ -12,7 +12,6 @@ import numpy as np
 import pandas as pd
 
 from pvlib import atmosphere, solarposition, tools
-from pvlib._deprecation import deprecated
 
 # see References section of grounddiffuse function
 SURFACE_ALBEDOS = {'urban': 0.18,
@@ -114,11 +113,6 @@ def get_extra_radiation(datetime_or_doy, solar_constant=1366.1,
     return Ea
 
 
-extraradiation = deprecated('0.6', alternative='get_extra_radiation',
-                            name='extraradiation', removal='0.7')(
-                            get_extra_radiation)
-
-
 def _handle_extra_radiation_types(datetime_or_doy, epoch_year):
     # This block will set the functions that can be used to convert the
     # inputs to either day of year or pandas DatetimeIndex, and the
@@ -372,11 +366,6 @@ def get_total_irradiance(surface_tilt, surface_azimuth,
     return irrads
 
 
-total_irrad = deprecated('0.6', alternative='get_total_irradiance',
-                         name='total_irrad', removal='0.7')(
-                         get_total_irradiance)
-
-
 def get_sky_diffuse(surface_tilt, surface_azimuth,
                     solar_zenith, solar_azimuth,
                     dni, ghi, dhi, dni_extra=None, airmass=None,
@@ -508,65 +497,6 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse):
     return irrads
 
 
-# globalinplane returns less data than poa_components, so better
-# to copy it
-@deprecated('0.6', alternative='poa_components', removal='0.7')
-def globalinplane(aoi, dni, poa_sky_diffuse, poa_ground_diffuse):
-    r'''
-    Determine the three components on in-plane irradiance
-
-    Combines in-plane irradaince compoents from the chosen diffuse
-    translation, ground reflection and beam irradiance algorithms into
-    the total in-plane irradiance.
-
-    Parameters
-    ----------
-    aoi : numeric
-        Angle of incidence of solar rays with respect to the module
-        surface, from :func:`aoi`.
-
-    dni : numeric
-        Direct normal irradiance (W/m^2), as measured from a TMY file or
-        calculated with a clearsky model.
-
-    poa_sky_diffuse : numeric
-        Diffuse irradiance (W/m^2) in the plane of the modules, as
-        calculated by a diffuse irradiance translation function
-
-    poa_ground_diffuse : numeric
-        Ground reflected irradiance (W/m^2) in the plane of the modules,
-        as calculated by an albedo model (eg. :func:`grounddiffuse`)
-
-    Returns
-    -------
-    irrads : OrderedDict or DataFrame
-        Contains the following keys:
-
-        * ``poa_global`` : Total in-plane irradiance (W/m^2)
-        * ``poa_direct`` : Total in-plane beam irradiance (W/m^2)
-        * ``poa_diffuse`` : Total in-plane diffuse irradiance (W/m^2)
-
-    Notes
-    ------
-    Negative beam irradiation due to aoi :math:`> 90^{\circ}` or AOI
-    :math:`< 0^{\circ}` is set to zero.
-    '''
-
-    poa_direct = np.maximum(dni * np.cos(np.radians(aoi)), 0)
-    poa_global = poa_direct + poa_sky_diffuse + poa_ground_diffuse
-    poa_diffuse = poa_sky_diffuse + poa_ground_diffuse
-
-    irrads = OrderedDict()
-    irrads['poa_global'] = poa_global
-    irrads['poa_direct'] = poa_direct
-    irrads['poa_diffuse'] = poa_diffuse
-
-    if isinstance(poa_direct, pd.Series):
-        irrads = pd.DataFrame(irrads)
-
-    return irrads
-
-
 def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None):
     '''
     Estimate diffuse irradiance from ground reflections given
@@ -632,11 +562,6 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None):
     return diffuse_irrad
 
 
-grounddiffuse = deprecated('0.6', alternative='get_ground_diffuse',
-                           name='grounddiffuse', removal='0.7')(
-                           get_ground_diffuse)
-
-
 def isotropic(surface_tilt, dhi):
     r'''
     Determine diffuse irradiance from the sky on a tilted surface using
diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py
index f040b5f..1a3969d 100644
--- a/pvlib/pvsystem.py
+++ b/pvlib/pvsystem.py
@@ -1717,9 +1717,6 @@ def retrieve_sam(name=None, path=None):
     path : None or string, default None
         Path to the SAM file. May also be a URL.
 
-    If both name and path are None, a dialogue will open allowing the
-    user to select a file.
-
     Returns
     -------
     samfile : DataFrame
@@ -1727,6 +1724,11 @@ def retrieve_sam(name=None, path=None):
         Each column represents a module or inverter, and a specific
         dataset can be retrieved by the command
 
+    Raises
+    ------
+    ValueError
+        If no name or path is provided.
+
     Notes
     -----
     Files available at https://sam.nrel.gov/sites/default/files/
@@ -1781,11 +1783,7 @@ def retrieve_sam(name=None, path=None):
         else:
             csvdata = path
     elif name is None and path is None:
-        import tkinter
-        from tkinter.filedialog import askopenfilename
-
-        tkinter.Tk().withdraw()
-        csvdata = askopenfilename()
+        raise ValueError("A name or path must be provided!")
 
     return _parse_raw_sam_df(csvdata)
 
@@ -2473,7 +2471,8 @@ def singlediode(photocurrent, saturation_current, resistance_series,
 
 
 def max_power_point(photocurrent, saturation_current, resistance_series,
-                    resistance_shunt, nNsVth, method='brentq'):
+                    resistance_shunt, nNsVth, d2mutau=0, NsVbi=np.Inf,
+                    method='brentq'):
     """
     Given the single diode equation coefficients, calculates the maximum power
     point (MPP).
@@ -2491,6 +2490,17 @@ def max_power_point(photocurrent, saturation_current, resistance_series,
     nNsVth : numeric
         product of thermal voltage ``Vth`` [V], diode ideality factor ``n``,
         and number of serices cells ``Ns``
+    d2mutau : numeric, default 0
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that accounts for recombination current in the
+        intrinsic layer. The value is the ratio of intrinsic layer thickness
+        squared :math:`d^2` to the diffusion length of charge carriers
+        :math:`\\mu \\tau`. [V]
+    NsVbi : numeric, default np.inf
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that is the product of the PV module number of series
+        cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
+        [V].
     method : str
         either ``'newton'`` or ``'brentq'``
 
@@ -2508,7 +2518,8 @@ def max_power_point(photocurrent, saturation_current, resistance_series,
     """
     i_mp, v_mp, p_mp = _singlediode.bishop88_mpp(
         photocurrent, saturation_current, resistance_series,
-        resistance_shunt, nNsVth, method=method.lower()
+        resistance_shunt, nNsVth, d2mutau=0, NsVbi=np.Inf,
+        method=method.lower()
     )
     if isinstance(photocurrent, pd.Series):
         ivp = {'i_mp': i_mp, 'v_mp': v_mp, 'p_mp': p_mp}
diff --git a/pvlib/singlediode.py b/pvlib/singlediode.py
index 49f1f4e..d466c77 100644
--- a/pvlib/singlediode.py
+++ b/pvlib/singlediode.py
@@ -94,14 +94,17 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
     nNsVth : numeric
         product of thermal voltage ``Vth`` [V], diode ideality factor ``n``,
         and number of series cells ``Ns``
-    d2mutau : numeric
-        PVSyst thin-film recombination parameter that is the ratio of thickness
-        of the intrinsic layer squared :math:`d^2` and the diffusion length of
-        charge carriers :math:`\\mu \\tau`, in volts [V], defaults to 0[V]
-    NsVbi : numeric
-        PVSyst thin-film recombination parameter that is the product of the PV
-        module number of series cells ``Ns`` and the builtin voltage ``Vbi`` of
-        the intrinsic layer, in volts [V], defaults to ``np.inf``
+    d2mutau : numeric, default 0
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that accounts for recombination current in the
+        intrinsic layer. The value is the ratio of intrinsic layer thickness
+        squared :math:`d^2` to the diffusion length of charge carriers
+        :math:`\\mu \\tau`. [V]
+    NsVbi : numeric, default np.inf
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that is the product of the PV module number of series
+        cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
+        [V].
     gradients : bool
         False returns only I, V, and P. True also returns gradients
 
@@ -116,8 +119,8 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
     Notes
     -----
     The PVSyst thin-film recombination losses parameters ``d2mutau`` and
-    ``NsVbi`` are only applied to cadmium-telluride (CdTe) and amorphous-
-    silicon (a:Si) PV modules, [2]_, [3]_. The builtin voltage :math:`V_{bi}`
+    ``NsVbi`` should only be applied to cadmium-telluride (CdTe) and amorphous-
+    silicon (a-Si) PV modules, [2]_, [3]_. The builtin voltage :math:`V_{bi}`
     should account for all junctions. For example: tandem and triple junction
     cells would have builtin voltages of 1.8[V] and 2.7[V] respectively, based
     on the default of 0.9[V] for a single junction. The parameter ``NsVbi``
@@ -173,7 +176,7 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
 
 def bishop88_i_from_v(voltage, photocurrent, saturation_current,
                       resistance_series, resistance_shunt, nNsVth,
-                      method='newton'):
+                      d2mutau=0, NsVbi=np.Inf, method='newton'):
     """
     Find current given any voltage.
 
@@ -192,6 +195,17 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
     nNsVth : numeric
         product of diode ideality factor (n), number of series cells (Ns), and
         thermal voltage (Vth = k_b * T / q_e) in volts [V]
+    d2mutau : numeric, default 0
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that accounts for recombination current in the
+        intrinsic layer. The value is the ratio of intrinsic layer thickness
+        squared :math:`d^2` to the diffusion length of charge carriers
+        :math:`\\mu \\tau`. [V]
+    NsVbi : numeric, default np.inf
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that is the product of the PV module number of series
+        cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
+        [V].
     method : str
         one of two optional search methods: either ``'brentq'``, a reliable and
         bounded method or ``'newton'`` which is the default.
@@ -203,7 +217,7 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
     """
     # collect args
     args = (photocurrent, saturation_current, resistance_series,
-            resistance_shunt, nNsVth)
+            resistance_shunt, nNsVth, d2mutau, NsVbi)
 
     def fv(x, v, *a):
         # calculate voltage residual given diode voltage "x"
@@ -216,8 +230,9 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
         # brentq only works with scalar inputs, so we need a set up function
         # and np.vectorize to repeatedly call the optimizer with the right
         # arguments for possible array input
-        def vd_from_brent(voc, v, iph, isat, rs, rsh, gamma):
-            return brentq(fv, 0.0, voc, args=(v, iph, isat, rs, rsh, gamma))
+        def vd_from_brent(voc, v, iph, isat, rs, rsh, gamma, d2mutau, NsVbi):
+            return brentq(fv, 0.0, voc,
+                          args=(v, iph, isat, rs, rsh, gamma, d2mutau, NsVbi))
 
         vd_from_brent_vectorized = np.vectorize(vd_from_brent)
         vd = vd_from_brent_vectorized(voc_est, voltage, *args)
@@ -235,7 +250,7 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
 
 def bishop88_v_from_i(current, photocurrent, saturation_current,
                       resistance_series, resistance_shunt, nNsVth,
-                      method='newton'):
+                      d2mutau=0, NsVbi=np.Inf, method='newton'):
     """
     Find voltage given any current.
 
@@ -254,6 +269,17 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
     nNsVth : numeric
         product of diode ideality factor (n), number of series cells (Ns), and
         thermal voltage (Vth = k_b * T / q_e) in volts [V]
+    d2mutau : numeric, default 0
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that accounts for recombination current in the
+        intrinsic layer. The value is the ratio of intrinsic layer thickness
+        squared :math:`d^2` to the diffusion length of charge carriers
+        :math:`\\mu \\tau`. [V]
+    NsVbi : numeric, default np.inf
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that is the product of the PV module number of series
+        cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
+        [V].
     method : str
         one of two optional search methods: either ``'brentq'``, a reliable and
         bounded method or ``'newton'`` which is the default.
@@ -265,7 +291,7 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
     """
     # collect args
     args = (photocurrent, saturation_current, resistance_series,
-            resistance_shunt, nNsVth)
+            resistance_shunt, nNsVth, d2mutau, NsVbi)
     # first bound the search using voc
     voc_est = estimate_voc(photocurrent, saturation_current, nNsVth)
 
@@ -277,8 +303,9 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
         # brentq only works with scalar inputs, so we need a set up function
         # and np.vectorize to repeatedly call the optimizer with the right
         # arguments for possible array input
-        def vd_from_brent(voc, i, iph, isat, rs, rsh, gamma):
-            return brentq(fi, 0.0, voc, args=(i, iph, isat, rs, rsh, gamma))
+        def vd_from_brent(voc, i, iph, isat, rs, rsh, gamma, d2mutau, NsVbi):
+            return brentq(fi, 0.0, voc,
+                          args=(i, iph, isat, rs, rsh, gamma, d2mutau, NsVbi))
 
         vd_from_brent_vectorized = np.vectorize(vd_from_brent)
         vd = vd_from_brent_vectorized(voc_est, current, *args)
@@ -295,7 +322,8 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
 
 
 def bishop88_mpp(photocurrent, saturation_current, resistance_series,
-                 resistance_shunt, nNsVth, method='newton'):
+                 resistance_shunt, nNsVth, d2mutau=0, NsVbi=np.Inf,
+                 method='newton'):
     """
     Find max power point.
 
@@ -312,6 +340,17 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
     nNsVth : numeric
         product of diode ideality factor (n), number of series cells (Ns), and
         thermal voltage (Vth = k_b * T / q_e) in volts [V]
+    d2mutau : numeric, default 0
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that accounts for recombination current in the
+        intrinsic layer. The value is the ratio of intrinsic layer thickness
+        squared :math:`d^2` to the diffusion length of charge carriers
+        :math:`\\mu \\tau`. [V]
+    NsVbi : numeric, default np.inf
+        PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
+        (a-Si) modules that is the product of the PV module number of series
+        cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
+        [V].
     method : str
         one of two optional search methods: either ``'brentq'``, a reliable and
         bounded method or ``'newton'`` which is the default.
@@ -324,7 +363,7 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
     """
     # collect args
     args = (photocurrent, saturation_current, resistance_series,
-            resistance_shunt, nNsVth)
+            resistance_shunt, nNsVth, d2mutau, NsVbi)
     # first bound the search using voc
     voc_est = estimate_voc(photocurrent, saturation_current, nNsVth)
 
@@ -334,8 +373,9 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
     if method.lower() == 'brentq':
         # break out arguments for numpy.vectorize to handle broadcasting
         vec_fun = np.vectorize(
-            lambda voc, iph, isat, rs, rsh, gamma:
-                brentq(fmpp, 0.0, voc, args=(iph, isat, rs, rsh, gamma))
+            lambda voc, iph, isat, rs, rsh, gamma, d2mutau, NsVbi:
+                brentq(fmpp, 0.0, voc,
+                       args=(iph, isat, rs, rsh, gamma, d2mutau, NsVbi))
         )
         vd = vec_fun(voc_est, *args)
     elif method.lower() == 'newton':
diff --git a/pvlib/solarposition.py b/pvlib/solarposition.py
index be7f33a..7a51fc6 100644
--- a/pvlib/solarposition.py
+++ b/pvlib/solarposition.py
@@ -443,12 +443,6 @@ def sun_rise_set_transit_spa(times, latitude, longitude, how='numpy',
                                            'transit': transit})
 
 
-get_sun_rise_set_transit = deprecated('0.6.1',
-                                      alternative='sun_rise_set_transit_spa',
-                                      name='get_sun_rise_set_transit',
-                                      removal='0.7')(sun_rise_set_transit_spa)
-
-
 def _ephem_convert_to_seconds_and_microseconds(date):
     # utility from unreleased PyEphem 3.6.7.1
     """Converts a PyEphem date into seconds"""
diff --git a/pvlib/tmy.py b/pvlib/tmy.py
deleted file mode 100644
index 6299d52..0000000
--- a/pvlib/tmy.py
+++ /dev/null
@@ -1,13 +0,0 @@
-"""
-Deprecated version of pvlib.iotools.tmy
-"""
-
-from pvlib.iotools import read_tmy2, read_tmy3
-
-from pvlib._deprecation import deprecated
-
-readtmy2 = deprecated('0.6.1', alternative='iotools.read_tmy2',
-                      name='readtmy2', removal='0.7')(read_tmy2)
-
-readtmy3 = deprecated('0.6.1', alternative='iotools.read_tmy3',
-                      name='readtmy3', removal='0.7')(read_tmy3)


Test patch:
diff --git a/pvlib/test/conftest.py b/pvlib/test/conftest.py
index d26ff00..ee50b52 100644
--- a/pvlib/test/conftest.py
+++ b/pvlib/test/conftest.py
@@ -149,3 +149,203 @@ except ImportError:
 
 requires_pvfactors = pytest.mark.skipif(not has_pvfactors,
                                         reason='requires pvfactors')
+
+
+@pytest.fixture(scope="session")
+def sam_data():
+    data = {}
+    data['sandiamod'] = pvlib.pvsystem.retrieve_sam('sandiamod')
+    data['adrinverter'] = pvlib.pvsystem.retrieve_sam('adrinverter')
+    return data
+
+
+@pytest.fixture(scope="function")
+def pvsyst_module_params():
+    """
+    Define some PVSyst module parameters for testing.
+
+    The scope of the fixture is set to ``'function'`` to allow tests to modify
+    parameters if required without affecting other tests.
+    """
+    parameters = {
+        'gamma_ref': 1.05,
+        'mu_gamma': 0.001,
+        'I_L_ref': 6.0,
+        'I_o_ref': 5e-9,
+        'EgRef': 1.121,
+        'R_sh_ref': 300,
+        'R_sh_0': 1000,
+        'R_s': 0.5,
+        'R_sh_exp': 5.5,
+        'cells_in_series': 60,
+        'alpha_sc': 0.001,
+    }
+    return parameters
+
+
+@pytest.fixture(scope='function')
+def cec_inverter_parameters():
+    """
+    Define some CEC inverter parameters for testing.
+
+    The scope of the fixture is set to ``'function'`` to allow tests to modify
+    parameters if required without affecting other tests.
+    """
+    parameters = {
+        'Name': 'ABB: MICRO-0.25-I-OUTD-US-208 208V [CEC 2014]',
+        'Vac': 208.0,
+        'Paco': 250.0,
+        'Pdco': 259.5220505,
+        'Vdco': 40.24260317,
+        'Pso': 1.771614224,
+        'C0': -2.48e-5,
+        'C1': -9.01e-5,
+        'C2': 6.69e-4,
+        'C3': -0.0189,
+        'Pnt': 0.02,
+        'Vdcmax': 65.0,
+        'Idcmax': 10.0,
+        'Mppt_low': 20.0,
+        'Mppt_high': 50.0,
+    }
+    return parameters
+
+
+@pytest.fixture(scope='function')
+def cec_module_params():
+    """
+    Define some CEC module parameters for testing.
+
+    The scope of the fixture is set to ``'function'`` to allow tests to modify
+    parameters if required without affecting other tests.
+    """
+    parameters = {
+        'Name': 'Example Module',
+        'BIPV': 'Y',
+        'Date': '4/28/2008',
+        'T_NOCT': 65,
+        'A_c': 0.67,
+        'N_s': 18,
+        'I_sc_ref': 7.5,
+        'V_oc_ref': 10.4,
+        'I_mp_ref': 6.6,
+        'V_mp_ref': 8.4,
+        'alpha_sc': 0.003,
+        'beta_oc': -0.04,
+        'a_ref': 0.473,
+        'I_L_ref': 7.545,
+        'I_o_ref': 1.94e-09,
+        'R_s': 0.094,
+        'R_sh_ref': 15.72,
+        'Adjust': 10.6,
+        'gamma_r': -0.5,
+        'Version': 'MM105',
+        'PTC': 48.9,
+        'Technology': 'Multi-c-Si',
+    }
+    return parameters
+
+
+@pytest.fixture(scope='function')
+def cec_module_cs5p_220m():
+    """
+    Define Canadian Solar CS5P-220M module parameters for testing.
+
+    The scope of the fixture is set to ``'function'`` to allow tests to modify
+    parameters if required without affecting other tests.
+    """
+    parameters = {
+        'Name': 'Canadian Solar CS5P-220M',
+        'BIPV': 'N',
+        'Date': '10/5/2009',
+        'T_NOCT': 42.4,
+        'A_c': 1.7,
+        'N_s': 96,
+        'I_sc_ref': 5.1,
+        'V_oc_ref': 59.4,
+        'I_mp_ref': 4.69,
+        'V_mp_ref': 46.9,
+        'alpha_sc': 0.004539,
+        'beta_oc': -0.22216,
+        'a_ref': 2.6373,
+        'I_L_ref': 5.114,
+        'I_o_ref': 8.196e-10,
+        'R_s': 1.065,
+        'R_sh_ref': 381.68,
+        'Adjust': 8.7,
+        'gamma_r': -0.476,
+        'Version': 'MM106',
+        'PTC': 200.1,
+        'Technology': 'Mono-c-Si',
+    }
+    return parameters
+
+
+@pytest.fixture(scope='function')
+def cec_module_spr_e20_327():
+    """
+    Define SunPower SPR-E20-327 module parameters for testing.
+
+    The scope of the fixture is set to ``'function'`` to allow tests to modify
+    parameters if required without affecting other tests.
+    """
+    parameters = {
+        'Name': 'SunPower SPR-E20-327',
+        'BIPV': 'N',
+        'Date': '1/14/2013',
+        'T_NOCT': 46,
+        'A_c': 1.631,
+        'N_s': 96,
+        'I_sc_ref': 6.46,
+        'V_oc_ref': 65.1,
+        'I_mp_ref': 5.98,
+        'V_mp_ref': 54.7,
+        'alpha_sc': 0.004522,
+        'beta_oc': -0.23176,
+        'a_ref': 2.6868,
+        'I_L_ref': 6.468,
+        'I_o_ref': 1.88e-10,
+        'R_s': 0.37,
+        'R_sh_ref': 298.13,
+        'Adjust': -0.1862,
+        'gamma_r': -0.386,
+        'Version': 'NRELv1',
+        'PTC': 301.4,
+        'Technology': 'Mono-c-Si',
+    }
+    return parameters
+
+
+@pytest.fixture(scope='function')
+def cec_module_fs_495():
+    """
+    Define First Solar FS-495 module parameters for testing.
+
+    The scope of the fixture is set to ``'function'`` to allow tests to modify
+    parameters if required without affecting other tests.
+    """
+    parameters = {
+        'Name': 'First Solar FS-495',
+        'BIPV': 'N',
+        'Date': '9/18/2014',
+        'T_NOCT': 44.6,
+        'A_c': 0.72,
+        'N_s': 216,
+        'I_sc_ref': 1.55,
+        'V_oc_ref': 86.5,
+        'I_mp_ref': 1.4,
+        'V_mp_ref': 67.9,
+        'alpha_sc': 0.000924,
+        'beta_oc': -0.22741,
+        'a_ref': 2.9482,
+        'I_L_ref': 1.563,
+        'I_o_ref': 2.64e-13,
+        'R_s': 6.804,
+        'R_sh_ref': 806.27,
+        'Adjust': -10.65,
+        'gamma_r': -0.264,
+        'Version': 'NRELv1',
+        'PTC': 89.7,
+        'Technology': 'CdTe',
+    }
+    return parameters
diff --git a/pvlib/test/test_atmosphere.py b/pvlib/test/test_atmosphere.py
index db0617c..ee4b17a 100644
--- a/pvlib/test/test_atmosphere.py
+++ b/pvlib/test/test_atmosphere.py
@@ -8,9 +8,6 @@ from pandas.util.testing import assert_series_equal
 import pytest
 
 from pvlib import atmosphere
-from pvlib._deprecation import pvlibDeprecationWarning
-
-from conftest import fail_on_pvlib_version
 
 
 def test_pres2alt():
@@ -74,14 +71,6 @@ def test_get_absolute_airmass():
     assert_allclose(out, expected, equal_nan=True, atol=0.001)
 
 
-@fail_on_pvlib_version('0.7')
-def test_deprecated_07():
-    with pytest.warns(pvlibDeprecationWarning):
-        atmosphere.relativeairmass(2)
-    with pytest.warns(pvlibDeprecationWarning):
-        atmosphere.absoluteairmass(2)
-
-
 def test_gueymard94_pw():
     temp_air = np.array([0, 20, 40])
     relative_humidity = np.array([0, 30, 100])
diff --git a/pvlib/test/test_irradiance.py b/pvlib/test/test_irradiance.py
index 27598e7..221b990 100644
--- a/pvlib/test/test_irradiance.py
+++ b/pvlib/test/test_irradiance.py
@@ -12,9 +12,8 @@ from numpy.testing import assert_almost_equal, assert_allclose
 from pandas.util.testing import assert_frame_equal, assert_series_equal
 
 from pvlib import irradiance
-from pvlib._deprecation import pvlibDeprecationWarning
 
-from conftest import (fail_on_pvlib_version, needs_numpy_1_10, pandas_0_22,
+from conftest import (needs_numpy_1_10, pandas_0_22,
                       requires_ephem, requires_numba)
 
 
@@ -68,18 +67,6 @@ def relative_airmass(times):
     return pd.Series([np.nan, 7.58831596, 1.01688136, 3.27930443], times)
 
 
-@fail_on_pvlib_version('0.7')
-def test_deprecated_07():
-    with pytest.warns(pvlibDeprecationWarning):
-        irradiance.extraradiation(300)
-    with pytest.warns(pvlibDeprecationWarning):
-        irradiance.grounddiffuse(40, 900)
-    with pytest.warns(pvlibDeprecationWarning):
-        irradiance.total_irrad(32, 180, 10, 180, 0, 0, 0, 1400, 1)
-    with pytest.warns(pvlibDeprecationWarning):
-        irradiance.globalinplane(0, 1000, 100, 10)
-
-
 # setup for et rad test. put it here for readability
 timestamp = pd.Timestamp('20161026')
 dt_index = pd.DatetimeIndex([timestamp])
diff --git a/pvlib/test/test_modelchain.py b/pvlib/test/test_modelchain.py
index 7fac625..fd2ef40 100644
--- a/pvlib/test/test_modelchain.py
+++ b/pvlib/test/test_modelchain.py
@@ -13,93 +13,77 @@ from pvlib._deprecation import pvlibDeprecationWarning
 from pandas.util.testing import assert_series_equal
 import pytest
 
-from test_pvsystem import sam_data, pvsyst_module_params
 from conftest import fail_on_pvlib_version, requires_scipy, requires_tables
 
 
 @pytest.fixture
-def system(sam_data):
+def system(sam_data, cec_inverter_parameters):
     modules = sam_data['sandiamod']
     module = 'Canadian_Solar_CS5P_220M___2009_'
     module_parameters = modules[module].copy()
-    inverters = sam_data['cecinverter']
-    inverter = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'].copy()
     system = PVSystem(surface_tilt=32.2, surface_azimuth=180,
                       module=module,
                       module_parameters=module_parameters,
-                      inverter_parameters=inverter)
+                      inverter_parameters=cec_inverter_parameters)
     return system
 
 
 @pytest.fixture
-def cec_dc_snl_ac_system(sam_data):
-    modules = sam_data['cecmod']
-    module = 'Canadian_Solar_CS5P_220M'
-    module_parameters = modules[module].copy()
+def cec_dc_snl_ac_system(cec_module_cs5p_220m, cec_inverter_parameters):
+    module_parameters = cec_module_cs5p_220m.copy()
     module_parameters['b'] = 0.05
     module_parameters['EgRef'] = 1.121
     module_parameters['dEgdT'] = -0.0002677
-    inverters = sam_data['cecinverter']
-    inverter = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'].copy()
     system = PVSystem(surface_tilt=32.2, surface_azimuth=180,
-                      module=module,
+                      module=module_parameters['Name'],
                       module_parameters=module_parameters,
-                      inverter_parameters=inverter)
+                      inverter_parameters=cec_inverter_parameters)
     return system
 
 
 @pytest.fixture
-def cec_dc_native_snl_ac_system(sam_data):
-    module = 'Canadian_Solar_CS5P_220M'
-    module_parameters = sam_data['cecmod'][module].copy()
-    inverters = sam_data['cecinverter']
-    inverter = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'].copy()
+def cec_dc_native_snl_ac_system(cec_module_cs5p_220m, cec_inverter_parameters):
+    module_parameters = cec_module_cs5p_220m.copy()
     system = PVSystem(surface_tilt=32.2, surface_azimuth=180,
-                      module=module,
+                      module=module_parameters['Name'],
                       module_parameters=module_parameters,
-                      inverter_parameters=inverter)
+                      inverter_parameters=cec_inverter_parameters)
     return system
 
 
 @pytest.fixture
-def pvsyst_dc_snl_ac_system(sam_data, pvsyst_module_params):
+def pvsyst_dc_snl_ac_system(pvsyst_module_params, cec_inverter_parameters):
     module = 'PVsyst test module'
     module_parameters = pvsyst_module_params
     module_parameters['b'] = 0.05
-    inverters = sam_data['cecinverter']
-    inverter = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'].copy()
     system = PVSystem(surface_tilt=32.2, surface_azimuth=180,
                       module=module,
                       module_parameters=module_parameters,
-                      inverter_parameters=inverter)
+                      inverter_parameters=cec_inverter_parameters)
     return system
 
 
 @pytest.fixture
-def cec_dc_adr_ac_system(sam_data):
-    modules = sam_data['cecmod']
-    module = 'Canadian_Solar_CS5P_220M'
-    module_parameters = modules[module].copy()
+def cec_dc_adr_ac_system(sam_data, cec_module_cs5p_220m):
+    module_parameters = cec_module_cs5p_220m.copy()
     module_parameters['b'] = 0.05
     module_parameters['EgRef'] = 1.121
     module_parameters['dEgdT'] = -0.0002677
     inverters = sam_data['adrinverter']
     inverter = inverters['Zigor__Sunzet_3_TL_US_240V__CEC_2011_'].copy()
     system = PVSystem(surface_tilt=32.2, surface_azimuth=180,
-                      module=module,
+                      module=module_parameters['Name'],
                       module_parameters=module_parameters,
                       inverter_parameters=inverter)
     return system
 
 
 @pytest.fixture
-def pvwatts_dc_snl_ac_system(sam_data):
+def pvwatts_dc_snl_ac_system(cec_inverter_parameters):
     module_parameters = {'pdc0': 220, 'gamma_pdc': -0.003}
-    inverters = sam_data['cecinverter']
-    inverter = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'].copy()
     system = PVSystem(surface_tilt=32.2, surface_azimuth=180,
                       module_parameters=module_parameters,
-                      inverter_parameters=inverter)
+                      inverter_parameters=cec_inverter_parameters)
     return system
 
 
@@ -504,7 +488,7 @@ def test_deprecated_clearsky_07():
 
 
 @requires_scipy
-def test_basic_chain_required(sam_data):
+def test_basic_chain_required(sam_data, cec_inverter_parameters):
     times = pd.date_range(start='20160101 1200-0700',
                           end='20160101 1800-0700', freq='6H')
     latitude = 32
@@ -512,17 +496,15 @@ def test_basic_chain_required(sam_data):
     altitude = 700
     modules = sam_data['sandiamod']
     module_parameters = modules['Canadian_Solar_CS5P_220M___2009_']
-    inverters = sam_data['cecinverter']
-    inverter_parameters = inverters[
-        'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_']
     with pytest.raises(ValueError):
-        dc, ac = modelchain.basic_chain(times, latitude, longitude,
-                                        module_parameters, inverter_parameters,
-                                        altitude=altitude)
+        dc, ac = modelchain.basic_chain(
+            times, latitude, longitude, module_parameters,
+            cec_inverter_parameters, altitude=altitude
+        )
 
 
 @requires_scipy
-def test_basic_chain_alt_az(sam_data):
+def test_basic_chain_alt_az(sam_data, cec_inverter_parameters):
     times = pd.date_range(start='20160101 1200-0700',
                           end='20160101 1800-0700', freq='6H')
     latitude = 32.2
@@ -531,12 +513,9 @@ def test_basic_chain_alt_az(sam_data):
     surface_azimuth = 0
     modules = sam_data['sandiamod']
     module_parameters = modules['Canadian_Solar_CS5P_220M___2009_']
-    inverters = sam_data['cecinverter']
-    inverter_parameters = inverters[
-        'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_']
 
     dc, ac = modelchain.basic_chain(times, latitude, longitude,
-                                    module_parameters, inverter_parameters,
+                                    module_parameters, cec_inverter_parameters,
                                     surface_tilt=surface_tilt,
                                     surface_azimuth=surface_azimuth)
 
@@ -546,7 +525,7 @@ def test_basic_chain_alt_az(sam_data):
 
 
 @requires_scipy
-def test_basic_chain_strategy(sam_data):
+def test_basic_chain_strategy(sam_data, cec_inverter_parameters):
     times = pd.date_range(start='20160101 1200-0700',
                           end='20160101 1800-0700', freq='6H')
     latitude = 32.2
@@ -554,12 +533,9 @@ def test_basic_chain_strategy(sam_data):
     altitude = 700
     modules = sam_data['sandiamod']
     module_parameters = modules['Canadian_Solar_CS5P_220M___2009_']
-    inverters = sam_data['cecinverter']
-    inverter_parameters = inverters[
-        'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_']
 
     dc, ac = modelchain.basic_chain(
-        times, latitude, longitude, module_parameters, inverter_parameters,
+        times, latitude, longitude, module_parameters, cec_inverter_parameters,
         orientation_strategy='south_at_latitude_tilt', altitude=altitude)
 
     expected = pd.Series(np.array([  183.522449305,  -2.00000000e-02]),
@@ -568,7 +544,7 @@ def test_basic_chain_strategy(sam_data):
 
 
 @requires_scipy
-def test_basic_chain_altitude_pressure(sam_data):
+def test_basic_chain_altitude_pressure(sam_data, cec_inverter_parameters):
     times = pd.date_range(start='20160101 1200-0700',
                           end='20160101 1800-0700', freq='6H')
     latitude = 32.2
@@ -578,12 +554,9 @@ def test_basic_chain_altitude_pressure(sam_data):
     surface_azimuth = 0
     modules = sam_data['sandiamod']
     module_parameters = modules['Canadian_Solar_CS5P_220M___2009_']
-    inverters = sam_data['cecinverter']
-    inverter_parameters = inverters[
-        'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_']
 
     dc, ac = modelchain.basic_chain(times, latitude, longitude,
-                                    module_parameters, inverter_parameters,
+                                    module_parameters, cec_inverter_parameters,
                                     surface_tilt=surface_tilt,
                                     surface_azimuth=surface_azimuth,
                                     pressure=93194)
@@ -593,7 +566,7 @@ def test_basic_chain_altitude_pressure(sam_data):
     assert_series_equal(ac, expected, check_less_precise=1)
 
     dc, ac = modelchain.basic_chain(times, latitude, longitude,
-                                    module_parameters, inverter_parameters,
+                                    module_parameters, cec_inverter_parameters,
                                     surface_tilt=surface_tilt,
                                     surface_azimuth=surface_azimuth,
                                     altitude=altitude)
diff --git a/pvlib/test/test_numerical_precision.py b/pvlib/test/test_numerical_precision.py
index 50b86c6..ab84b34 100644
--- a/pvlib/test/test_numerical_precision.py
+++ b/pvlib/test/test_numerical_precision.py
@@ -32,15 +32,19 @@ PVLIB_PATH = os.path.dirname(TEST_PATH)
 DATA_PATH = os.path.join(PVLIB_PATH, 'data', TEST_DATA)
 POA = 888
 TCELL = 55
-CECMOD = pvsystem.retrieve_sam('cecmod')
-# get module from cecmod and apply temp/irrad desoto corrections
-SPR_E20_327 = CECMOD.SunPower_SPR_E20_327
+# module parameters from CEC module SunPower SPR-E20-327
+SPR_E20_327 = {
+    'alpha_sc': 0.004522,
+    'a_ref': 2.6868,
+    'I_L_ref': 6.468,
+    'I_o_ref': 1.88e-10,
+    'R_s': 0.37,
+    'R_sh_ref': 298.13,
+}
+# apply temp/irrad desoto corrections
 ARGS = pvsystem.calcparams_desoto(
     effective_irradiance=POA, temp_cell=TCELL,
-    alpha_sc=SPR_E20_327.alpha_sc, a_ref=SPR_E20_327.a_ref,
-    I_L_ref=SPR_E20_327.I_L_ref, I_o_ref=SPR_E20_327.I_o_ref,
-    R_sh_ref=SPR_E20_327.R_sh_ref, R_s=SPR_E20_327.R_s,
-    EgRef=1.121, dEgdT=-0.0002677
+    EgRef=1.121, dEgdT=-0.0002677, **SPR_E20_327,
 )
 IL, I0, RS, RSH, NNSVTH = ARGS
 IVCURVE_NPTS = 100
diff --git a/pvlib/test/test_pvsystem.py b/pvlib/test/test_pvsystem.py
index 7de8930..ce854be 100644
--- a/pvlib/test/test_pvsystem.py
+++ b/pvlib/test/test_pvsystem.py
@@ -230,17 +230,6 @@ def test_iam_interp():
         pvsystem.iam_interp(0.0, [0, 90], [1, -1])
 
 
-# if this completes successfully we'll be able to do more tests below.
-@pytest.fixture(scope="session")
-def sam_data():
-    data = {}
-    data['cecmod'] = pvsystem.retrieve_sam('cecmod')
-    data['sandiamod'] = pvsystem.retrieve_sam('sandiamod')
-    data['cecinverter'] = pvsystem.retrieve_sam('cecinverter')
-    data['adrinverter'] = pvsystem.retrieve_sam('adrinverter')
-    return data
-
-
 @pytest.fixture(scope="session")
 def sapm_module_params(sam_data):
     modules = sam_data['sandiamod']
@@ -249,29 +238,76 @@ def sapm_module_params(sam_data):
     return module_parameters
 
 
-@pytest.fixture(scope="session")
-def cec_module_params(sam_data):
-    modules = sam_data['cecmod']
-    module = 'Example_Module'
-    module_parameters = modules[module]
-    return module_parameters
-
-
-@pytest.fixture()
-def pvsyst_module_params():
-    module_parameters = {}
-    module_parameters['gamma_ref'] = 1.05
-    module_parameters['mu_gamma'] = 0.001
-    module_parameters['I_L_ref'] = 6.0
-    module_parameters['I_o_ref'] = 5e-9
-    module_parameters['EgRef'] = 1.121
-    module_parameters['R_sh_ref'] = 300
-    module_parameters['R_sh_0'] = 1000
-    module_parameters['R_s'] = 0.5
-    module_parameters['R_sh_exp'] = 5.5
-    module_parameters['cells_in_series'] = 60
-    module_parameters['alpha_sc'] = 0.001
-    return module_parameters
+def test_retrieve_sam_raise_no_parameters():
+    """
+    Raise an exception if no parameters are provided to `retrieve_sam()`.
+    """
+    with pytest.raises(ValueError) as error:
+        pvsystem.retrieve_sam()
+    assert 'A name or path must be provided!' == str(error.value)
+
+
+def test_retrieve_sam_cecmod():
+    """
+    Test the expected data is retrieved from the CEC module database. In
+    particular, check for a known module in the database and check for the
+    expected keys for that module.
+    """
+    data = pvsystem.retrieve_sam('cecmod')
+    keys = [
+        'BIPV',
+        'Date',
+        'T_NOCT',
+        'A_c',
+        'N_s',
+        'I_sc_ref',
+        'V_oc_ref',
+        'I_mp_ref',
+        'V_mp_ref',
+        'alpha_sc',
+        'beta_oc',
+        'a_ref',
+        'I_L_ref',
+        'I_o_ref',
+        'R_s',
+        'R_sh_ref',
+        'Adjust',
+        'gamma_r',
+        'Version',
+        'PTC',
+        'Technology',
+    ]
+    module = 'iTek_iT_300_HE'
+    assert module in data
+    assert set(data[module].keys()) == set(keys)
+
+
+def test_retrieve_sam_cecinverter():
+    """
+    Test the expected data is retrieved from the CEC inverter database. In
+    particular, check for a known inverter in the database and check for the
+    expected keys for that inverter.
+    """
+    data = pvsystem.retrieve_sam('cecinverter')
+    keys = [
+        'Vac',
+        'Paco',
+        'Pdco',
+        'Vdco',
+        'Pso',
+        'C0',
+        'C1',
+        'C2',
+        'C3',
+        'Pnt',
+        'Vdcmax',
+        'Idcmax',
+        'Mppt_low',
+        'Mppt_high',
+    ]
+    inverter = 'Solectria__PVI_5300_5300_P_208V__CEC_2008_'
+    assert inverter in data
+    assert set(data[inverter].keys()) == set(keys)
 
 
 def test_sapm(sapm_module_params):
@@ -1000,9 +1036,7 @@ def test_singlediode_array():
 
 
 @requires_scipy
-def test_singlediode_floats(sam_data):
-    module = 'Example_Module'
-    module_parameters = sam_data['cecmod'][module]
+def test_singlediode_floats():
     out = pvsystem.singlediode(7, 6e-7, .1, 20, .5, method='lambertw')
     expected = {'i_xx': 4.2498,
                 'i_mp': 6.1275,
@@ -1266,22 +1300,20 @@ def test_adrinverter_invalid_and_night(sam_data):
     assert_allclose(pacs, np.array([np.nan, -0.25, np.nan, np.nan]))
 
 
-def test_snlinverter(sam_data):
-    inverters = sam_data['cecinverter']
-    testinv = 'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'
+def test_snlinverter(cec_inverter_parameters):
     vdcs = pd.Series(np.linspace(0,50,3))
     idcs = pd.Series(np.linspace(0,11,3))
     pdcs = idcs * vdcs
 
-    pacs = pvsystem.snlinverter(vdcs, pdcs, inverters[testinv])
+    pacs = pvsystem.snlinverter(vdcs, pdcs, cec_inverter_parameters)
     assert_series_equal(pacs, pd.Series([-0.020000, 132.004308, 250.000000]))
 
 
-def test_PVSystem_snlinverter(sam_data):
-    inverters = sam_data['cecinverter']
-    testinv = 'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'
-    system = pvsystem.PVSystem(inverter=testinv,
-                               inverter_parameters=inverters[testinv])
+def test_PVSystem_snlinverter(cec_inverter_parameters):
+    system = pvsystem.PVSystem(
+        inverter=cec_inverter_parameters['Name'],
+        inverter_parameters=cec_inverter_parameters,
+    )
     vdcs = pd.Series(np.linspace(0,50,3))
     idcs = pd.Series(np.linspace(0,11,3))
     pdcs = idcs * vdcs
@@ -1290,26 +1322,43 @@ def test_PVSystem_snlinverter(sam_data):
     assert_series_equal(pacs, pd.Series([-0.020000, 132.004308, 250.000000]))
 
 
-def test_snlinverter_float(sam_data):
-    inverters = sam_data['cecinverter']
-    testinv = 'ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'
+def test_snlinverter_float(cec_inverter_parameters):
     vdcs = 25.
     idcs = 5.5
     pdcs = idcs * vdcs
 
-    pacs = pvsystem.snlinverter(vdcs, pdcs, inverters[testinv])
+    pacs = pvsystem.snlinverter(vdcs, pdcs, cec_inverter_parameters)
     assert_allclose(pacs, 132.004278, 5)
 
 
-def test_snlinverter_Pnt_micro(sam_data):
-    inverters = sam_data['cecinverter']
-    testinv = 'Enphase_Energy__M250_60_2LL_S2x___ZC____NA__208V_208V__CEC_2013_'
+def test_snlinverter_Pnt_micro():
+    """
+    Test for issue #140, where some microinverters were giving a positive AC
+    power output when the DC power was 0.
+    """
+    inverter_parameters = {
+        'Name': 'Enphase Energy: M250-60-2LL-S2x (-ZC) (-NA) 208V [CEC 2013]',
+        'Vac': 208.0,
+        'Paco': 240.0,
+        'Pdco': 250.5311318,
+        'Vdco': 32.06160667,
+        'Pso': 1.12048857,
+        'C0': -5.76E-05,
+        'C1': -6.24E-04,
+        'C2': 8.09E-02,
+        'C3': -0.111781106,
+        'Pnt': 0.043,
+        'Vdcmax': 48.0,
+        'Idcmax': 9.8,
+        'Mppt_low': 27.0,
+        'Mppt_high': 39.0,
+    }
     vdcs = pd.Series(np.linspace(0,50,3))
     idcs = pd.Series(np.linspace(0,11,3))
     pdcs = idcs * vdcs
 
-    pacs = pvsystem.snlinverter(vdcs, pdcs, inverters[testinv])
-    assert_series_equal(pacs, pd.Series([-0.043000, 132.545914746, 240.000000]))
+    pacs = pvsystem.snlinverter(vdcs, pdcs, inverter_parameters)
+    assert_series_equal(pacs, pd.Series([-0.043, 132.545914746, 240.0]))
 
 
 def test_PVSystem_creation():
diff --git a/pvlib/test/test_singlediode.py b/pvlib/test/test_singlediode.py
index 4ff7bc4..2d5074c 100644
--- a/pvlib/test/test_singlediode.py
+++ b/pvlib/test/test_singlediode.py
@@ -4,28 +4,29 @@ testing single-diode methods using JW Bishop 1988
 
 import numpy as np
 from pvlib import pvsystem
-from pvlib.singlediode import bishop88, estimate_voc, VOLTAGE_BUILTIN
+from pvlib.singlediode import (bishop88_mpp, estimate_voc, VOLTAGE_BUILTIN,
+                               bishop88, bishop88_i_from_v, bishop88_v_from_i)
 import pytest
 from conftest import requires_scipy
 
 POA = 888
 TCELL = 55
-CECMOD = pvsystem.retrieve_sam('cecmod')
 
 
 @requires_scipy
-def test_newton_spr_e20_327():
-    """test pvsystem.singlediode with Newton method on SPR-E20-327"""
-    spr_e20_327 = CECMOD.SunPower_SPR_E20_327
+@pytest.mark.parametrize('method', ['brentq', 'newton'])
+def test_method_spr_e20_327(method, cec_module_spr_e20_327):
+    """test pvsystem.singlediode with different methods on SPR-E20-327"""
+    spr_e20_327 = cec_module_spr_e20_327
     x = pvsystem.calcparams_desoto(
         effective_irradiance=POA, temp_cell=TCELL,
-        alpha_sc=spr_e20_327.alpha_sc, a_ref=spr_e20_327.a_ref,
-        I_L_ref=spr_e20_327.I_L_ref, I_o_ref=spr_e20_327.I_o_ref,
-        R_sh_ref=spr_e20_327.R_sh_ref, R_s=spr_e20_327.R_s,
+        alpha_sc=spr_e20_327['alpha_sc'], a_ref=spr_e20_327['a_ref'],
+        I_L_ref=spr_e20_327['I_L_ref'], I_o_ref=spr_e20_327['I_o_ref'],
+        R_sh_ref=spr_e20_327['R_sh_ref'], R_s=spr_e20_327['R_s'],
         EgRef=1.121, dEgdT=-0.0002677)
     il, io, rs, rsh, nnsvt = x
     pvs = pvsystem.singlediode(*x, method='lambertw')
-    out = pvsystem.singlediode(*x, method='newton')
+    out = pvsystem.singlediode(*x, method=method)
     isc, voc, imp, vmp, pmp, ix, ixx = out.values()
     assert np.isclose(pvs['i_sc'], isc)
     assert np.isclose(pvs['v_oc'], voc)
@@ -39,22 +40,23 @@ def test_newton_spr_e20_327():
     pvs_ixx = pvsystem.i_from_v(rsh, rs, nnsvt, (voc + vmp)/2, io, il,
                                 method='lambertw')
     assert np.isclose(pvs_ixx, ixx)
-    return isc, voc, imp, vmp, pmp, pvs
 
 
 @requires_scipy
-def test_newton_fs_495():
-    """test pvsystem.singlediode with Newton method on FS495"""
-    fs_495 = CECMOD.First_Solar_FS_495
+@pytest.mark.parametrize('method', ['brentq', 'newton'])
+def test_newton_fs_495(method, cec_module_fs_495):
+    """test pvsystem.singlediode with different methods on FS495"""
+    fs_495 = cec_module_fs_495
     x = pvsystem.calcparams_desoto(
         effective_irradiance=POA, temp_cell=TCELL,
-        alpha_sc=fs_495.alpha_sc, a_ref=fs_495.a_ref, I_L_ref=fs_495.I_L_ref,
-        I_o_ref=fs_495.I_o_ref, R_sh_ref=fs_495.R_sh_ref, R_s=fs_495.R_s,
+        alpha_sc=fs_495['alpha_sc'], a_ref=fs_495['a_ref'],
+        I_L_ref=fs_495['I_L_ref'], I_o_ref=fs_495['I_o_ref'],
+        R_sh_ref=fs_495['R_sh_ref'], R_s=fs_495['R_s'],
         EgRef=1.475, dEgdT=-0.0003)
     il, io, rs, rsh, nnsvt = x
     x += (101, )
     pvs = pvsystem.singlediode(*x, method='lambertw')
-    out = pvsystem.singlediode(*x, method='newton')
+    out = pvsystem.singlediode(*x, method=method)
     isc, voc, imp, vmp, pmp, ix, ixx, i, v = out.values()
     assert np.isclose(pvs['i_sc'], isc)
     assert np.isclose(pvs['v_oc'], voc)
@@ -68,65 +70,6 @@ def test_newton_fs_495():
     pvs_ixx = pvsystem.i_from_v(rsh, rs, nnsvt, (voc + vmp)/2, io, il,
                                 method='lambertw')
     assert np.isclose(pvs_ixx, ixx)
-    return isc, voc, imp, vmp, pmp, i, v, pvs
-
-
-@requires_scipy
-def test_brentq_spr_e20_327():
-    """test pvsystem.singlediode with Brent method on SPR-E20-327"""
-    spr_e20_327 = CECMOD.SunPower_SPR_E20_327
-    x = pvsystem.calcparams_desoto(
-        effective_irradiance=POA, temp_cell=TCELL,
-        alpha_sc=spr_e20_327.alpha_sc, a_ref=spr_e20_327.a_ref,
-        I_L_ref=spr_e20_327.I_L_ref, I_o_ref=spr_e20_327.I_o_ref,
-        R_sh_ref=spr_e20_327.R_sh_ref, R_s=spr_e20_327.R_s,
-        EgRef=1.121, dEgdT=-0.0002677)
-    il, io, rs, rsh, nnsvt = x
-    pvs = pvsystem.singlediode(*x, method='lambertw')
-    out = pvsystem.singlediode(*x, method='brentq')
-    isc, voc, imp, vmp, pmp, ix, ixx = out.values()
-    assert np.isclose(pvs['i_sc'], isc)
-    assert np.isclose(pvs['v_oc'], voc)
-    # the singlediode method doesn't actually get the MPP correct
-    pvs_imp = pvsystem.i_from_v(rsh, rs, nnsvt, vmp, io, il, method='lambertw')
-    pvs_vmp = pvsystem.v_from_i(rsh, rs, nnsvt, imp, io, il, method='lambertw')
-    assert np.isclose(pvs_imp, imp)
-    assert np.isclose(pvs_vmp, vmp)
-    assert np.isclose(pvs['p_mp'], pmp)
-    assert np.isclose(pvs['i_x'], ix)
-    pvs_ixx = pvsystem.i_from_v(rsh, rs, nnsvt, (voc + vmp)/2, io, il,
-                                method='lambertw')
-    assert np.isclose(pvs_ixx, ixx)
-    return isc, voc, imp, vmp, pmp, pvs
-
-
-@requires_scipy
-def test_brentq_fs_495():
-    """test pvsystem.singlediode with Brent method on FS495"""
-    fs_495 = CECMOD.First_Solar_FS_495
-    x = pvsystem.calcparams_desoto(
-        effective_irradiance=POA, temp_cell=TCELL,
-        alpha_sc=fs_495.alpha_sc, a_ref=fs_495.a_ref, I_L_ref=fs_495.I_L_ref,
-        I_o_ref=fs_495.I_o_ref, R_sh_ref=fs_495.R_sh_ref, R_s=fs_495.R_s,
-        EgRef=1.475, dEgdT=-0.0003)
-    il, io, rs, rsh, nnsvt = x
-    x += (101, )
-    pvs = pvsystem.singlediode(*x, method='lambertw')
-    out = pvsystem.singlediode(*x, method='brentq')
-    isc, voc, imp, vmp, pmp, ix, ixx, i, v = out.values()
-    assert np.isclose(pvs['i_sc'], isc)
-    assert np.isclose(pvs['v_oc'], voc)
-    # the singlediode method doesn't actually get the MPP correct
-    pvs_imp = pvsystem.i_from_v(rsh, rs, nnsvt, vmp, io, il, method='lambertw')
-    pvs_vmp = pvsystem.v_from_i(rsh, rs, nnsvt, imp, io, il, method='lambertw')
-    assert np.isclose(pvs_imp, imp)
-    assert np.isclose(pvs_vmp, vmp)
-    assert np.isclose(pvs['p_mp'], pmp)
-    assert np.isclose(pvs['i_x'], ix)
-    pvs_ixx = pvsystem.i_from_v(rsh, rs, nnsvt, (voc + vmp)/2, io, il,
-                                method='lambertw')
-    assert np.isclose(pvs_ixx, ixx)
-    return isc, voc, imp, vmp, pmp, i, v, pvs
 
 
 def get_pvsyst_fs_495():
@@ -153,9 +96,13 @@ def get_pvsyst_fs_495():
         'temp_ref': 25, 'irrad_ref': 1000, 'I_L_ref': 1.5743233463848496
     }
 
+# DeSoto @(888[W/m**2], 55[degC]) = {Pmp: 72.71, Isc: 1.402, Voc: 75.42)
+
 
+@requires_scipy
 @pytest.mark.parametrize(
     'poa, temp_cell, expected, tol', [
+        # reference conditions
         (
             get_pvsyst_fs_495()['irrad_ref'],
             get_pvsyst_fs_495()['temp_ref'],
@@ -167,9 +114,21 @@ def get_pvsyst_fs_495():
             },
             (5e-4, 0.04)
         ),
-        (POA, TCELL, {'pmp': 76.26, 'isc': 1.387, 'voc': 79.29}, (1e-3, 1e-3))]
-)  # DeSoto @(888[W/m**2], 55[degC]) = {Pmp: 72.71, Isc: 1.402, Voc: 75.42)
-def test_pvsyst_recombination_loss(poa, temp_cell, expected, tol):
+        # other conditions
+        (
+            POA,
+            TCELL,
+            {
+                'pmp': 76.262,
+                'isc': 1.3868,
+                'voc': 79.292
+            },
+            (1e-4, 1e-4)
+        )
+    ]
+)
+@pytest.mark.parametrize('method', ['newton', 'brentq'])
+def test_pvsyst_recombination_loss(method, poa, temp_cell, expected, tol):
     """test PVSst recombination loss"""
     pvsyst_fs_495 = get_pvsyst_fs_495()
     # first evaluate PVSyst model with thin-film recombination loss current
@@ -199,9 +158,30 @@ def test_pvsyst_recombination_loss(poa, temp_cell, expected, tol):
     )
     # test max power
     assert np.isclose(max(pvsyst[2]), expected['pmp'], *tol)
+
     # test short circuit current
     isc_pvsyst = np.interp(0, pvsyst[1], pvsyst[0])
     assert np.isclose(isc_pvsyst, expected['isc'], *tol)
-    # test open circuit current
+
+    # test open circuit voltage
     voc_pvsyst = np.interp(0, pvsyst[0][::-1], pvsyst[1][::-1])
     assert np.isclose(voc_pvsyst, expected['voc'], *tol)
+
+    # repeat tests as above with specialized bishop88 functions
+    y = dict(d2mutau=pvsyst_fs_495['d2mutau'],
+             NsVbi=VOLTAGE_BUILTIN*pvsyst_fs_495['cells_in_series'])
+
+    mpp_88 = bishop88_mpp(*x, **y, method=method)
+    assert np.isclose(mpp_88[2], expected['pmp'], *tol)
+
+    isc_88 = bishop88_i_from_v(0, *x, **y, method=method)
+    assert np.isclose(isc_88, expected['isc'], *tol)
+
+    voc_88 = bishop88_v_from_i(0, *x, **y, method=method)
+    assert np.isclose(voc_88, expected['voc'], *tol)
+
+    ioc_88 = bishop88_i_from_v(voc_88, *x, **y, method=method)
+    assert np.isclose(ioc_88, 0.0, *tol)
+
+    vsc_88 = bishop88_v_from_i(isc_88, *x, **y, method=method)
+    assert np.isclose(vsc_88, 0.0, *tol)
diff --git a/pvlib/test/test_solarposition.py b/pvlib/test/test_solarposition.py
index 4a8c142..d1f446e 100644
--- a/pvlib/test/test_solarposition.py
+++ b/pvlib/test/test_solarposition.py
@@ -9,11 +9,10 @@ from pandas.util.testing import assert_frame_equal, assert_series_equal
 from numpy.testing import assert_allclose
 import pytest
 
-from pvlib._deprecation import pvlibDeprecationWarning
 from pvlib.location import Location
 from pvlib import solarposition, spa
 
-from conftest import (fail_on_pvlib_version, requires_ephem, needs_pandas_0_17,
+from conftest import (requires_ephem, needs_pandas_0_17,
                       requires_spa_c, requires_numba)
 
 
@@ -111,15 +110,6 @@ def expected_rise_set_ephem():
                         index=times)
 
 
-@fail_on_pvlib_version('0.7')
-def test_deprecated_07():
-    tt = pd.DatetimeIndex(['2015-01-01 00:00:00']).tz_localize('MST')
-    with pytest.warns(pvlibDeprecationWarning):
-        solarposition.get_sun_rise_set_transit(tt,
-                                               39.7,
-                                               -105.2)
-
-
 # the physical tests are run at the same time as the NREL SPA test.
 # pyephem reproduces the NREL result to 2 decimal places.
 # this doesn't mean that one code is better than the other.
diff --git a/pvlib/test/test_tmy.py b/pvlib/test/test_tmy.py
index 5df9245..c910bc9 100644
--- a/pvlib/test/test_tmy.py
+++ b/pvlib/test/test_tmy.py
@@ -2,29 +2,15 @@ import inspect
 import os
 
 from pandas.util.testing import network
-import pytest
 
-from pvlib._deprecation import pvlibDeprecationWarning
 from pvlib.iotools import tmy
 
-from conftest import fail_on_pvlib_version
-
-
-test_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
+test_dir = os.path.dirname(
+    os.path.abspath(inspect.getfile(inspect.currentframe())))
 tmy3_testfile = os.path.join(test_dir, '../data/703165TY.csv')
 tmy2_testfile = os.path.join(test_dir, '../data/12839.tm2')
 
 
-@fail_on_pvlib_version('0.7')
-def test_deprecated_07():
-    with pytest.warns(pvlibDeprecationWarning):
-        from pvlib.tmy import readtmy2
-        readtmy2(tmy2_testfile)
-    with pytest.warns(pvlibDeprecationWarning):
-        from pvlib.tmy import readtmy3
-        readtmy3(tmy3_testfile)
-
-
 def test_read_tmy3():
     tmy.read_tmy3(tmy3_testfile)