Skip to content

Commit 7d9b27d

Browse files
authored
Merge branch 'master' into bugfixs/19671
2 parents 37aa8dd + 740ad9a commit 7d9b27d

File tree

94 files changed

+3424
-2631
lines changed

Some content is hidden

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

94 files changed

+3424
-2631
lines changed

.travis.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ matrix:
5050
packages:
5151
- python-gtk2
5252
# In allow_failures
53-
- dist: trusty
54-
env:
55-
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
5653
- dist: trusty
5754
env:
5855
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true COVERAGE=true
@@ -63,43 +60,26 @@ matrix:
6360
# In allow_failures
6461
- dist: trusty
6562
env:
66-
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
63+
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
6764
addons:
6865
apt:
6966
packages:
7067
- xsel
7168
# In allow_failures
72-
- dist: trusty
73-
env:
74-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
75-
# In allow_failures
76-
- dist: trusty
77-
env:
78-
- JOB="3.6_ASV" ASV=true
79-
# In allow_failures
8069
- dist: trusty
8170
env:
8271
- JOB="3.6_DOC" DOC=true
8372
allow_failures:
84-
- dist: trusty
85-
env:
86-
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
8773
- dist: trusty
8874
env:
8975
- JOB="2.7_SLOW" SLOW=true
9076
- dist: trusty
9177
env:
92-
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
78+
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
9379
addons:
9480
apt:
9581
packages:
9682
- xsel
97-
- dist: trusty
98-
env:
99-
- 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
10383
- dist: trusty
10484
env:
10585
- JOB="3.6_DOC" DOC=true
@@ -135,7 +115,6 @@ script:
135115
- ci/script_single.sh
136116
- ci/script_multi.sh
137117
- ci/lint.sh
138-
- ci/asv.sh
139118
- echo "checking imports"
140119
- source activate pandas && python ci/check_imports.py
141120
- echo "script done"

asv_bench/benchmarks/rolling.py

Lines changed: 15 additions & 1 deletion
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

Lines changed: 0 additions & 35 deletions
This file was deleted.

ci/install_travis.sh

Lines changed: 2 additions & 41 deletions
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
@@ -121,15 +115,6 @@ if [ "$COVERAGE" ]; then
121115
pip install coverage pytest-cov
122116
fi
123117

124-
echo
125-
if [ -z "$PIP_BUILD_TEST" ] && [ -z "$CONDA_BUILD_TEST" ]; then
126-
127-
# build but don't install
128-
echo "[build em]"
129-
time python setup.py build_ext --inplace || exit 1
130-
131-
fi
132-
133118
# we may have run installations
134119
echo
135120
echo "[conda installs]"
@@ -167,32 +152,8 @@ conda list pandas
167152
pip list --format columns |grep pandas
168153

169154
# build and install
170-
echo
171-
172-
if [ "$PIP_BUILD_TEST" ]; then
173-
174-
# build & install testing
175-
echo "[building release]"
176-
time bash scripts/build_dist_for_release.sh || exit 1
177-
conda uninstall -y cython
178-
time pip install dist/*tar.gz || exit 1
179-
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-
189-
else
190-
191-
# install our pandas
192-
echo "[running setup.py develop]"
193-
python setup.py develop || exit 1
194-
195-
fi
155+
echo "[running setup.py develop]"
156+
python setup.py develop || exit 1
196157

197158
echo
198159
echo "[show pandas]"
File renamed without changes.
File renamed without changes.

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

Lines changed: 1 addition & 1 deletion
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_ASV.build

Lines changed: 0 additions & 5 deletions
This file was deleted.

ci/requirements-3.6_ASV.run

Lines changed: 0 additions & 25 deletions
This file was deleted.

ci/requirements-3.6_ASV.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

ci/requirements-3.6_PIP_BUILD_TEST.build

Lines changed: 0 additions & 6 deletions
This file was deleted.

ci/requirements-3.6_PIP_BUILD_TEST.pip

Lines changed: 0 additions & 6 deletions
This file was deleted.

ci/requirements-3.6_PIP_BUILD_TEST.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

ci/requirements_dev.txt

Lines changed: 1 addition & 1 deletion
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

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,20 @@ 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
22-
echo "[build-test]"
23-
24-
echo "[env]"
25-
pip list --format columns |grep pandas
26-
27-
echo "[running]"
28-
cd /tmp
29-
unset PYTHONPATH
30-
31-
echo "[build-test: single]"
32-
python -c 'import pandas; pandas.test(["--skip-slow", "--skip-network", "-r xX", "-m single"])'
33-
34-
echo "[build-test: not single]"
35-
python -c 'import pandas; pandas.test(["-n 2", "--skip-slow", "--skip-network", "-r xX", "-m not single"])'
36-
37-
elif [ "$DOC" ]; then
26+
if [ "$DOC" ]; then
3827
echo "We are not running pytest as this is a doc-build"
3928

40-
elif [ "$ASV" ]; then
41-
echo "We are not running pytest as this is an asv-build"
42-
4329
elif [ "$COVERAGE" ]; then
4430
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
4531
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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ if [ "$SLOW" ]; then
1616
TEST_ARGS="--only-slow --skip-network"
1717
fi
1818

19-
if [ "$PIP_BUILD_TEST" ] || [ "$CONDA_BUILD_TEST" ]; then
20-
echo "We are not running pytest as this is a build test."
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
2123

22-
elif [ "$DOC" ]; then
24+
if [ "$DOC" ]; then
2325
echo "We are not running pytest as this is a doc-build"
2426

25-
elif [ "$ASV" ]; then
26-
echo "We are not running pytest as this is an asv-build"
27-
2827
elif [ "$COVERAGE" ]; then
2928
echo pytest -s -m "single" --strict --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas
3029
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)