Skip to content

Commit 1f4a08a

Browse files
authored
Merge branch 'master' into take-error
2 parents 3f85056 + 0b0cac5 commit 1f4a08a

File tree

346 files changed

+5977
-3512
lines changed

Some content is hidden

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

346 files changed

+5977
-3512
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ jobs:
2323
shell: bash -l {0}
2424

2525
concurrency:
26-
group: ${{ github.ref }}-checks
27-
cancel-in-progress: ${{github.event_name == 'pull_request'}}
26+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
27+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-checks
28+
cancel-in-progress: true
2829

2930
steps:
3031
- name: Checkout
@@ -102,7 +103,8 @@ jobs:
102103
runs-on: ubuntu-latest
103104

104105
concurrency:
105-
group: ${{ github.ref }}-web-docs
106+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
107+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-web-docs
106108
cancel-in-progress: true
107109

108110
steps:
@@ -160,11 +162,20 @@ jobs:
160162
data_manager:
161163
name: Test experimental data manager
162164
runs-on: ubuntu-latest
165+
services:
166+
moto:
167+
image: motoserver/moto
168+
env:
169+
AWS_ACCESS_KEY_ID: foobar_key
170+
AWS_SECRET_ACCESS_KEY: foobar_secret
171+
ports:
172+
- 5000:5000
163173
strategy:
164174
matrix:
165175
pattern: ["not slow and not network and not clipboard", "slow"]
166176
concurrency:
167-
group: ${{ github.ref }}-data_manager-${{ matrix.pattern }}
177+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
178+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-data_manager-${{ matrix.pattern }}
168179
cancel-in-progress: true
169180

170181
steps:

.github/workflows/database.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ jobs:
3131
fail-fast: false
3232

3333
concurrency:
34-
group: ${{ github.ref }}-${{ matrix.ENV_FILE }}
35-
cancel-in-progress: ${{github.event_name == 'pull_request'}}
34+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
35+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.ENV_FILE }}
36+
cancel-in-progress: true
3637

3738
services:
3839
mysql:
@@ -62,6 +63,14 @@ jobs:
6263
ports:
6364
- 5432:5432
6465

66+
moto:
67+
image: motoserver/moto
68+
env:
69+
AWS_ACCESS_KEY_ID: foobar_key
70+
AWS_SECRET_ACCESS_KEY: foobar_secret
71+
ports:
72+
- 5000:5000
73+
6574
steps:
6675
- name: Checkout
6776
uses: actions/checkout@v2

.github/workflows/posix.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
settings: [
2828
[actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
2929
[actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
30-
[actions-38.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
30+
[actions-38.yaml, "not slow and not clipboard", "", "", "", "", ""],
3131
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
3232
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
3333
[actions-39-slow.yaml, "slow", "", "", "", "", ""],
3434
[actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
35-
[actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""]
35+
[actions-39.yaml, "not slow and not clipboard", "", "", "", "", ""]
3636
]
3737
fail-fast: false
3838
env:
@@ -46,8 +46,17 @@ jobs:
4646
TEST_ARGS: ${{ matrix.settings[6] }}
4747
PYTEST_TARGET: pandas
4848
concurrency:
49-
group: ${{ github.ref }}-${{ matrix.settings[0] }}
50-
cancel-in-progress: ${{github.event_name == 'pull_request'}}
49+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
50+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.settings[0] }}
51+
cancel-in-progress: true
52+
services:
53+
moto:
54+
image: motoserver/moto
55+
env:
56+
AWS_ACCESS_KEY_ID: foobar_key
57+
AWS_SECRET_ACCESS_KEY: foobar_secret
58+
ports:
59+
- 5000:5000
5160

5261
steps:
5362
- name: Checkout

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ jobs:
1111
pre-commit:
1212
runs-on: ubuntu-latest
1313
concurrency:
14-
group: ${{ github.ref }}-pre-commit
15-
cancel-in-progress: ${{github.event_name == 'pull_request'}}
14+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
15+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pre-commit
16+
cancel-in-progress: true
1617
steps:
1718
- uses: actions/checkout@v2
1819
- uses: actions/setup-python@v2

.github/workflows/python-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ jobs:
3131
timeout-minutes: 80
3232

3333
concurrency:
34-
group: ${{ github.ref }}-${{ matrix.os }}-${{ matrix.pytest_target }}-dev
35-
cancel-in-progress: ${{github.event_name == 'pull_request'}}
34+
#https://github.community/t/concurrecy-not-work-for-push/183068/7
35+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.os }}-${{ matrix.pytest_target }}-dev
36+
cancel-in-progress: true
3637

