From 10d9b266d06b58b4b8dc238fac5b5b95a90cff93 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Fri, 17 Feb 2017 15:10:58 -0500 Subject: [PATCH 1/7] TST: run windows tests so failures show up in appeveyor --- appveyor.yml | 3 +-- test.bat | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d96e1dfcf76de..08fc35f83b469 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -94,5 +94,4 @@ install: test_script: # tests - cmd: activate pandas - - cmd: cd \ - - cmd: python -c "import pandas; pandas.test(['--skip-slow', '--skip-network'])" + - cmd: test.bat diff --git a/test.bat b/test.bat index 7f9244abb2bc8..2c5f25c24a637 100644 --- a/test.bat +++ b/test.bat @@ -1,4 +1,3 @@ :: test on windows -:: nosetests --exe -A "not slow and not network and not disabled" pandas %* -pytest pandas +pytest --skip-slow --skip-network pandas From e0648251d6ba579576dfab58f604f7c0e7a4e3c2 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Fri, 17 Feb 2017 15:14:25 -0500 Subject: [PATCH 2/7] TST: resample dtype issue xref #15418 --- pandas/tests/tseries/test_resample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/tseries/test_resample.py b/pandas/tests/tseries/test_resample.py index 45bbc88ef711d..6e999c5b1d276 100755 --- a/pandas/tests/tseries/test_resample.py +++ b/pandas/tests/tseries/test_resample.py @@ -1944,7 +1944,7 @@ def test_resample_nunique_with_date_gap(self): index = pd.date_range('1-1-2000', '2-15-2000', freq='h') index2 = pd.date_range('4-15-2000', '5-15-2000', freq='h') index3 = index.append(index2) - s = pd.Series(range(len(index3)), index=index3) + s = pd.Series(range(len(index3)), index=index3, dtype='int64') r = s.resample('M') # Since all elements are unique, these should all be the same From 8194e632854ce4618e7feef13c84a298f9aba9af Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Fri, 17 Feb 2017 19:35:22 -0500 Subject: [PATCH 3/7] don't use appveyor recipe, just build inplace --- appveyor.yml | 8 ++++---- ci/appveyor.recipe/bld.bat | 2 -- ci/appveyor.recipe/build.sh | 2 -- ci/appveyor.recipe/meta.yaml | 37 ------------------------------------ 4 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 ci/appveyor.recipe/bld.bat delete mode 100644 ci/appveyor.recipe/build.sh delete mode 100644 ci/appveyor.recipe/meta.yaml diff --git a/appveyor.yml b/appveyor.yml index 08fc35f83b469..dce9261ba7044 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -78,18 +78,18 @@ install: # this is now the downloaded conda... - cmd: conda info -a - # build em using the local source checkout in the correct windows env - - cmd: '%CMD_IN_ENV% conda build ci\appveyor.recipe -q' - # create our env - cmd: conda create -q -n pandas python=%PYTHON_VERSION% pytest - cmd: activate pandas - SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run - cmd: echo "installing requirements from %REQ%" - cmd: conda install -n pandas -q --file=%REQ% + - cmd: conda remove pandas --force - cmd: conda list -n pandas - cmd: echo "installing requirements from %REQ% - done" - - ps: conda install -n pandas (conda build ci\appveyor.recipe -q --output) + + # build em using the local source checkout in the correct windows env + - cmd: '%CMD_IN_ENV% python setup.py build_ext --inplace' test_script: # tests diff --git a/ci/appveyor.recipe/bld.bat b/ci/appveyor.recipe/bld.bat deleted file mode 100644 index 284926fae8c04..0000000000000 --- a/ci/appveyor.recipe/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -%PYTHON% setup.py install diff --git a/ci/appveyor.recipe/build.sh b/ci/appveyor.recipe/build.sh deleted file mode 100644 index f341bce6fcf96..0000000000000 --- a/ci/appveyor.recipe/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -$PYTHON setup.py install diff --git a/ci/appveyor.recipe/meta.yaml b/ci/appveyor.recipe/meta.yaml deleted file mode 100644 index 777fd9d682d48..0000000000000 --- a/ci/appveyor.recipe/meta.yaml +++ /dev/null @@ -1,37 +0,0 @@ -package: - name: pandas - version: 0.20.0 - -build: - number: {{environ.get('APPVEYOR_BUILD_NUMBER', 0)}} # [win] - string: np{{ environ.get('CONDA_NPY') }}py{{ environ.get('CONDA_PY') }}_{{ environ.get('APPVEYOR_BUILD_NUMBER', 0) }} # [win] - -source: - - # conda-build needs a full clone - # rather than a shallow git_url type clone - # https://github.com/conda/conda-build/issues/780 - path: ../../ - -requirements: - build: - - python - - cython - - numpy x.x - - setuptools - - pytz - - python-dateutil - - run: - - python - - numpy x.x - - python-dateutil - - pytz - -test: - imports: - - pandas - -about: - home: http://pandas.pydata.org - license: BSD From efe6a7632152729cbfb721f2732d9ad913621f78 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Feb 2017 09:07:22 -0500 Subject: [PATCH 4/7] add cython to build --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index dce9261ba7044..d312f3fc04572 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -79,7 +79,7 @@ install: - cmd: conda info -a # create our env - - cmd: conda create -q -n pandas python=%PYTHON_VERSION% pytest + - cmd: conda create -q -n pandas python=%PYTHON_VERSION% cython pytest - cmd: activate pandas - SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run - cmd: echo "installing requirements from %REQ%" From cf3b9bdc5eb3956e71f9cc1e9af48cb9c22e04ec Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Feb 2017 09:41:56 -0500 Subject: [PATCH 5/7] more windows fixing --- pandas/tests/indexing/test_timedelta.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/tests/indexing/test_timedelta.py b/pandas/tests/indexing/test_timedelta.py index e5ccd72cac20a..5f0088382ce57 100644 --- a/pandas/tests/indexing/test_timedelta.py +++ b/pandas/tests/indexing/test_timedelta.py @@ -13,8 +13,7 @@ def test_boolean_indexing(self): [0, 1, 2, 10, 4, 5, 6, 7, 8, 9], [10, 10, 10, 3, 4, 5, 6, 7, 8, 9]] for cond, data in zip(conditions, expected_data): - result = df.copy() - result.loc[cond, 'x'] = 10 + result = df.assign(x=df.mask(cond, 10).astype('int64')) expected = pd.DataFrame(data, index=pd.to_timedelta(range(10), unit='s'), columns=['x']) From eab15c426704509dd64916260cccd2191d6293bb Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Feb 2017 10:03:12 -0500 Subject: [PATCH 6/7] don't force remove pandas --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d312f3fc04572..1c14698430996 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -84,7 +84,6 @@ install: - SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run - cmd: echo "installing requirements from %REQ%" - cmd: conda install -n pandas -q --file=%REQ% - - cmd: conda remove pandas --force - cmd: conda list -n pandas - cmd: echo "installing requirements from %REQ% - done" From a5b7fb3e94142b890eafc417405c27c18bebf25a Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Feb 2017 11:16:32 -0500 Subject: [PATCH 7/7] change integer to power comparisions --- pandas/tests/test_expressions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/tests/test_expressions.py b/pandas/tests/test_expressions.py index 3032a288032a2..f669ebe371f9d 100644 --- a/pandas/tests/test_expressions.py +++ b/pandas/tests/test_expressions.py @@ -12,7 +12,7 @@ from pandas.core.api import DataFrame, Panel from pandas.computation import expressions as expr -from pandas import compat, _np_version_under1p12 +from pandas import compat, _np_version_under1p11 from pandas.util.testing import (assert_almost_equal, assert_series_equal, assert_frame_equal, assert_panel_equal, assert_panel4d_equal, slow) @@ -70,10 +70,10 @@ def run_arithmetic(self, df, other, assert_func, check_dtype=False, operations.append('div') for arith in operations: - # numpy >= 1.12 doesn't handle integers + # numpy >= 1.11 doesn't handle integers # raised to integer powers # https://github.com/pandas-dev/pandas/issues/15363 - if arith == 'pow' and not _np_version_under1p12: + if arith == 'pow' and not _np_version_under1p11: continue operator_name = arith @@ -272,10 +272,10 @@ def testit(): for op, op_str in [('add', '+'), ('sub', '-'), ('mul', '*'), ('div', '/'), ('pow', '**')]: - # numpy >= 1.12 doesn't handle integers + # numpy >= 1.11 doesn't handle integers # raised to integer powers # https://github.com/pandas-dev/pandas/issues/15363 - if op == 'pow' and not _np_version_under1p12: + if op == 'pow' and not _np_version_under1p11: continue if op == 'div':