Skip to content

Commit f6ffa40

Browse files
committed
Merge branch 'master' into issue13519-groupby-shift-indices
2 parents f9c0398 + f115360 commit f6ffa40

File tree

163 files changed

+1969
-1688
lines changed

Some content is hidden

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

163 files changed

+1969
-1688
lines changed

.github/workflows/ci.yml

+8-37
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ jobs:
141141
data_manager:
142142
name: Test experimental data manager
143143
runs-on: ubuntu-latest
144+
strategy:
145+
matrix:
146+
pattern: ["not slow and not network and not clipboard", "slow"]
144147
steps:
145148

146149
- name: Checkout
@@ -152,43 +155,11 @@ jobs:
152155
- name: Run tests
153156
env:
154157
PANDAS_DATA_MANAGER: array
158+
PATTERN: ${{ matrix.pattern }}
159+
PYTEST_WORKERS: "auto"
155160
run: |
156161
source activate pandas-dev
162+
ci/run_tests.sh
157163
158-
pytest pandas/tests/frame/
159-
pytest pandas/tests/reductions/
160-
pytest pandas/tests/generic/test_generic.py
161-
pytest pandas/tests/arithmetic/
162-
pytest pandas/tests/groupby/
163-
pytest pandas/tests/resample/
164-
pytest pandas/tests/reshape/merge
165-
pytest pandas/tests/series/
166-
167-
# indexing subset (temporary since other tests don't pass yet)
168-
pytest pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_astype_assignment_with_dups
169-
pytest pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_frame_setitem_multi_column
170-
171-
pytest pandas/tests/api/
172-
pytest pandas/tests/apply/
173-
pytest pandas/tests/arrays/
174-
pytest pandas/tests/base/
175-
pytest pandas/tests/computation/
176-
pytest pandas/tests/config/
177-
pytest pandas/tests/dtypes/
178-
pytest pandas/tests/generic/
179-
pytest pandas/tests/indexes/
180-
pytest pandas/tests/io/test_* -m "not slow and not clipboard"
181-
pytest pandas/tests/io/excel/ -m "not slow and not clipboard"
182-
pytest pandas/tests/io/formats/ -m "not slow and not clipboard"
183-
pytest pandas/tests/io/parser/ -m "not slow and not clipboard"
184-
pytest pandas/tests/io/sas/ -m "not slow and not clipboard"
185-
pytest pandas/tests/io/xml/ -m "not slow and not clipboard"
186-
pytest pandas/tests/libs/
187-
pytest pandas/tests/plotting/
188-
pytest pandas/tests/scalar/
189-
pytest pandas/tests/strings/
190-
pytest pandas/tests/tools/
191-
pytest pandas/tests/tseries/
192-
pytest pandas/tests/tslibs/
193-
pytest pandas/tests/util/
194-
pytest pandas/tests/window/
164+
- name: Print skipped tests
165+
run: python ci/print_skipped.py

.github/workflows/database.yml

+9-87
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ env:
1212
PYTEST_WORKERS: "auto"
1313
PANDAS_CI: 1
1414
PATTERN: ((not slow and not network and not clipboard) or (single and db))
15+
COVERAGE: true
1516

1617
jobs:
17-
Linux_py37_locale:
18+
Linux_py37_IO:
1819
runs-on: ubuntu-latest
1920
defaults:
2021
run:
2122
shell: bash -l {0}
2223

23-
env:
24-
ENV_FILE: ci/deps/actions-37-locale.yaml
25-
LOCALE_OVERRIDE: zh_CN.UTF-8
24+
strategy:
25+
matrix:
26+
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
27+
fail-fast: false
2628

2729
services:
2830
mysql:
@@ -63,99 +65,20 @@ jobs:
6365
with:
6466
path: ~/conda_pkgs_dir
6567
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
66-
hashFiles('${{ env.ENV_FILE }}') }}
68+
hashFiles('${{ matrix.ENV_FILE }}') }}
6769

6870
- uses: conda-incubator/setup-miniconda@v2
6971
with:
7072
activate-environment: pandas-dev
7173
channel-priority: strict
72-
environment-file: ${{ env.ENV_FILE }}
74+
environment-file: ${{ matrix.ENV_FILE }}
7375
use-only-tar-bz2: true
7476

