From a20675de39932a0c1c38b9b1b991eb43ef33cddd Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sat, 4 Feb 2017 16:04:04 -0700 Subject: [PATCH 1/4] put conda-forge first in fx builds --- ci/requirements-py27.yml | 2 +- ci/requirements-py34.yml | 2 +- ci/requirements-py35.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/requirements-py27.yml b/ci/requirements-py27.yml index 2ede99444d..e29873562f 100644 --- a/ci/requirements-py27.yml +++ b/ci/requirements-py27.yml @@ -1,7 +1,7 @@ name: test_env channels: + - conda-forge - defaults - - http://conda.anaconda.org/conda-forge dependencies: - python=2.7 - numpy diff --git a/ci/requirements-py34.yml b/ci/requirements-py34.yml index 42f1daddbe..3489970924 100644 --- a/ci/requirements-py34.yml +++ b/ci/requirements-py34.yml @@ -1,7 +1,7 @@ name: test_env channels: - - defaults - conda-forge + - defaults dependencies: - python=3.4 - numpy diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index dbde37fe93..c88c2294e4 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -1,7 +1,7 @@ name: test_env channels: - - defaults - conda-forge + - defaults dependencies: - python=3.5 - numpy From 97576bf85aa67fa8dd32f19c6a32a7abee0fc195 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sat, 4 Feb 2017 16:20:52 -0700 Subject: [PATCH 2/4] add pytest timeout --- ci/requirements-py27.yml | 1 + ci/requirements-py34.yml | 1 + ci/requirements-py35.yml | 1 + pvlib/test/test_forecast.py | 4 +++- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/requirements-py27.yml b/ci/requirements-py27.yml index e29873562f..dd93786152 100644 --- a/ci/requirements-py27.yml +++ b/ci/requirements-py27.yml @@ -16,3 +16,4 @@ dependencies: - nose - pip: - coveralls + - pytest-timeout diff --git a/ci/requirements-py34.yml b/ci/requirements-py34.yml index 3489970924..91ba94f11e 100644 --- a/ci/requirements-py34.yml +++ b/ci/requirements-py34.yml @@ -16,3 +16,4 @@ dependencies: - nose - pip: - coveralls + - pytest-timeout diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index c88c2294e4..8f8c648517 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -16,3 +16,4 @@ dependencies: - nose - pip: - coveralls + - pytest-timeout diff --git a/pvlib/test/test_forecast.py b/pvlib/test/test_forecast.py index 0863e929ec..1019385632 100644 --- a/pvlib/test/test_forecast.py +++ b/pvlib/test/test_forecast.py @@ -30,7 +30,9 @@ _end = _start + pd.Timedelta(days=1) _modelclasses = [ GFS, NAM, HRRR, NDFD, RAP, - pytest.mark.xfail(HRRR_ESRL, reason="HRRR_ESRL is unreliable")] + pytest.mark.xfail( + pytest.mark.timeout(HRRR_ESRL, timeout=60), + reason="HRRR_ESRL is unreliable")] _working_models = [] _variables = ['temp_air', 'wind_speed', 'total_clouds', 'low_clouds', 'mid_clouds', 'high_clouds', 'dni', 'dhi', 'ghi',] From 3197552102ced41f938719b92e7083a1c3c366f7 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 5 Feb 2017 08:53:43 -0700 Subject: [PATCH 3/4] add skip windows --- pvlib/test/conftest.py | 3 +++ pvlib/test/test_forecast.py | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pvlib/test/conftest.py b/pvlib/test/conftest.py index 1167900f21..d85606826e 100644 --- a/pvlib/test/conftest.py +++ b/pvlib/test/conftest.py @@ -7,6 +7,9 @@ import pytest +skip_windows = pytest.mark.skipif('win' in sys.platform, + reason='does not run on windows') + try: import scipy has_scipy = True diff --git a/pvlib/test/test_forecast.py b/pvlib/test/test_forecast.py index 1019385632..44575f0856 100644 --- a/pvlib/test/test_forecast.py +++ b/pvlib/test/test_forecast.py @@ -9,7 +9,7 @@ import pytest from numpy.testing import assert_allclose -from conftest import requires_siphon, has_siphon +from conftest import requires_siphon, has_siphon, skip_windows pytestmark = pytest.mark.skipif(not has_siphon, reason='requires siphon') @@ -30,9 +30,10 @@ _end = _start + pd.Timedelta(days=1) _modelclasses = [ GFS, NAM, HRRR, NDFD, RAP, - pytest.mark.xfail( - pytest.mark.timeout(HRRR_ESRL, timeout=60), - reason="HRRR_ESRL is unreliable")] + skip_windows( + pytest.mark.xfail( + pytest.mark.timeout(HRRR_ESRL, timeout=60), + reason="HRRR_ESRL is unreliable"))] _working_models = [] _variables = ['temp_air', 'wind_speed', 'total_clouds', 'low_clouds', 'mid_clouds', 'high_clouds', 'dni', 'dhi', 'ghi',] From 50b7d8d109aa048e23b3e97cf62b6a6740436735 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Sun, 5 Feb 2017 09:17:23 -0700 Subject: [PATCH 4/4] update whatsnew --- docs/sphinx/source/whatsnew/v0.4.4.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.4.4.txt b/docs/sphinx/source/whatsnew/v0.4.4.txt index 48ff7da142..b881a7e8b9 100644 --- a/docs/sphinx/source/whatsnew/v0.4.4.txt +++ b/docs/sphinx/source/whatsnew/v0.4.4.txt @@ -15,6 +15,15 @@ Documentation * Fixes broken Classes link in the v0.3.0 documentation. +Bug fixes +~~~~~~~~~ + +* Resolved several issues with the forecast module tests. Library import + errors were resolved by prioritizing the conda-forge channel over the + default channel. Stalled ci runs were resolved by adding a timeout to + the HRRR_ESRL test. (:issue:`293`) + + Contributors ~~~~~~~~~~~~