Skip to content

Commit 5eb692b

Browse files
author
Matias Heikkilä
committed
Merge branch 'master' into validation-test-for-sorting
2 parents e40c5a9 + 8d124ea commit 5eb692b

File tree

134 files changed

+2943
-1844
lines changed

Some content is hidden

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

134 files changed

+2943
-1844
lines changed

asv_bench/benchmarks/frame_methods.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def time_dict_rename_both_axes(self):
9696

9797

9898
class Iteration:
99+
# mem_itertuples_* benchmarks are slow
100+
timeout = 120
99101

100102
def setup(self):
101103
N = 1000

asv_bench/benchmarks/groupby.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from functools import partial
22
from itertools import product
33
from string import ascii_letters
4-
import warnings
54

65
import numpy as np
76

87
from pandas import (
9-
Categorical, DataFrame, MultiIndex, Series, TimeGrouper, Timestamp,
8+
Categorical, DataFrame, MultiIndex, Series, Timestamp,
109
date_range, period_range)
1110
import pandas.util.testing as tm
1211

@@ -301,10 +300,6 @@ def setup(self):
301300
def time_multi_size(self):
302301
self.df.groupby(['key1', 'key2']).size()
303302

304-
def time_dt_timegrouper_size(self):
305-
with warnings.catch_warnings(record=True):
306-
self.df.groupby(TimeGrouper(key='dates', freq='M')).size()
307-
308303
def time_category_size(self):
309304
self.draws.groupby(self.cats).size()
310305

asv_bench/benchmarks/index_object.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def time_is_dates_only(self):
5252

5353
class Ops:
5454

55-
sample_time = 0.2
5655
params = ['float', 'int']
5756
param_names = ['dtype']
5857

@@ -95,6 +94,12 @@ def time_min(self):
9594
def time_min_trivial(self):
9695
self.idx_inc.min()
9796

97+
def time_get_loc_inc(self):
98+
self.idx_inc.get_loc(900000)
99+
100+
def time_get_loc_dec(self):
101+
self.idx_dec.get_loc(100000)
102+
98103

99104
class IndexAppend:
100105

@@ -183,7 +188,7 @@ def time_get_loc(self):
183188

184189
class IntervalIndexMethod:
185190
# GH 24813
186-
params = [10**3, 10**5]
191+
params = [10**3, 10**5, 10**7]
187192

188193
def setup(self, N):
189194
left = np.append(np.arange(N), np.array(0))
@@ -194,5 +199,8 @@ def setup(self, N):
194199
def time_monotonic_inc(self, N):
195200
self.intv.is_monotonic_increasing
196201

202+
def time_is_unique(self, N):
203+
self.intv.is_unique
204+
197205

198206
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/io/parsers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import numpy as np
22

3-
from pandas._libs.tslibs.parsing import (
4-
_concat_date_cols, _does_string_look_like_datetime)
3+
try:
4+
from pandas._libs.tslibs.parsing import (
5+
_concat_date_cols, _does_string_look_like_datetime)
6+
except ImportError:
7+
# Avoid whole benchmark suite import failure on asv (currently 0.4)
8+
pass
59

610

711
class DoesStringLookLikeDatetime(object):

asv_bench/benchmarks/rolling.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
class Methods:
66

7-
sample_time = 0.2
87
params = (['DataFrame', 'Series'],
98
[10, 1000],
109
['int', 'float'],
@@ -23,7 +22,6 @@ def time_rolling(self, constructor, window, dtype, method):
2322

2423
class ExpandingMethods:
2524

26-
sample_time = 0.2
2725
params = (['DataFrame', 'Series'],
2826
['int', 'float'],
2927
['median', 'mean', 'max', 'min', 'std', 'count', 'skew', 'kurt',
@@ -41,7 +39,6 @@ def time_expanding(self, constructor, dtype, method):
4139

4240
class EWMMethods:
4341

44-
sample_time = 0.2
4542
params = (['DataFrame', 'Series'],
4643
[10, 1000],
4744
['int', 'float'],
@@ -58,7 +55,6 @@ def time_ewm(self, constructor, window, dtype, method):
5855

5956

6057
class VariableWindowMethods(Methods):
61-
sample_time = 0.2
6258
params = (['DataFrame', 'Series'],
6359
['50s', '1h', '1d'],
6460
['int', 'float'],
@@ -75,7 +71,6 @@ def setup(self, constructor, window, dtype, method):
7571

7672
class Pairwise:
7773

78-
sample_time = 0.2
7974
params = ([10, 1000, None],
8075
['corr', 'cov'],
8176
[True, False])
@@ -95,7 +90,6 @@ def time_pairwise(self, window, method, pairwise):
9590

9691

9792
class Quantile:
98-
sample_time = 0.2
9993
params = (['DataFrame', 'Series'],
10094
[10, 1000],
10195
['int', 'float'],

azure-pipelines.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Windows
1616
vmImage: vs2017-win2016
1717

18-
- job: 'Checks_and_doc'
18+
- job: 'Checks'
1919
pool:
2020
vmImage: ubuntu-16.04
2121
timeoutInMinutes: 90
@@ -97,10 +97,11 @@ jobs:
9797
- script: |
9898
export PATH=$HOME/miniconda3/bin:$PATH
9999
source activate pandas-dev
100+
cd asv_bench
101+
asv check -E existing
100102
git remote add upstream https://github.com/pandas-dev/pandas.git
101103
git fetch upstream
102104
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
103-
cd asv_bench
104105
asv machine --yes
105106
ASV_OUTPUT="$(asv dev)"
106107
if [[ $(echo "$ASV_OUTPUT" | grep "failed") ]]; then

ci/deps/azure-35-compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ dependencies:
2626
- pip
2727
- pip:
2828
# for python 3.5, pytest>=4.0.2 is not available in conda
29-
- pytest>=4.0.2
29+
- pytest==4.5.0
3030
- html5lib==1.0b2

ci/deps/azure-macos-35.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
- pip:
2626
- python-dateutil==2.5.3
2727
# universal
28-
- pytest>=4.0.2
28+
- pytest==4.5.0
2929
- pytest-xdist
3030
- pytest-mock
3131
- hypothesis>=3.58.0

ci/setup_env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ echo "conda list"
118118
conda list
119119

120120
# Install DB for Linux
121-
if [ ${TRAVIS_OS_NAME} == "linux" ]; then
121+
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
122122
echo "installing dbs"
123123
mysql -e 'create database pandas_nosetest;'
124124
psql -c 'create database pandas_nosetest;' -U postgres
125125
else
126-
echo "not using dbs on non-linux"
126+
echo "not using dbs on non-linux Travis builds or Azure Pipelines"
127127
fi
128128

129129
echo "done"

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
pd.options.display.max_rows = 15
320320
321321
import os
322-
os.chdir('{}')
322+
os.chdir(r'{}')
323323
""".format(os.path.dirname(os.path.dirname(__file__)))
324324

325325

0 commit comments

Comments
 (0)