7577
- name: Build Pandas
7678
uses: ./.github/actions/build_pandas
7779

7880
- name: Test
79-
run: ci/run_tests.sh
80-
if: always()
81-
82-
- name: Build Version
83-
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
84-
85-
- name: Publish test results
86-
uses: actions/upload-artifact@master
87-
with:
88-
name: Test results
89-
path: test-data.xml
90-
if: failure()
91-
92-
- name: Print skipped tests
93-
run: python ci/print_skipped.py
94-
95-
Linux_py37_cov:
96-
runs-on: ubuntu-latest
97-
defaults:
98-
run:
99-
shell: bash -l {0}
100-
101-
env:
102-
ENV_FILE: ci/deps/actions-37-cov.yaml
103-
PANDAS_TESTING_MODE: deprecate
104-
COVERAGE: true
105-
106-
services:
107-
mysql:
108-
image: mysql
109-
env:
110-
MYSQL_ALLOW_EMPTY_PASSWORD: yes
111-
MYSQL_DATABASE: pandas
112-
options: >-
113-
--health-cmd "mysqladmin ping"
114-
--health-interval 10s
115-
--health-timeout 5s
116-
--health-retries 5
117-
ports:
118-
- 3306:3306
119-
120-
postgres:
121-
image: postgres
122-
env:
123-
POSTGRES_USER: postgres
124-
POSTGRES_PASSWORD: postgres
125-
POSTGRES_DB: pandas
126-
options: >-
127-
--health-cmd pg_isready
128-
--health-interval 10s
129-
--health-timeout 5s
130-
--health-retries 5
131-
ports:
132-
- 5432:5432
133-
134-
steps:
135-
- name: Checkout
136-
uses: actions/checkout@v1
137-
138-
- name: Cache conda
139-
uses: actions/cache@v1
140-
env:
141-
CACHE_NUMBER: 0
142-
with:
143-
path: ~/conda_pkgs_dir
144-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
145-
hashFiles('${{ env.ENV_FILE }}') }}
146-
147-
- uses: conda-incubator/setup-miniconda@v2
148-
with:
149-
activate-environment: pandas-dev
150-
channel-priority: strict
151-
environment-file: ${{ env.ENV_FILE }}
152-
use-only-tar-bz2: true
153-
154-
- name: Build Pandas
155-
uses: ./.github/actions/build_pandas
156-
157-
- name: Test
158-
run: ci/run_tests.sh
81+
run: pytest -m "${{ env.PATTERN }}" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml -s --cov=pandas --cov-report=xml pandas/tests/io
15982
if: always()
16083

16184
- name: Build Version
@@ -174,7 +97,6 @@ jobs:
17497
- name: Upload coverage to Codecov
17598
uses: codecov/codecov-action@v1
17699
with:
177-
files: /tmp/test_coverage.xml
178100
flags: unittests
179101
name: codecov-pandas
180102
fail_ci_if_error: true

