Skip to content

Commit be4aec7

Browse files
committed
Merge remote-tracking branch 'upstream/master' into multi-index-join
2 parents 6c8131d + 8ed92ef commit be4aec7

File tree

149 files changed

+2468
-1010
lines changed

Some content is hidden

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

149 files changed

+2468
-1010
lines changed

.circleci/config.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
version: 2
22
jobs:
3-
4-
# --------------------------------------------------------------------------
5-
# 1. py36_locale
6-
# --------------------------------------------------------------------------
7-
py36_locale:
3+
build:
84
docker:
95
- image: continuumio/miniconda:latest
106
# databases configuration
@@ -21,7 +17,7 @@ jobs:
2117

2218
environment:
2319
JOB: "3.6_LOCALE"
24-
ENV_FILE: "ci/circle-36-locale.yaml"
20+
ENV_FILE: "ci/deps/circle-36-locale.yaml"
2521
LOCALE_OVERRIDE: "zh_CN.UTF-8"
2622
MINICONDA_DIR: /home/ubuntu/miniconda3
2723
steps:
@@ -34,9 +30,3 @@ jobs:
3430
- run:
3531
name: test
3632
command: ./ci/circle/run_circle.sh --skip-slow --skip-network
37-
38-
workflows:
39-
version: 2
40-
build_and_test:
41-
jobs:
42-
- py36_locale

.travis.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,28 @@ matrix:
3434
include:
3535
- dist: trusty
3636
env:
37-
- JOB="3.7" ENV_FILE="ci/travis-37.yaml" TEST_ARGS="--skip-slow --skip-network"
37+
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" TEST_ARGS="--skip-slow --skip-network"
3838

3939
- dist: trusty
4040
env:
41-
- JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
41+
- JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/deps/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
4242
addons:
4343
apt:
4444
packages:
4545
- language-pack-zh-hans
4646
- dist: trusty
4747
env:
48-
- JOB="2.7" ENV_FILE="ci/travis-27.yaml" TEST_ARGS="--skip-slow"
48+
- JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" TEST_ARGS="--skip-slow"
4949
addons:
5050
apt:
5151
packages:
5252
- python-gtk2
5353
- dist: trusty
5454
env:
55-
- JOB="3.6, lint, coverage" ENV_FILE="ci/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true LINT=true
55+
- JOB="3.6, lint, coverage" ENV_FILE="ci/deps/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true LINT=true
5656
- dist: trusty
5757
env:
58-
- JOB="3.7, NumPy dev" ENV_FILE="ci/travis-37-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network -W error" PANDAS_TESTING_MODE="deprecate"
58+
- JOB="3.7, NumPy dev" ENV_FILE="ci/deps/travis-37-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network -W error" PANDAS_TESTING_MODE="deprecate"
5959
addons:
6060
apt:
6161
packages:
@@ -64,19 +64,19 @@ matrix:
6464
# In allow_failures
6565
- dist: trusty
6666
env:
67-
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
67+
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true
6868

6969
# In allow_failures
7070
- dist: trusty
7171
env:
72-
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
72+
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
7373
allow_failures:
7474
- dist: trusty
7575
env:
76-
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
76+
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true
7777
- dist: trusty
7878
env:
79-
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
79+
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
8080

8181
before_install:
8282
- echo "before_install"

asv_bench/benchmarks/reshape.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,33 @@ def time_unstack(self):
4949

5050
class Unstack(object):
5151

52-
def setup(self):
52+
params = ['int', 'category']
53+
54+
def setup(self, dtype):
5355
m = 100
5456
n = 1000
5557

5658
levels = np.arange(m)
5759
index = MultiIndex.from_product([levels] * 2)
5860
columns = np.arange(n)
59-
values = np.arange(m * m * n).reshape(m * m, n)
61+
if dtype == 'int':
62+
values = np.arange(m * m * n).reshape(m * m, n)
63+
else:
64+
# the category branch is ~20x slower than int. So we
65+
# cut down the size a bit. Now it's only ~3x slower.
66+
n = 50
67+
columns = columns[:n]
68+
indices = np.random.randint(0, 52, size=(m * m, n))
69+
values = np.take(list(string.ascii_letters), indices)
70+
values = [pd.Categorical(v) for v in values.T]
71+
6072
self.df = DataFrame(values, index, columns)
6173
self.df2 = self.df.iloc[:-1]
6274

