Skip to content

Commit cc5dc0f

Browse files
committed
Merge remote-tracking branch 'repo_org/master' into Warning_prefix_pandas
* repo_org/master: (23 commits) DOC: Add docstring validations for "See Also" section (pandas-dev#23143) TST: Fix test assertion (pandas-dev#23357) BUG: Handle Period in combine (pandas-dev#23350) REF: SparseArray imports (pandas-dev#23329) CI: Migrate some CircleCI jobs to Azure (pandas-dev#22992) DOC: update the is_month_start/is_month_end docstring (pandas-dev#23051) Partialy fix issue pandas-dev#23334 - isort pandas/core/groupby directory (pandas-dev#23341) TST: Add base test for extensionarray setitem pandas-dev#23300 (pandas-dev#23304) API: Add sparse Acessor (pandas-dev#23183) PERF: speed up CategoricalIndex.get_loc (pandas-dev#23235) fix and test incorrect case in delta_to_nanoseconds (pandas-dev#23302) BUG: Handle Datetimelike data in DataFrame.combine (pandas-dev#23317) TST: re-enable gbq tests (pandas-dev#23303) Switched references of App veyor to azure pipelines in the contributing CI section (pandas-dev#23311) isort imports-io (pandas-dev#23332) DOC: Added a Multi Index example for the Series.sum method (pandas-dev#23279) REF: Make PeriodArray an ExtensionArray (pandas-dev#22862) DOC: Added Examples for Series max (pandas-dev#23298) API/ENH: tz_localize handling of nonexistent times: rename keyword + add shift option (pandas-dev#22644) BUG: Let MultiIndex.set_levels accept any iterable (pandas-dev#23273) (pandas-dev#23291) ...
2 parents 67ed7f4 + f662c5f commit cc5dc0f

File tree

129 files changed

+3371
-1303
lines changed

Some content is hidden

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

129 files changed

+3371
-1303
lines changed

.circleci/config.yml

+3-108
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,6 @@
11
version: 2
22
jobs:
33

4-
# --------------------------------------------------------------------------
5-
# 0. py27_compat
6-
# --------------------------------------------------------------------------
7-
py27_compat:
8-
docker:
9-
- image: continuumio/miniconda:latest
10-
# databases configuration
11-
- image: circleci/postgres:9.6.5-alpine-ram
12-
environment:
13-
POSTGRES_USER: postgres
14-
POSTGRES_DB: pandas_nosetest
15-
- image: circleci/mysql:8-ram
16-
environment:
17-
MYSQL_USER: "root"
18-
MYSQL_HOST: "localhost"
19-
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
20-
MYSQL_DATABASE: "pandas_nosetest"
21-
environment:
22-
JOB: "2.7_COMPAT"
23-
ENV_FILE: "ci/circle-27-compat.yaml"
24-
LOCALE_OVERRIDE: "it_IT.UTF-8"
25-
MINICONDA_DIR: /home/ubuntu/miniconda3
26-
steps:
27-
- checkout
28-
- run:
29-
name: build
30-
command: |
31-
./ci/install_circle.sh
32-
./ci/show_circle.sh
33-
- run:
34-
name: test
35-
command: ./ci/run_circle.sh --skip-slow --skip-network
36-
374
# --------------------------------------------------------------------------
385
# 1. py36_locale
396
# --------------------------------------------------------------------------
@@ -62,86 +29,14 @@ jobs:
6229
- run:
6330
name: build
6431
command: |
65-
./ci/install_circle.sh
66-
./ci/show_circle.sh
32+
./ci/circle/install_circle.sh
33+
./ci/circle/show_circle.sh
6734
- run:
6835
name: test
69-
command: ./ci/run_circle.sh --skip-slow --skip-network
70-
71-
# --------------------------------------------------------------------------
72-
# 2. py36_locale_slow
73-
# --------------------------------------------------------------------------
74-
py36_locale_slow:
75-
docker:
76-
- image: continuumio/miniconda:latest
77-
# databases configuration
78-
- image: circleci/postgres:9.6.5-alpine-ram
79-
environment:
80-
POSTGRES_USER: postgres
81-
POSTGRES_DB: pandas_nosetest
82-
- image: circleci/mysql:8-ram
83-
environment:
84-
MYSQL_USER: "root"
85-
MYSQL_HOST: "localhost"
86-
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
87-
MYSQL_DATABASE: "pandas_nosetest"
88-
89-
environment:
90-
JOB: "3.6_LOCALE_SLOW"
91-
ENV_FILE: "ci/circle-36-locale_slow.yaml"
92-
LOCALE_OVERRIDE: "zh_CN.UTF-8"
93-
MINICONDA_DIR: /home/ubuntu/miniconda3
94-
steps:
95-
- checkout
96-
- run:
97-
name: build
98-
command: |
99-
./ci/install_circle.sh
100-
./ci/show_circle.sh
101-
- run:
102-
name: test
103-
command: ./ci/run_circle.sh --only-slow --skip-network
104-
105-
# --------------------------------------------------------------------------
106-
# 3. py35_ascii
107-
# --------------------------------------------------------------------------
108-
py35_ascii:
109-
docker:
110-
- image: continuumio/miniconda:latest
111-
# databases configuration
112-
- image: circleci/postgres:9.6.5-alpine-ram
113-
environment:
114-
POSTGRES_USER: postgres
115-
POSTGRES_DB: pandas_nosetest
116-
- image: circleci/mysql:8-ram
117-
environment:
118-
MYSQL_USER: "root"
119-
MYSQL_HOST: "localhost"
120-
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
121-
MYSQL_DATABASE: "pandas_nosetest"
122-
123-
environment:
124-
JOB: "3.5_ASCII"
125-
ENV_FILE: "ci/circle-35-ascii.yaml"
126-
LOCALE_OVERRIDE: "C"
127-
MINICONDA_DIR: /home/ubuntu/miniconda3
128-
steps:
129-
- checkout
130-
- run:
131-
name: build
132-
command: |
133-
./ci/install_circle.sh
134-
./ci/show_circle.sh
135-
- run:
136-
name: test
137-
command: ./ci/run_circle.sh --skip-slow --skip-network
138-
36+
command: ./ci/circle/run_circle.sh --skip-slow --skip-network
13937

14038
workflows:
14139
version: 2
14240
build_and_test:
14341
jobs:
144-
- py27_compat
14542
- py36_locale
146-
- py36_locale_slow
147-
- py35_ascii

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ after_success:
116116
after_script:
117117
- echo "after_script start"
118118
- source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
119-
- if [ -e /tmp/single.xml ]; then
120-
ci/print_skipped.py /tmp/single.xml;
119+
- if [ -e test-data-single.xml ]; then
120+
ci/print_skipped.py test-data-single.xml;
121121
fi
122-
- if [ -e /tmp/multiple.xml ]; then
123-
ci/print_skipped.py /tmp/multiple.xml;
122+
- if [ -e test-data-multiple.xml ]; then
123+
ci/print_skipped.py test-data-multiple.xml;
124124
fi
125125
- echo "after_script done"

asv_bench/benchmarks/indexing_engines.py

+20-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
import numpy as np
22

3-
from pandas._libs.index import (Int64Engine, UInt64Engine, Float64Engine,
4-
ObjectEngine)
3+
from pandas._libs import index as libindex
4+
5+
6+
def _get_numeric_engines():
7+
engine_names = [
8+
('Int64Engine', np.int64), ('Int32Engine', np.int32),
9+
('Int16Engine', np.int16), ('Int8Engine', np.int8),
10+
('UInt64Engine', np.uint64), ('UInt32Engine', np.uint32),
11+
('UInt16engine', np.uint16), ('UInt8Engine', np.uint8),
12+
('Float64Engine', np.float64), ('Float32Engine', np.float32),
13+
]
14+
return [(getattr(libindex, engine_name), dtype)
15+
for engine_name, dtype in engine_names
16+
if hasattr(libindex, engine_name)]
517

618

719
class NumericEngineIndexing(object):
820

9-
params = [[Int64Engine, UInt64Engine, Float64Engine],
10-
[np.int64, np.uint64, np.float64],
21+
params = [_get_numeric_engines(),
1122
['monotonic_incr', 'monotonic_decr', 'non_monotonic'],
1223
]
13-
param_names = ['engine', 'dtype', 'index_type']
24+
param_names = ['engine_and_dtype', 'index_type']
1425

15-
def setup(self, engine, dtype, index_type):
26+
def setup(self, engine_and_dtype, index_type):
27+
engine, dtype = engine_and_dtype
1628
N = 10**5
1729
values = list([1] * N + [2] * N + [3] * N)
1830
arr = {
@@ -26,7 +38,7 @@ def setup(self, engine, dtype, index_type):
2638
# code belows avoids populating the mapping etc. while timing.
2739
self.data.get_loc(2)
2840

29-
def time_get_loc(self, engine, dtype, index_type):
41+
def time_get_loc(self, engine_and_dtype, index_type):
3042
self.data.get_loc(2)
3143

3244

@@ -44,7 +56,7 @@ def setup(self, index_type):
4456
'non_monotonic': np.array(list('abc') * N, dtype=object),
4557
}[index_type]
4658

47-
self.data = ObjectEngine(lambda: arr, len(arr))
59+
self.data = libindex.ObjectEngine(lambda: arr, len(arr))
4860
# code belows avoids populating the mapping etc. while timing.
4961
self.data.get_loc('b')
5062

azure-pipelines.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
parameters:
88
name: macOS
99
vmImage: xcode9-macos10.13
10-
# - template: ci/azure/linux.yml
11-
# parameters:
12-
# name: Linux
13-
# vmImage: ubuntu-16.04
10+
- template: ci/azure/linux.yml
11+
parameters:
12+
name: Linux
13+
vmImage: ubuntu-16.04
1414

1515
# Windows Python 2.7 needs VC 9.0 installed, and not sure
1616
# how to make that a conditional task, so for now these are
File renamed without changes.
File renamed without changes.

ci/azure-37-locale.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- cython>=0.28.2
8+
- html5lib
9+
- ipython
10+
- jinja2
11+
- lxml
12+
- matplotlib
13+
- nomkl
14+
- numexpr
15+
- numpy
16+
- openpyxl=2.5.5
17+
- psycopg2
18+
- pymysql
19+
- pytables
20+
- python-dateutil
21+
- python=3.6*
22+
- pytz
23+
- s3fs
24+
- scipy
25+
- sqlalchemy
26+
- xarray
27+
- xlrd
28+
- xlsxwriter
29+
- xlwt
30+
# universal
31+
- pytest
32+
- pytest-xdist
33+
- moto
34+
- pip:
35+
- hypothesis>=3.58.0

ci/azure-windows-36.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
- pyarrow
1717
- pytables
1818
- python-dateutil
19-
- python=3.6.*
19+
- python=3.6.6
2020
- pytz
2121
- scipy
2222
- thrift=0.10*

ci/azure/linux.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
parameters:
2+
name: ''
3+
vmImage: ''
4+
5+
jobs:
6+
- job: ${{ parameters.name }}
7+
pool:
8+
vmImage: ${{ parameters.vmImage }}
9+
strategy:
10+
maxParallel: 11
11+
matrix:
12+
py27_np_19:
13+
ENV_FILE: ci/azure-27-compat.yaml
14+
CONDA_PY: "27"
15+
CONDA_ENV: pandas
16+
TEST_ARGS: "--skip-slow --skip-network"
17+
18+
py36_locale:
19+
ENV_FILE: ci/azure-37-locale.yaml
20+
CONDA_PY: "37"
21+
CONDA_ENV: pandas
22+
TEST_ARGS: "--skip-slow --skip-network"
23+
LOCALE_OVERRIDE: "zh_CN.UTF-8"
24+
25+
py36_locale_slow:
26+
ENV_FILE: ci/azure-36-locale_slow.yaml
27+
CONDA_PY: "36"
28+
CONDA_ENV: pandas
29+
TEST_ARGS: "--only-slow --skip-network"
30+
31+
steps:
32+
- script: |
33+
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386; fi
34+
echo "Installing Miniconda"{
35+
ci/incremental/install_miniconda.sh
36+
export PATH=$HOME/miniconda3/bin:$PATH
37+
echo "Setting up Conda environment"
38+
ci/incremental/setup_conda_environment.sh
39+
displayName: 'Before Install'
40+
- script: |
41+
export PATH=$HOME/miniconda3/bin:$PATH
42+
ci/incremental/build.sh
43+
displayName: 'Build'
44+
- script: |
45+
export PATH=$HOME/miniconda3/bin:$PATH
46+
ci/script_single.sh
47+
ci/script_multi.sh
48+
echo "[Test done]"
49+
displayName: 'Test'
50+
- script: |
51+
export PATH=$HOME/miniconda3/bin:$PATH
52+
source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
53+
- task: PublishTestResults@2
54+
inputs:
55+
testResultsFiles: 'test-data-*.xml'
56+
testRunTitle: 'Linux'

ci/azure/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ jobs:
3939
source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
4040
- task: PublishTestResults@2
4141
inputs:
42-
testResultsFiles: '/tmp/*.xml'
42+
testResultsFiles: 'test-data-*.xml'
4343
testRunTitle: 'MacOS-35'

ci/circle-35-ascii.yaml

-15
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ci/incremental/setup_conda_environment.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ set -v
2727
# w/o removing anything else
2828
echo
2929
echo "[removing installed pandas]"
30-
conda remove pandas -y --force
31-
pip uninstall -y pandas
30+
conda remove pandas -y --force || true
31+
pip uninstall -y pandas || true
3232

3333
echo
3434
echo "[no installed pandas]"
3535
conda list pandas
3636

37+
if [ -n "$LOCALE_OVERRIDE" ]; then
38+
sudo locale-gen "$LOCALE_OVERRIDE"
39+
fi
40+
3741
# # Install the compiler toolchain
3842
# if [[ $(uname) == Linux ]]; then
3943
# if [[ "$CONDA_SUBDIR" == "linux-32" || "$BITS32" == "yes" ]] ; then

ci/script_multi.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ if [ "$DOC" ]; then
2727
echo "We are not running pytest as this is a doc-build"
2828

2929
elif [ "$COVERAGE" ]; then
30-
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
31-
pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
30+
echo pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
31+
pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
3232

3333
elif [ "$SLOW" ]; then
3434
TEST_ARGS="--only-slow --skip-network"
35-
echo pytest -m "not single and slow" -v --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
36-
pytest -m "not single and slow" -v --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
35+
echo pytest -m "not single and slow" -v --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
36+
pytest -m "not single and slow" -v --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
3737

3838
else
39-
echo pytest -n 2 -m "not single" --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas
40-
pytest -n 2 -m "not single" --junitxml=/tmp/multiple.xml --strict $TEST_ARGS pandas # TODO: doctest
39+
echo pytest -n 2 -m "not single" --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
40+
pytest -n 2 -m "not single" --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas # TODO: doctest
4141

4242
fi
4343

0 commit comments

Comments
 (0)