Skip to content

Commit c78f364

Browse files
committed
Merge branch 'master' into enhancement/from_frame
2 parents a5236bf + 5b6b346 commit c78f364

File tree

175 files changed

+9158
-7494
lines changed

Some content is hidden

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

175 files changed

+9158
-7494
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
command: |
3535
export PATH="$MINICONDA_DIR/bin:$PATH"
3636
source activate pandas-dev
37-
echo "pytest --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml --skip-slow --skip-network pandas"
38-
pytest --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml --skip-slow --skip-network pandas
37+
echo "pytest -m "not slow and not network" --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml pandas"
38+
pytest -m "not slow and not network" --strict --durations=10 --color=no --junitxml=$CIRCLE_TEST_REPORTS/reports/junit.xml pandas

.travis.yml

Lines changed: 10 additions & 14 deletions
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/deps/travis-37.yaml" TEST_ARGS="--skip-slow --skip-network"
37+
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="not slow and not network"
3838

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

6969
# In allow_failures
7070
- dist: trusty
@@ -73,7 +73,7 @@ matrix:
7373
allow_failures:
7474
- dist: trusty
7575
env:
76-
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true
76+
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
7777
- dist: trusty
7878
env:
7979
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
@@ -107,20 +107,16 @@ script:
107107
- echo "script start"
108108
- source activate pandas-dev
109109
- ci/run_build_docs.sh
110-
- ci/script_single.sh
111-
- ci/script_multi.sh
110+
- ci/run_tests.sh
112111
- ci/code_checks.sh
113112

114-
after_success:
115-
- ci/upload_coverage.sh
116-
117113
after_script:
118114
- echo "after_script start"
119115
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
120116
- if [ -e test-data-single.xml ]; then
121-
ci/print_skipped.py test-data-single.xml;
117+
ci/print_skipped.py test-data-single.xml;
122118
fi
123119
- if [ -e test-data-multiple.xml ]; then
124-
ci/print_skipped.py test-data-multiple.xml;
120+
ci/print_skipped.py test-data-multiple.xml;
125121
fi
126122
- echo "after_script done"

asv_bench/benchmarks/categoricals.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def setup(self):
4646
self.values_some_nan = list(np.tile(self.categories + [np.nan], N))
4747
self.values_all_nan = [np.nan] * len(self.values)
4848
self.values_all_int8 = np.ones(N, 'int8')
49+
self.categorical = pd.Categorical(self.values, self.categories)
50+
self.series = pd.Series(self.categorical)
4951

5052
def time_regular(self):
5153
pd.Categorical(self.values, self.categories)
@@ -68,6 +70,12 @@ def time_all_nan(self):
6870
def time_from_codes_all_int8(self):
6971
pd.Categorical.from_codes(self.values_all_int8, self.categories)
7072

73+
def time_existing_categorical(self):
74+
pd.Categorical(self.categorical)
75+
76+
def time_existing_series(self):
77+
pd.Categorical(self.series)
78+
7179

7280
class ValueCounts(object):
7381

ci/README.txt

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

ci/azure/linux.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ jobs:
1212
py27_np_120:
1313
ENV_FILE: ci/deps/azure-27-compat.yaml
1414
CONDA_PY: "27"
15-
TEST_ARGS: "--skip-slow --skip-network"
15+
PATTERN: "not slow and not network"
1616

1717
py37_locale:
1818
ENV_FILE: ci/deps/azure-37-locale.yaml
1919
CONDA_PY: "37"
20-
TEST_ARGS: "--skip-slow --skip-network"
20+
PATTERN: "not slow and not network"
2121
LOCALE_OVERRIDE: "zh_CN.UTF-8"
2222

2323
py36_locale_slow:
2424
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
2525
CONDA_PY: "36"
26-
TEST_ARGS: "--only-slow --skip-network"
26+
PATTERN: "not slow and not network"
2727
LOCALE_OVERRIDE: "it_IT.UTF-8"
2828

2929
steps:
@@ -43,9 +43,7 @@ jobs:
4343
- script: |
4444
export PATH=$HOME/miniconda3/bin:$PATH
4545
source activate pandas-dev
46-
ci/script_single.sh
47-
ci/script_multi.sh
48-
echo "[Test done]"
46+
ci/run_tests.sh
4947
displayName: 'Test'
5048
- script: |
5149
export PATH=$HOME/miniconda3/bin:$PATH

ci/azure/macos.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
py35_np_120:
1313
ENV_FILE: ci/deps/azure-macos-35.yaml
1414
CONDA_PY: "35"
15-
TEST_ARGS: "--skip-slow --skip-network"
15+
PATTERN: "not slow and not network"
1616

1717
steps:
1818
- script: |
@@ -31,9 +31,7 @@ jobs:
3131
- script: |
3232
export PATH=$HOME/miniconda3/bin:$PATH
3333
source activate pandas-dev
34-
ci/script_single.sh
35-
ci/script_multi.sh
36-
echo "[Test done]"
34+
ci/run_tests.sh
3735
displayName: 'Test'
3836
- script: |
3937
export PATH=$HOME/miniconda3/bin:$PATH

ci/azure/windows-py27.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
displayName: 'Build'
3838
- script: |
3939
call activate pandas-dev
40-
pytest --junitxml=test-data.xml --skip-slow --skip-network pandas -n 2 -r sxX --strict --durations=10 %*
40+
pytest -m "not slow and not network" --junitxml=test-data.xml pandas -n 2 -r sxX --strict --durations=10 %*
4141
displayName: 'Test'
4242
- task: PublishTestResults@2
4343
inputs:

ci/azure/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
displayName: 'Build'
2929
- script: |
3030
call activate pandas-dev
31-
pytest --junitxml=test-data.xml --skip-slow --skip-network pandas -n 2 -r sxX --strict --durations=10 %*
31+
pytest -m "not slow and not network" --junitxml=test-data.xml pandas -n 2 -r sxX --strict --durations=10 %*
3232
displayName: 'Test'
3333
- task: PublishTestResults@2
3434
inputs:

ci/code_checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
147147

148148
MSG='Doctests frame.py' ; echo $MSG
149149
pytest -q --doctest-modules pandas/core/frame.py \
150-
-k"-axes -combine -itertuples -join -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack"
150+
-k"-axes -combine -itertuples -join -pivot_table -quantile -query -reindex -reindex_axis -round"
151151
RET=$(($RET + $?)) ; echo $MSG "DONE"
152152

153153
MSG='Doctests series.py' ; echo $MSG

ci/print_versions.py

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

0 commit comments

Comments
 (0)