63-
def time_full_product(self):
75+
def time_full_product(self, dtype):
6476
self.df.unstack()
6577

66-
def time_without_last_row(self):
78+
def time_without_last_row(self, dtype):
6779
self.df2.unstack()
6880

6981

ci/azure/linux.yml

+29-4
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
maxParallel: 11
1111
matrix:
1212
py27_np_19:
13-
ENV_FILE: ci/azure-27-compat.yaml
13+
ENV_FILE: ci/deps/azure-27-compat.yaml
1414
CONDA_PY: "27"
1515
CONDA_ENV: pandas
1616
TEST_ARGS: "--skip-slow --skip-network"
1717

1818
py36_locale:
19-
ENV_FILE: ci/azure-37-locale.yaml
19+
ENV_FILE: ci/deps/azure-37-locale.yaml
2020
CONDA_PY: "37"
2121
CONDA_ENV: pandas
2222
TEST_ARGS: "--skip-slow --skip-network"
2323
LOCALE_OVERRIDE: "zh_CN.UTF-8"
2424

2525
py36_locale_slow:
26-
ENV_FILE: ci/azure-36-locale_slow.yaml
26+
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
2727
CONDA_PY: "36"
2828
CONDA_ENV: pandas
2929
TEST_ARGS: "--only-slow --skip-network"
@@ -53,4 +53,29 @@ jobs:
5353
- task: PublishTestResults@2
5454
inputs:
5555
testResultsFiles: 'test-data-*.xml'
56-
testRunTitle: 'Linux'
56+
testRunTitle: 'Linux'
57+
- powershell: |
58+
$junitXml = "test-data-single.xml"
59+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
60+
if ($matches[1] -eq 0)
61+
{
62+
Write-Host "No test failures in test-data-single"
63+
}
64+
else
65+
{
66+
# note that this will produce $LASTEXITCODE=1
67+
Write-Error "$($matches[1]) tests failed"
68+
}
69+
70+
$junitXmlMulti = "test-data-multiple.xml"
71+
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
72+
if ($matches[1] -eq 0)
73+
{
74+
Write-Host "No test failures in test-data-multi"
75+
}
76+
else
77+
{
78+
# note that this will produce $LASTEXITCODE=1
79+
Write-Error "$($matches[1]) tests failed"
80+
}
81+
displayName: Check for test failures

ci/azure/macos.yml

+26-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
maxParallel: 11
1111
matrix:
1212
py35_np_120:
13-
ENV_FILE: ci/azure-macos-35.yaml
13+
ENV_FILE: ci/deps/azure-macos-35.yaml
1414
CONDA_PY: "35"
1515
CONDA_ENV: pandas
1616
TEST_ARGS: "--skip-slow --skip-network"
@@ -41,3 +41,28 @@ jobs:
4141
inputs:
4242
testResultsFiles: 'test-data-*.xml'
4343
testRunTitle: 'MacOS-35'
44+
- powershell: |
45+
$junitXml = "test-data-single.xml"
46+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
47+
if ($matches[1] -eq 0)
48+
{
49+
Write-Host "No test failures in test-data-single"
50+
}
51+
else
52+
{
53+
# note that this will produce $LASTEXITCODE=1
54+
Write-Error "$($matches[1]) tests failed"
55+
}
56+
57+
$junitXmlMulti = "test-data-multiple.xml"
58+
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
59+
if ($matches[1] -eq 0)
60+
{
61+
Write-Host "No test failures in test-data-multi"
62+
}
63+
else
64+
{
65+
# note that this will produce $LASTEXITCODE=1
66+
Write-Error "$($matches[1]) tests failed"
67+
}
68+
displayName: Check for test failures

ci/azure/windows-py27.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
maxParallel: 11
1111
matrix:
1212
py36_np121:
13-
ENV_FILE: ci/azure-windows-27.yaml
13+
ENV_FILE: ci/deps/azure-windows-27.yaml
1414
CONDA_PY: "27"
1515
CONDA_ENV: pandas
1616

