Skip to content

Commit 9355ce2

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into opsolete
2 parents bfcfdab + 718d067 commit 9355ce2

File tree

121 files changed

+3316
-2425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+3316
-2425
lines changed

.travis.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ matrix:
5252
# In allow_failures
5353
- dist: trusty
5454
env:
55-
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
55+
- JOB="3.5" TEST_ARGS="--skip-slow --skip-network"
5656
- dist: trusty
5757
env:
5858
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true COVERAGE=true
@@ -73,17 +73,13 @@ matrix:
7373
env:
7474
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
7575
# In allow_failures
76-
- dist: trusty
77-
env:
78-
- JOB="3.6_ASV" ASV=true
79-
# In allow_failures
8076
- dist: trusty
8177
env:
8278
- JOB="3.6_DOC" DOC=true
8379
allow_failures:
8480
- dist: trusty
8581
env:
86-
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
82+
- JOB="3.5" TEST_ARGS="--skip-slow --skip-network"
8783
- dist: trusty
8884
env:
8985
- JOB="2.7_SLOW" SLOW=true
@@ -97,9 +93,6 @@ matrix:
9793
- dist: trusty
9894
env:
9995
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
100-
- dist: trusty
101-
env:
102-
- JOB="3.6_ASV" ASV=true
10396
- dist: trusty
10497
env:
10598
- JOB="3.6_DOC" DOC=true
@@ -135,7 +128,6 @@ script:
135128
- ci/script_single.sh
136129
- ci/script_multi.sh
137130
- ci/lint.sh
138-
- ci/asv.sh
139131
- echo "checking imports"
140132
- source activate pandas && python ci/check_imports.py
141133
- echo "script done"

asv_bench/benchmarks/rolling.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,26 @@ class Methods(object):
1616

1717
def setup(self, constructor, window, dtype, method):
1818
N = 10**5
19-
arr = np.random.random(N).astype(dtype)
19+
arr = (100 * np.random.random(N)).astype(dtype)
2020
self.roll = getattr(pd, constructor)(arr).rolling(window)
2121

2222
def time_rolling(self, constructor, window, dtype, method):
2323
getattr(self.roll, method)()
2424

25+
class VariableWindowMethods(Methods):
26+
sample_time = 0.2
27+
params = (['DataFrame', 'Series'],
28+
['50s', '1h', '1d'],
29+
['int', 'float'],
30+
['median', 'mean', 'max', 'min', 'std', 'count', 'skew', 'kurt',
31+
'sum'])
32+
param_names = ['contructor', 'window', 'dtype', 'method']
33+
34+
def setup(self, constructor, window, dtype, method):
35+
N = 10**5
36+
arr = (100 * np.random.random(N)).astype(dtype)
37+
index = pd.date_range('2017-01-01', periods=N, freq='5s')
38+
self.roll = getattr(pd, constructor)(arr, index=index).rolling(window)
2539

2640
class Pairwise(object):
2741

ci/asv.sh

-35
This file was deleted.

ci/install_travis.sh

+1-16
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ conda config --set ssl_verify false || exit 1
5050
conda config --set quiet true --set always_yes true --set changeps1 false || exit 1
5151
conda update -q conda
5252

53-
if [ "$CONDA_BUILD_TEST" ]; then
54-
echo
55-
echo "[installing conda-build]"
56-
conda install conda-build
57-
fi
58-
5953
echo
6054
echo "[add channels]"
6155
conda config --remove channels defaults || exit 1
@@ -122,7 +116,7 @@ if [ "$COVERAGE" ]; then
122116
fi
123117

124118
echo
125-
if [ -z "$PIP_BUILD_TEST" ] && [ -z "$CONDA_BUILD_TEST" ]; then
119+
if [ -z "$PIP_BUILD_TEST" ] ; then
126120

127121
# build but don't install
128122
echo "[build em]"
@@ -177,15 +171,6 @@ if [ "$PIP_BUILD_TEST" ]; then
177171
conda uninstall -y cython
178172
time pip install dist/*tar.gz || exit 1
179173

180-
elif [ "$CONDA_BUILD_TEST" ]; then
181-
182-
# build & install testing
183-
echo "[building conda recipe]"
184-
time conda build ./conda.recipe --python 3.5 -q --no-test || exit 1
185-
186-
echo "[installing]"
187-
conda install pandas --use-local || exit 1
188-
189174
else
190175

191176
# install our pandas
File renamed without changes.
File renamed without changes.

ci/requirements-3.5_CONDA_BUILD_TEST.sh renamed to ci/requirements-3.5.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source activate pandas
44

5-
echo "install 35 CONDA_BUILD_TEST"
5+
echo "install 35"
66

77
# pip install python-dateutil to get latest
88
conda remove -n pandas python-dateutil --force

ci/requirements-3.6.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lxml
1313
html5lib
1414
jinja2
1515
sqlalchemy
16-
pymysql<0.8.0
16+
pymysql
1717
feather-format
1818
pyarrow
1919
psycopg2

ci/requirements-3.6_ASV.build

-5
This file was deleted.

ci/requirements-3.6_ASV.run

-25
This file was deleted.

ci/requirements-3.6_ASV.sh

-7
This file was deleted.

ci/requirements_dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ pytest>=3.1
77
python-dateutil>=2.5.0
88
pytz
99
setuptools>=3.3
10-
sphinx
10+
sphinx=1.5*

ci/script_multi.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
1212
python -c "$pycmd"
1313
fi
1414

15+
# Enforce absent network during testing by faking a proxy
16+
if echo "$TEST_ARGS" | grep -e --skip-network -q; then
17+
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
18+
fi
19+
1520
# Workaround for pytest-xdist flaky collection order
1621
# https://github.com/pytest-dev/pytest/issues/920
1722
# https://github.com/pytest-dev/pytest/issues/1075
1823
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
1924
echo PYTHONHASHSEED=$PYTHONHASHSEED
2025

21-
if [ "$PIP_BUILD_TEST" ] || [ "$CONDA_BUILD_TEST" ]; then
26+
if [ "$PIP_BUILD_TEST" ] ; then
2227
echo "[build-test]"
2328

2429
echo "[env]"
@@ -37,9 +42,6 @@ if [ "$PIP_BUILD_TEST" ] || [ "$CONDA_BUILD_TEST" ]; then
3742
elif [ "$DOC" ]; then
3843
echo "We are not running pytest as this is a doc-build"
3944

40-
elif [ "$ASV" ]; then
41-
echo "We are not running pytest as this is an asv-build"
42-
4345
elif [ "$COVERAGE" ]; then
4446
echo pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
4547
pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas

ci/script_single.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ if [ "$SLOW" ]; then
1616
TEST_ARGS="--only-slow --skip-network"
1717
fi
1818

19-
if [ "$PIP_BUILD_TEST" ] || [ "$CONDA_BUILD_TEST" ]; then
19+
# Enforce absent network during testing by faking a proxy
20+
if echo "$TEST_ARGS" | grep -e --skip-network -q; then
21+
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
22+
fi
23+
24+
if [ "$PIP_BUILD_TEST" ]; then
2025
echo "We are not running pytest as this is a build test."
2126

2227
elif [ "$DOC" ]; then
2328
echo "We are not running pytest as this is a doc-build"
2429

25-
elif [ "$ASV" ]; then
26-
echo "We are not running pytest as this is an asv-build"
27-
2830
elif [ "$COVERAGE" ]; then
2931
echo pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas
3032
pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas

0 commit comments

Comments
 (0)