Skip to content

Commit 010a2ad

Browse files
Bump minimum pandas version to 0.22.0, switch from pd.util.testing to pd.testing (#1003)
* switch to pd.testing and pd._testing * remove network decorator * increase minimum pandas to 0.22.0 * Update docs/sphinx/source/whatsnew/v0.8.0.rst Co-authored-by: Will Holmgren <[email protected]> Co-authored-by: Will Holmgren <[email protected]>
1 parent 6108043 commit 010a2ad

24 files changed

+22
-54
lines changed

ci/requirements-py35-min.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ dependencies:
1414
- requests
1515
- pip:
1616
- numpy==1.12.0
17-
- pandas==0.18.1
17+
- pandas==0.22.0
1818
- pytest-rerunfailures # conda version is >3.6
1919
- pytest-remotedata # conda package is 0.3.0, needs > 0.3.1

docs/sphinx/source/whatsnew/v0.8.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Documentation
5757

5858
Requirements
5959
~~~~~~~~~~~~
60+
* Minimum pandas version increased to v0.22.0, released Dec 31, 2017. (:pull:`1003`)
6061

6162
Contributors
6263
~~~~~~~~~~~~

pvlib/tests/conftest.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,6 @@ def numpy_1_10():
8484
not numpy_1_10(), reason='requires numpy 1.10 or greater')
8585

8686

87-
def pandas_0_22():
88-
return parse_version(pd.__version__) >= parse_version('0.22.0')
89-
90-
91-
needs_pandas_0_22 = pytest.mark.skipif(
92-
not pandas_0_22(), reason='requires pandas 0.22 or greater')
93-
94-
9587
def has_spa_c():
9688
try:
9789
from pvlib.spa_c_files.spa_py import spa_calc

pvlib/tests/iotools/test_crn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pandas as pd
2-
from pandas.util.testing import assert_frame_equal
2+
from pandas.testing import assert_frame_equal
33
import numpy as np
44
from numpy import dtype, nan
55
import pytest

pvlib/tests/iotools/test_epw.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from pandas.util.testing import network
21
import pytest
32

43
from pvlib.iotools import epw
@@ -11,7 +10,6 @@ def test_read_epw():
1110
epw.read_epw(epw_testfile)
1211

1312

14-
@network
1513
@pytest.mark.remote_data
1614
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
1715
def test_read_epw_remote():

pvlib/tests/iotools/test_midc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pandas as pd
2-
from pandas.util.testing import network
32
import pytest
43
import pytz
54

@@ -64,7 +63,6 @@ def test_read_midc_var_mapping_as_arg(test_mapping):
6463
assert 'temp_air' in data.columns
6564

6665

67-
@network
6866
@pytest.mark.remote_data
6967
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
7068
def test_read_midc_raw_data_from_nrel():

pvlib/tests/iotools/test_solrad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pandas as pd
2-
from pandas.util.testing import assert_frame_equal
2+
from pandas.testing import assert_frame_equal
33
import numpy as np
44
from numpy import nan
55

pvlib/tests/iotools/test_srml.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from numpy import isnan
22
import pandas as pd
3-
from pandas.util.testing import network
43
import pytest
54

65
from pvlib.iotools import srml
@@ -13,7 +12,6 @@ def test_read_srml():
1312
srml.read_srml(srml_testfile)
1413

1514

16-
@network
1715
@pytest.mark.remote_data
1816
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
1917
def test_read_srml_remote():
@@ -66,7 +64,6 @@ def test_map_columns(column, expected):
6664
assert srml.map_columns(column) == expected
6765

6866

69-
@network
7067
@pytest.mark.remote_data
7168
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
7269
def test_read_srml_month_from_solardat():
@@ -76,7 +73,6 @@ def test_read_srml_month_from_solardat():
7673
assert file_data.equals(requested)
7774

7875

79-
@network
8076
@pytest.mark.remote_data
8177
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
8278
def test_15_minute_dt_index():
@@ -90,7 +86,6 @@ def test_15_minute_dt_index():
9086
assert (data.index[3::4].minute == 45).all()
9187

9288

93-
@network
9489
@pytest.mark.remote_data
9590
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
9691
def test_hourly_dt_index():

pvlib/tests/iotools/test_surfrad.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pandas as pd
2-
from pandas.util.testing import network
32
import pytest
43

54
from pvlib.iotools import surfrad
@@ -10,7 +9,6 @@
109
'Alamosa_CO/2016/slv16001.dat')
1110

1211

13-
@network
1412
@pytest.mark.remote_data
1513
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
1614
def test_read_surfrad_network():

pvlib/tests/iotools/test_tmy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from pandas.util.testing import network
21
import numpy as np
32
import pandas as pd
43
import pytest
@@ -17,7 +16,6 @@ def test_read_tmy3():
1716
tmy.read_tmy3(TMY3_TESTFILE)
1817

1918

20-
@network
2119
@pytest.mark.remote_data
2220
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
2321
def test_read_tmy3_remote():

0 commit comments

Comments
 (0)