@@ -43,3 +43,16 @@ jobs:
4343
inputs:
4444
testResultsFiles: 'test-data.xml'
4545
testRunTitle: 'Windows 27'
46+
- powershell: |
47+
$junitXml = "test-data.xml"
48+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
49+
if ($matches[1] -eq 0)
50+
{
51+
Write-Host "No test failures in test-data"
52+
}
53+
else
54+
{
55+
# note that this will produce $LASTEXITCODE=1
56+
Write-Error "$($matches[1]) tests failed"
57+
}
58+
displayName: Check for test failures

ci/azure/windows.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
maxParallel: 11
1111
matrix:
1212
py36_np14:
13-
ENV_FILE: ci/azure-windows-36.yaml
13+
ENV_FILE: ci/deps/azure-windows-36.yaml
1414
CONDA_PY: "36"
1515
CONDA_ENV: pandas
1616

@@ -34,3 +34,16 @@ jobs:
3434
inputs:
3535
testResultsFiles: 'test-data.xml'
3636
testRunTitle: 'Windows 36'
37+
- powershell: |
38+
$junitXml = "test-data.xml"
39+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
40+
if ($matches[1] -eq 0)
41+
{
42+
Write-Host "No test failures in test-data"
43+
}
44+
else
45+
{
46+
# note that this will produce $LASTEXITCODE=1
47+
Write-Error "$($matches[1]) tests failed"
48+
}
49+
displayName: Check for test failures

ci/code_checks.sh

+10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
4444
flake8 pandas/_libs --filename=*.pxi.in,*.pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403
4545
RET=$(($RET + $?)) ; echo $MSG "DONE"
4646

47+
echo "flake8-rst --version"
48+
flake8-rst --version
49+
50+
MSG='Linting code-blocks in .rst documentation' ; echo $MSG
51+
flake8-rst doc/source --filename=*.rst
52+
RET=$(($RET + $?)) ; echo $MSG "DONE"
53+
4754
# Check that cython casting is of the form `<type>obj` as opposed to `<type> obj`;
4855
# it doesn't make a difference, but we want to be internally consistent.
4956
# Note: this grep pattern is (intended to be) equivalent to the python
@@ -64,6 +71,9 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
6471
cpplint --quiet --extensions=c,h --headers=h --recursive --filter=-readability/casting,-runtime/int,-build/include_subdir pandas/_libs/src/*.h pandas/_libs/src/parser pandas/_libs/ujson pandas/_libs/tslibs/src/datetime
6572
RET=$(($RET + $?)) ; echo $MSG "DONE"
6673

74+
echo "isort --version-number"
75+
isort --version-number
76+
6777
# Imports - Check formatting using isort see setup.cfg for settings
6878
MSG='Check import format using isort ' ; echo $MSG
6979
isort --recursive --check-only pandas
File renamed without changes.
File renamed without changes.
File renamed without changes.

ci/azure-macos-35.yaml renamed to ci/deps/azure-macos-35.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- nomkl
1313
- numexpr
1414
- numpy=1.12.0
15-
- openpyxl
15+
- openpyxl=2.5.5
1616
- pytables
1717
- python=3.5*
1818
- pytz
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ci/travis-36.yaml renamed to ci/deps/travis-36.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- fastparquet
1010
- flake8>=3.5
1111
- flake8-comprehensions
12+
- flake8-rst
1213
- gcsfs
1314
- geopandas
1415
- html5lib
File renamed without changes.
File renamed without changes.

ci/environment-dev.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies:
77
- NumPy
88
- flake8
99
- flake8-comprehensions
10+
- flake8-rst
1011
- hypothesis>=3.58.0
1112
- isort
1213
- moto

ci/incremental/setup_conda_environment.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ conda list
1313
@rem Clean up any left-over from a previous build
1414
conda remove --all -q -y -n %CONDA_ENV%
1515
@rem Scipy, CFFI, jinja2 and IPython are optional dependencies, but exercised in the test suite
16-
conda env create -n %CONDA_ENV% --file=ci\azure-windows-%CONDA_PY%.yaml
16+
conda env create -n %CONDA_ENV% --file=ci\deps\azure-windows-%CONDA_PY%.yaml
1717

1818
call activate %CONDA_ENV%
1919
conda list

ci/requirements_dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Cython>=0.28.2
44
NumPy
55
flake8
66
flake8-comprehensions
7+
flake8-rst
78
hypothesis>=3.58.0
89
isort
910
moto

0 commit comments

Comments
 (0)