Skip to content

Commit f85baa6

Browse files
authored
Merge pull request #1 from pandas-dev/master
Update fork
2 parents 5ce06b5 + 391aded commit f85baa6

File tree

584 files changed

+22571
-14299
lines changed

Some content is hidden

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

584 files changed

+22571
-14299
lines changed

.circleci/config.yml

Lines changed: 3 additions & 108 deletions
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

.pep8speaks.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@
33
scanner:
44
diff_only: True # If True, errors caused by only the patch are shown
55

6+
# Opened issue in pep8speaks, so we can directly use the config in setup.cfg
7+
# (and avoid having to duplicate it here):
8+
# https://github.com/OrkoHunter/pep8speaks/issues/95
9+
610
pycodestyle:
711
max-line-length: 79
8-
ignore: # Errors and warnings to ignore
12+
ignore:
13+
- W503, # line break before binary operator
14+
- W504, # line break after binary operator
915
- E402, # module level import not at top of file
16+
- E722, # do not use bare except
1017
- E731, # do not assign a lambda expression, use a def
11-
- W503 # line break before binary operator
18+
- C406, # Unnecessary list literal - rewrite as a dict literal.
19+
- C408, # Unnecessary dict call - rewrite as a literal.
20+
- C409 # Unnecessary list passed to tuple() - rewrite as a tuple literal.

.travis.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,27 @@ matrix:
4545
- language-pack-zh-hans
4646
- dist: trusty
4747
env:
48-
- JOB="2.7, lint" ENV_FILE="ci/travis-27.yaml" TEST_ARGS="--skip-slow" LINT=true
48+
- JOB="2.7" ENV_FILE="ci/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, coverage" ENV_FILE="ci/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true DOCTEST=true
56-
# In allow_failures
57-
- dist: trusty
58-
env:
59-
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
60-
# In allow_failures
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
6156
- dist: trusty
6257
env:
6358
- JOB="3.7, NumPy dev" ENV_FILE="ci/travis-37-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network -W error" PANDAS_TESTING_MODE="deprecate"
6459
addons:
6560
apt:
6661
packages:
6762
- xsel
63+
64+
# In allow_failures
65+
- dist: trusty
66+
env:
67+
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
68+
6869
# In allow_failures
6970
- dist: trusty
7071
env:
@@ -73,13 +74,6 @@ matrix:
7374
- dist: trusty
7475
env:
7576
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
76-
- dist: trusty
77-
env:
78-
- JOB="3.7, NumPy dev" ENV_FILE="ci/travis-37-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network -W error" PANDAS_TESTING_MODE="deprecate"
79-
addons:
80-
apt:
81-
packages:
82-
- xsel
8377
- dist: trusty
8478
env:
8579
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
@@ -114,22 +108,18 @@ script:
114108
- ci/run_build_docs.sh
115109
- ci/script_single.sh
116110
- ci/script_multi.sh
117-
- ci/lint.sh
118-
- ci/doctests.sh
119-
- echo "checking imports"
120-
- source activate pandas && python ci/check_imports.py
121-
- echo "script done"
111+
- ci/code_checks.sh
122112

123113
after_success:
124114
- ci/upload_coverage.sh
125115

126116
after_script:
127117
- echo "after_script start"
128118
- source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
129-
- if [ -e /tmp/single.xml ]; then
130-
ci/print_skipped.py /tmp/single.xml;
119+
- if [ -e test-data-single.xml ]; then
120+
ci/print_skipped.py test-data-single.xml;
131121
fi
132-
- if [ -e /tmp/multiple.xml ]; then
133-
ci/print_skipped.py /tmp/multiple.xml;
122+
- if [ -e test-data-multiple.xml ]; then
123+
ci/print_skipped.py test-data-multiple.xml;
134124
fi
135125
- echo "after_script done"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ easy and intuitive. It aims to be the fundamental high-level building block for
9797
doing practical, **real world** data analysis in Python. Additionally, it has
9898
the broader goal of becoming **the most powerful and flexible open source data
9999
analysis / manipulation tool available in any language**. It is already well on
100-
its way toward this goal.
100+
its way towards this goal.
101101

102102
## Main Features
103103
Here are just a few of the things that pandas does well:

asv_bench/benchmarks/algorithms.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@
1212
except (ImportError, TypeError, ValueError):
1313
pass
1414

15-
from .pandas_vb_common import setup # noqa
16-
1715

1816
class Factorize(object):
1917

20-
goal_time = 0.2
21-
2218
params = [True, False]
2319
param_names = ['sort']
2420

@@ -40,8 +36,6 @@ def time_factorize_string(self, sort):
4036

4137
class Duplicated(object):
4238

43-
goal_time = 0.2
44-
4539
params = ['first', 'last', False]
4640
param_names = ['keep']
4741

@@ -63,8 +57,6 @@ def time_duplicated_string(self, keep):
6357

6458
class DuplicatedUniqueIndex(object):
6559

66-
goal_time = 0.2
67-
6860
def setup(self):
6961
N = 10**5
7062
self.idx_int_dup = pd.Int64Index(np.arange(N * 5))
@@ -77,8 +69,6 @@ def time_duplicated_unique_int(self):
7769

7870
class Match(object):
7971

80-
goal_time = 0.2
81-
8272
def setup(self):
8373
self.uniques = tm.makeStringIndex(1000).values
8474
self.all = self.uniques.repeat(10)
@@ -90,8 +80,6 @@ def time_match_string(self):
9080

9181
class Hashing(object):
9282

93-
goal_time = 0.2
94-
9583
def setup_cache(self):
9684
N = 10**5
9785

@@ -126,3 +114,6 @@ def time_series_timedeltas(self, df):
126114

127115
def time_series_dates(self, df):
128116
hashing.hash_pandas_object(df['dates'])
117+
118+
119+
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/attrs_caching.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
except ImportError:
66
from pandas.util.decorators import cache_readonly
77

8-
from .pandas_vb_common import setup # noqa
9-
108

119
class DataFrameAttributes(object):
1210

13-
goal_time = 0.2
14-
1511
def setup(self):
1612
self.df = DataFrame(np.random.randn(10, 6))
1713
self.cur_index = self.df.index
@@ -25,8 +21,6 @@ def time_set_index(self):
2521

2622
class CacheReadonly(object):
2723

28-
goal_time = 0.2
29-
3024
def setup(self):
3125

3226
class Foo:
@@ -38,3 +32,6 @@ def prop(self):
3832

3933
def time_cache_readonly(self):
4034
self.obj.prop
35+
36+
37+
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/binary_ops.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
except ImportError:
77
import pandas.computation.expressions as expr
88

9-
from .pandas_vb_common import setup # noqa
10-
119

1210
class Ops(object):
1311

14-
goal_time = 0.2
15-
1612
params = [[True, False], ['default', 1]]
1713
param_names = ['use_numexpr', 'threads']
1814

@@ -44,8 +40,6 @@ def teardown(self, use_numexpr, threads):
4440

4541
class Ops2(object):
4642

47-
goal_time = 0.2
48-
4943
def setup(self):
5044
N = 10**3
5145
self.df = DataFrame(np.random.randn(N, N))
@@ -83,8 +77,6 @@ def time_frame_float_mod(self):
8377

8478
class Timeseries(object):
8579

86-
goal_time = 0.2
87-
8880
params = [None, 'US/Eastern']
8981
param_names = ['tz']
9082

@@ -111,8 +103,6 @@ def time_timestamp_ops_diff_with_shift(self, tz):
111103

112104
class AddOverflowScalar(object):
113105

114-
goal_time = 0.2
115-
116106
params = [1, -1, 0]
117107
param_names = ['scalar']
118108

@@ -126,8 +116,6 @@ def time_add_overflow_scalar(self, scalar):
126116

127117
class AddOverflowArray(object):
128118

129-
goal_time = 0.2
130-
131119
def setup(self):
132120
N = 10**6
133121
self.arr = np.arange(N)
@@ -149,3 +137,6 @@ def time_add_overflow_b_mask_nan(self):
149137
def time_add_overflow_both_arg_nan(self):
150138
checked_add_with_arr(self.arr, self.arr_mixed, arr_mask=self.arr_nan_1,
151139
b_mask=self.arr_nan_2)
140+
141+
142+
from .pandas_vb_common import setup # noqa: F401

0 commit comments

Comments
 (0)