.github/workflows/posix.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Posix
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches:
8+
- master
9+
- 1.2.x
10+
11+
env:
12+
PYTEST_WORKERS: "auto"
13+
PANDAS_CI: 1
14+
15+
jobs:
16+
pytest:
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
shell: bash -l {0}
21+
strategy:
22+
matrix:
23+
settings: [
24+
[actions-37-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
25+
[actions-37.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
26+
[actions-37-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
27+
[actions-37-slow.yaml, "slow", "", "", "", "", ""],
28+
[actions-38.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
29+
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
30+
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
31+
[actions-38-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
32+
[actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""]
33+
]
34+
fail-fast: false
35+
env:
36+
COVERAGE: true
37+
ENV_FILE: ci/deps/${{ matrix.settings[0] }}
38+
PATTERN: ${{ matrix.settings[1] }}
39+
EXTRA_APT: ${{ matrix.settings[2] }}
40+
LANG: ${{ matrix.settings[3] }}
41+
LC_ALL: ${{ matrix.settings[4] }}
42+
PANDAS_TESTING_MODE: ${{ matrix.settings[5] }}
43+
TEST_ARGS: ${{ matrix.settings[6] }}
44+
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v1
48+
49+
- name: Cache conda
50+
uses: actions/cache@v1
51+
env:
52+
CACHE_NUMBER: 0
53+
with:
54+
path: ~/conda_pkgs_dir
55+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
56+
hashFiles('${{ env.ENV_FILE }}') }}
57+
58+
- name: Extra installs
59+
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 ${{ env.EXTRA_APT }}
60+
61+
- uses: conda-incubator/setup-miniconda@v2
62+
with:
63+
activate-environment: pandas-dev
64+
channel-priority: flexible
65+
environment-file: ${{ env.ENV_FILE }}
66+
use-only-tar-bz2: true
67+
68+
- name: Build Pandas
69+
uses: ./.github/actions/build_pandas
70+
71+
- name: Test
72+
run: ci/run_tests.sh
73+
if: always()
74+
75+
- name: Build Version
76+
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
77+
78+
- name: Publish test results
79+
uses: actions/upload-artifact@master
80+
with:
81+
name: Test results
82+
path: test-data.xml
83+
if: failure()
84+
85+
- name: Print skipped tests
86+
run: python ci/print_skipped.py
87+
88+
- name: Upload coverage to Codecov
89+
uses: codecov/codecov-action@v1
90+
with:
91+
flags: unittests
92+
name: codecov-pandas
93+
fail_ci_if_error: false

.pre-commit-config.yaml

+14-28
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,11 @@ repos:
4747
types: [text]
4848
args: [--append-config=flake8/cython-template.cfg]
4949
- repo: https://github.com/PyCQA/isort
50-
rev: 5.7.0
50+
rev: 5.8.0
5151
hooks:
5252
- id: isort
53-
- repo: https://github.com/MarcoGorelli/no-string-hints
54-
rev: v0.1.7
55-
hooks:
56-
- id: no-string-hints
5753
- repo: https://github.com/asottile/pyupgrade
58-
rev: v2.10.0
54+
rev: v2.11.0
5955
hooks:
6056
- id: pyupgrade
6157
args: [--py37-plus, --keep-runtime-typing]
@@ -111,12 +107,6 @@ repos:
111107
pandas/tests/io/excel/test_writers\.py
112108
|pandas/tests/io/pytables/common\.py
113109
|pandas/tests/io/pytables/test_store\.py$
114-
- id: no-pandas-api-types
115-
name: Check code for instances of pd.api.types
116-
entry: (pd|pandas)\.api\.types\.
117-
language: pygrep
118-
types: [python]
119-
files: ^pandas/tests/
120110
- id: non-standard-imports
121111
name: Check for non-standard imports
122112
language: pygrep
@@ -128,6 +118,11 @@ repos:
128118
129119
# Check for imports from collections.abc instead of `from collections import abc`
130120
|from\ collections\.abc\ import
121+
122+
# Numpy
123+
|from\ numpy\ import\ random
124+
|from\ numpy\.random\ import
125+
types: [python]
131126
- id: non-standard-imports-in-tests
132127
name: Check for non-standard imports in test suite
133128
language: pygrep
@@ -143,26 +138,17 @@ repos:
143138
144139
# Check for use of pandas.testing instead of tm
145140
|pd\.testing\.
141+
142+
# Check for pd.api.types instead of from pandas.api.types import ...
143+
|(pd|pandas)\.api\.types\.
146144
types: [python]
147145
files: ^pandas/tests/
148-
- id: non-standard-numpy-random-related-imports
149-
name: Check for non-standard numpy.random-related imports excluding pandas/_testing.py
150-
language: pygrep
151-
exclude: pandas/_testing.py
146+
- id: np-bool-and-np-object
147+
name: Check for use of np.bool/np.object instead of np.bool_/np.object_
152148
entry: |
153149
(?x)
154-
# Check for imports from np.random.<method> instead of `from numpy import random` or `from numpy.random import <method>`
155-
from\ numpy\ import\ random
156-
|from\ numpy.random\ import
157-
types: [python]
158-
- id: np-bool
159-
name: Check for use of np.bool instead of np.bool_
160-
entry: np\.bool[^_8]
161-
language: pygrep
162-
types_or: [python, cython, rst]
163-
- id: np-object
164-
name: Check for use of np.object instead of np.object_
165-
entry: np\.object[^_8]
150+
np\.bool[^_8]
151+
|np\.object[^_8]
166152
language: pygrep
167153
types_or: [python, cython, rst]
168154
- id: pip-to-conda

0 commit comments

Comments
 (0)