From ed115ede49cb500dc552934275d4f68d4d36db10 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 25 Nov 2018 18:56:34 -0700 Subject: [PATCH 01/10] fix broken api reference --- docs/sphinx/source/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/api.rst b/docs/sphinx/source/api.rst index 2716c7fbe6..846a8f7701 100644 --- a/docs/sphinx/source/api.rst +++ b/docs/sphinx/source/api.rst @@ -90,7 +90,7 @@ calculations. solarposition.equation_of_time_spencer71 solarposition.equation_of_time_pvcdrom solarposition.hour_angle - solarposition.sunrise_sunset_transit_geometric + solarposition.sun_rise_set_transit_geometric Clear sky From 44d7831e9185dd25b786a90dc6855ad9db9414b5 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 25 Nov 2018 18:57:01 -0700 Subject: [PATCH 02/10] http to https for ref links --- docs/sphinx/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 959f395179..576dc85171 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -313,8 +313,8 @@ def setup(app): # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/3.7/', None), - 'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None), - 'numpy': ('http://docs.scipy.org/doc/numpy/', None), + 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None), + 'numpy': ('https://docs.scipy.org/doc/numpy/', None), } nbsphinx_allow_errors = True From 0e1bcae5a938957799f34a3003c455ec42ad646f Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 25 Nov 2018 18:57:26 -0700 Subject: [PATCH 03/10] add okexcept to forecasts.rst ndfd horribleness --- docs/sphinx/source/forecasts.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sphinx/source/forecasts.rst b/docs/sphinx/source/forecasts.rst index e17e2dba39..f959982e2c 100644 --- a/docs/sphinx/source/forecasts.rst +++ b/docs/sphinx/source/forecasts.rst @@ -414,6 +414,7 @@ Use the NDFD, among others, for forecasts at all time horizons. The NDFD is available for the United States. .. ipython:: python + :okexcept: model = NDFD() data = model.get_processed_data(latitude, longitude, start, end) From 503e1282713f524f56a0360bb72d63ccd83f4a8f Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 25 Nov 2018 18:57:41 -0700 Subject: [PATCH 04/10] clean up whatsnew --- docs/sphinx/source/whatsnew/v0.6.1.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.6.1.rst b/docs/sphinx/source/whatsnew/v0.6.1.rst index 8bce89ac3f..2c0015252c 100644 --- a/docs/sphinx/source/whatsnew/v0.6.1.rst +++ b/docs/sphinx/source/whatsnew/v0.6.1.rst @@ -19,11 +19,14 @@ API Changes they will be removed in v0.7. Use the new :py:func:`pvlib.iotools.read_tmy2` and :py:func:`pvlib.iotools.read_tmy3` instead. (:issue:`261`) * Added keyword argument ``horizon`` to :func:`~pvlib.solarposition.pyephem` - and :func:`~pvlib.solarposition.calc_time` with default value ``'+0:00'`` -* Changed key names for `components` returned from :py:func:`pvlib.clearsky.detect_clearsky` -* Changed function name from :py:func:`pvlib.solarposition.get_rise_set_transit` (deprecated) - to :py:func:`pvlib.solarposition.sun_rise_set_transit_spa. `sun_rise_set_transit_spa` - requires time input to be localized to the specified latitude/longitude. (:issue:`316') + and :func:`~pvlib.solarposition.calc_time` with default value ``'+0:00'``. + (:issue:`588`) +* Changed key names for `components` returned from + :py:func:`pvlib.clearsky.detect_clearsky`. (:issue:`596`) +* Changed function name from `pvlib.solarposition.get_rise_set_transit` + (deprecated) to :py:func:`pvlib.solarposition.sun_rise_set_transit_spa. + `sun_rise_set_transit_spa` requires time input to be localized to the + specified latitude/longitude. (:issue:`316`) Enhancements @@ -40,14 +43,15 @@ Enhancements * Created :py:func:`pvlib.iotools.read_midc` and :py:func:`pvlib.iotools.read_midc_raw_data_from_nrel` to read NREL MIDC data. (:issue:`601`) * Change :py:func:`pvlib.pvsystem.sapm_spectral_loss` to avoid numpy warning. -* Add warning message when :py:func:`pvlib.spa` is reloaded. +* Add warning message when :py:func:`pvlib.spa` is reloaded. (:issue:`401`) Bug fixes ~~~~~~~~~ * Fix when building documentation using Matplotlib 3.0 or greater. -* `~pvlib.spa.calculate_deltat`: Fix constant coefficient of the polynomial expression for years >= 1860 - and < 1900, fix year 2050 which was returning 0. +* `~pvlib.spa.calculate_deltat`: Fix constant coefficient of the polynomial + expression for years >= 1860 and < 1900, fix year 2050 which was + returning 0. (:issue:`600`) * Fix and improve :func:`~pvlib.solarposition.hour_angle` (:issue:`598`) * Fix error in :func:`pvlib.clearsky.detect_clearsky` (:issue:`506`) From ca0e54d7e82367388562564422e73070f8a12530 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 25 Nov 2018 18:57:52 -0700 Subject: [PATCH 05/10] fix docstrings --- pvlib/iotools/midc.py | 5 +++-- pvlib/solarposition.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pvlib/iotools/midc.py b/pvlib/iotools/midc.py index 1d68278fd5..35c48e8d9a 100644 --- a/pvlib/iotools/midc.py +++ b/pvlib/iotools/midc.py @@ -185,8 +185,9 @@ def read_midc_raw_data_from_nrel(site, start, end): Notes ----- Requests spanning an instrumentation change will yield an error. See the - MIDC raw data api page here_ for more details and considerations. - .. _here: https://midcdmz.nrel.gov/apps/data_api_doc.pl?_idtextlist + MIDC raw data api page + `here `_ + for more details and considerations. """ args = {'site': site, 'begin': start.strftime('%Y%m%d'), diff --git a/pvlib/solarposition.py b/pvlib/solarposition.py index e4d95fcf3e..e2dc536936 100644 --- a/pvlib/solarposition.py +++ b/pvlib/solarposition.py @@ -387,7 +387,7 @@ def sun_rise_set_transit_spa(times, latitude, longitude, how='numpy', using times.year and times.month from pandas.DatetimeIndex. For most simulations specifing delta_t is sufficient. Difference between terrestrial time and UT1. - *Note: delta_t = None will break code using nrel_numba, + delta_t = None will break code using nrel_numba, this will be fixed in a future version. By default, use USNO historical data and predictions how : str, optional, default 'numpy' From cd2985017a3359d80304313185842eb8d891d98e Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 7 Dec 2018 17:02:21 -0700 Subject: [PATCH 06/10] add ipython_warning_is_error=False --- docs/sphinx/source/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 576dc85171..b162eee4f4 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -318,3 +318,5 @@ def setup(app): } nbsphinx_allow_errors = True + +ipython_warning_is_error = False From 8868e5471335284927f4b27c31d9ffe517429307 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 7 Dec 2018 17:10:01 -0700 Subject: [PATCH 07/10] issue with blank lines in docstring read by ipython_directive. probably ipython version specific --- docs/sphinx/source/modelchain.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/sphinx/source/modelchain.rst b/docs/sphinx/source/modelchain.rst index a1eea00ee9..f7e9d608ea 100644 --- a/docs/sphinx/source/modelchain.rst +++ b/docs/sphinx/source/modelchain.rst @@ -376,9 +376,7 @@ function if you wanted to. def pvusa(poa_global, wind_speed, temp_air, a, b, c, d): """ Calculates system power according to the PVUSA equation - P = I * (a + b*I + c*W + d*T) - where P is the output power, I is the plane of array irradiance, From 393934a021c50f57e8150840e5e91642e8edbdac Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 7 Dec 2018 17:10:25 -0700 Subject: [PATCH 08/10] fix deprecated tmy call and wrong deprecation message --- docs/sphinx/source/timetimezones.rst | 2 +- pvlib/tmy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/timetimezones.rst b/docs/sphinx/source/timetimezones.rst index de1935e33b..1b46c3fc56 100644 --- a/docs/sphinx/source/timetimezones.rst +++ b/docs/sphinx/source/timetimezones.rst @@ -272,7 +272,7 @@ Let's first examine how pvlib handles time when it imports a TMY3 file. # some gymnastics to find the example file pvlib_abspath = os.path.dirname(os.path.abspath(inspect.getfile(pvlib))) file_abspath = os.path.join(pvlib_abspath, 'data', '703165TY.csv') - tmy3_data, tmy3_metadata = pvlib.tmy.readtmy3(file_abspath) + tmy3_data, tmy3_metadata = pvlib.iotools.read_tmy3(file_abspath) tmy3_metadata diff --git a/pvlib/tmy.py b/pvlib/tmy.py index a9ea8164f9..6299d52b85 100644 --- a/pvlib/tmy.py +++ b/pvlib/tmy.py @@ -9,5 +9,5 @@ readtmy2 = deprecated('0.6.1', alternative='iotools.read_tmy2', name='readtmy2', removal='0.7')(read_tmy2) -readtmy3 = deprecated('0.6.1', alternative='iotools.read_tmy2', +readtmy3 = deprecated('0.6.1', alternative='iotools.read_tmy3', name='readtmy3', removal='0.7')(read_tmy3) From ad4bc599bcd28738eb6eaa932a3bbba402bd243d Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 7 Dec 2018 17:14:51 -0700 Subject: [PATCH 09/10] add item to whatsnew --- docs/sphinx/source/whatsnew/v0.6.1.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.6.1.rst b/docs/sphinx/source/whatsnew/v0.6.1.rst index a87ffb2d17..cd941c6eb6 100644 --- a/docs/sphinx/source/whatsnew/v0.6.1.rst +++ b/docs/sphinx/source/whatsnew/v0.6.1.rst @@ -1,6 +1,6 @@ .. _whatsnew_0601: -v0.6.1 (EST November, 2018) +v0.6.1 (EST December, 2018) --------------------------- This is a minor release. We recommend all users of v0.6.0 upgrade to this @@ -60,6 +60,7 @@ Bug fixes returning 0. (:issue:`600`) * Fix and improve :func:`~pvlib.solarposition.hour_angle` (:issue:`598`) * Fix error in :func:`pvlib.clearsky.detect_clearsky` (:issue:`506`) +* Fix documentation errors when using IPython >= 7.0. Testing From 6f8865020f487c3844ae6d9abf192999447846e8 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Mon, 10 Dec 2018 08:38:31 -0700 Subject: [PATCH 10/10] remove redundant line --- docs/sphinx/source/whatsnew/v0.6.1.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.6.1.rst b/docs/sphinx/source/whatsnew/v0.6.1.rst index 28ae87c7e9..b13165335f 100644 --- a/docs/sphinx/source/whatsnew/v0.6.1.rst +++ b/docs/sphinx/source/whatsnew/v0.6.1.rst @@ -47,7 +47,6 @@ Enhancements (:issue:`604`) * Change :py:func:`pvlib.pvsystem.sapm_spectral_loss` to avoid numpy warning. * Add warning message when :py:func:`pvlib.spa` is reloaded. (:issue:`401`) -* Add warning message when :py:func:`pvlib.spa` is reloaded. * Add option for :py:func:`pvlib.irradiance.disc` to use relative airmass by supplying `pressure=None`. (:issue:`449`)