3738
steps:
3839
- uses: actions/checkout@v2

.github/workflows/sdist.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ jobs:
2525
matrix:
2626
python-version: ["3.8", "3.9", "3.10"]
2727
concurrency:
28-
group: ${{github.ref}}-${{matrix.python-version}}-sdist
29-
cancel-in-progress: ${{github.event_name == 'pull_request'}}
28+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
29+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist
30+
cancel-in-progress: true
3031

3132
steps:
3233
- uses: actions/checkout@v2

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: absolufy-imports
1010
files: ^pandas/
1111
- repo: https://github.com/python/black
12-
rev: 21.10b0
12+
rev: 21.11b1
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/codespell-project/codespell
@@ -55,11 +55,11 @@ repos:
5555
types: [text]
5656
args: [--append-config=flake8/cython-template.cfg]
5757
- repo: https://github.com/PyCQA/isort
58-
rev: 5.9.3
58+
rev: 5.10.1
5959
hooks:
6060
- id: isort
6161
- repo: https://github.com/asottile/pyupgrade
62-
rev: v2.29.0
62+
rev: v2.29.1
6363
hooks:
6464
- id: pyupgrade
6565
args: [--py38-plus]
@@ -111,6 +111,8 @@ repos:
111111
# Incorrect code-block / IPython directives
112112
|\.\.\ code-block\ ::
113113
|\.\.\ ipython\ ::
114+
# directive should not have a space before ::
115+
|\.\.\ \w+\ ::
114116
115117
# Check for deprecated messages without sphinx directive
116118
|(DEPRECATED|DEPRECATE|Deprecated)(:|,|\.)

asv_bench/benchmarks/frame_ctor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
)
2020
except ImportError:
2121
# For compatibility with older versions
22-
from pandas.core.datetools import * # noqa
22+
from pandas.core.datetools import (
23+
Hour,
24+
Nano,
25+
)
2326

2427

2528
class FromDicts:

asv_bench/benchmarks/frame_methods.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def time_reindex_axis1_missing(self):
7676
self.df.reindex(columns=self.idx)
7777

7878
def time_reindex_both_axes(self):
79-
self.df.reindex(index=self.idx, columns=self.idx)
79+
self.df.reindex(index=self.idx, columns=self.idx_cols)
8080

8181
def time_reindex_upcast(self):
8282
self.df2.reindex(np.random.permutation(range(1200)))
@@ -731,17 +731,6 @@ def time_dataframe_describe(self):
731731
self.df.describe()
732732

733733

734-
class SelectDtypes:
735-
params = [100, 1000]
736-
param_names = ["n"]
737-
738-
def setup(self, n):
739-
self.df = DataFrame(np.random.randn(10, n))
740-
741-
def time_select_dtypes(self, n):
742-
self.df.select_dtypes(include="int")
743-
744-
745734
class MemoryUsage:
746735
def setup(self):
747736
self.df = DataFrame(np.random.randn(100000, 2), columns=list("AB"))

asv_bench/benchmarks/groupby.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class GroupByMethods:
443443
"var",
444444
],
445445
["direct", "transformation"],
446-
[1, 2, 5, 10],
446+
[1, 5],
447447
]
448448

449449
def setup(self, dtype, method, application, ncols):
@@ -455,6 +455,7 @@ def setup(self, dtype, method, application, ncols):
455455
raise NotImplementedError
456456

457457
if application == "transformation" and method in [
458+
"describe",
458459
"head",
459460
"tail",
460461
"unique",
@@ -464,7 +465,12 @@ def setup(self, dtype, method, application, ncols):
464465
# DataFrameGroupBy doesn't have these methods
465466
raise NotImplementedError
466467

467-
ngroups = 1000
468+
if method == "describe":
469+
ngroups = 20
470+
elif method in ["mad", "skew"]:
471+
ngroups = 100
472+
else:
473+
ngroups = 1000
468474
size = ngroups * 2
469475
rng = np.arange(ngroups).reshape(-1, 1)
470476
rng = np.broadcast_to(rng, (len(rng), ncols))
@@ -491,9 +497,6 @@ def setup(self, dtype, method, application, ncols):
491497
cols = cols[0]
492498

493499
if application == "transformation":
494-
if method == "describe":
495-
raise NotImplementedError
496-
497500
self.as_group_method = lambda: df.groupby("key")[cols].transform(method)
498501
self.as_field_method = lambda: df.groupby(cols)["key"].transform(method)
499502
else:

0 commit comments

Comments
 (0)