Skip to content

Commit f7e7988

Browse files
authored
Merge branch 'master' into Development
2 parents c130470 + 3e1cfc5 commit f7e7988

File tree

793 files changed

+28959
-18462
lines changed

Some content is hidden

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

793 files changed

+28959
-18462
lines changed

.circleci/config.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2.1
2+
3+
jobs:
4+
test-arm:
5+
machine:
6+
image: ubuntu-2004:202101-01
7+
resource_class: arm.medium
8+
environment:
9+
ENV_FILE: ci/deps/circle-38-arm64.yaml
10+
PYTEST_WORKERS: auto
11+
PATTERN: "not slow and not network and not clipboard and not arm_slow"
12+
PYTEST_TARGET: "pandas"
13+
steps:
14+
- checkout
15+
- run: ci/setup_env.sh
16+
- run: PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH ci/run_tests.sh
17+
18+
workflows:
19+
test:
20+
jobs:
21+
- test-arm

.github/actions/build_pandas/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ runs:
1313
- name: Build Pandas
1414
run: |
1515
python setup.py build_ext -j 2
16-
python -m pip install -e . --no-build-isolation --no-use-pep517
16+
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
1717
shell: bash -l {0}

.github/workflows/ci.yml

+29-5
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
@@ -45,6 +46,15 @@ jobs:
4546
environment-file: ${{ env.ENV_FILE }}
4647
use-only-tar-bz2: true
4748

49+
- name: Install node.js (for pyright)
50+
uses: actions/setup-node@v2
51+
with:
52+
node-version: "16"
53+
54+
- name: Install pyright
55+
# note: keep version in sync with .pre-commit-config.yaml
56+
run: npm install -g [email protected]
57+
4858
- name: Build Pandas
4959
uses: ./.github/actions/build_pandas
5060

@@ -93,7 +103,8 @@ jobs:
93103
runs-on: ubuntu-latest
94104

95105
concurrency:
96-
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
97108
cancel-in-progress: true
98109

99110
steps:
@@ -127,8 +138,11 @@ jobs:
127138
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
128139
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
129140

141+
- name: Copy cheatsheets into site directory
142+
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
143+
130144
- name: Upload web
131-
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
145+
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
132146
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
133147

134148
- name: Upload dev docs
@@ -137,6 +151,7 @@ jobs:
137151

138152
- name: Move docs into site directory
139153
run: mv doc/build/html web/build/docs
154+
140155
- name: Save website as an artifact
141156
uses: actions/upload-artifact@v2
142157
with:
@@ -147,11 +162,20 @@ jobs:
147162
data_manager:
148163
name: Test experimental data manager
149164
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
150173
strategy:
151174
matrix:
152175
pattern: ["not slow and not network and not clipboard", "slow"]
153176
concurrency:
154-
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 }}
155179
cancel-in-progress: true
156180

157181
steps:

.github/workflows/database.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- 1.3.x
78
pull_request:
89
branches:
910
- master
@@ -30,8 +31,9 @@ jobs:
3031
fail-fast: false
3132

3233
concurrency:
33-
group: ${{ github.ref }}-${{ matrix.ENV_FILE }}
34-
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
3537

3638
services:
3739
mysql:
@@ -61,6 +63,14 @@ jobs:
6163
ports:
6264
- 5432:5432
6365

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+
6474
steps:
6575
- name: Checkout
6676
uses: actions/checkout@v2
@@ -79,7 +89,7 @@ jobs:
7989
- uses: conda-incubator/setup-miniconda@v2
8090
with:
8191
activate-environment: pandas-dev
82-
channel-priority: flexible
92+
channel-priority: strict
8393
environment-file: ${{ matrix.ENV_FILE }}
8494
use-only-tar-bz2: true
8595

.github/workflows/posix.yml

+13-4
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

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ 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
20+
with:
21+
python-version: '3.9.7'
1922
- uses: pre-commit/[email protected]

.github/workflows/python-dev.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,23 @@ env:
1717
PANDAS_CI: 1
1818
PATTERN: "not slow and not network and not clipboard"
1919
COVERAGE: true
20-
PYTEST_TARGET: pandas
20+
PYTEST_TARGET: pandas
2121

2222
jobs:
2323
build:
24-
runs-on: ubuntu-latest
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
os: [ubuntu-latest, macOS-latest, windows-latest]
29+
2530
name: actions-310-dev
26-
timeout-minutes: 60
31+
timeout-minutes: 80
2732

2833
concurrency:
29-
group: ${{ github.ref }}-dev
30-
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
3137

3238
steps:
3339
- uses: actions/checkout@v2
@@ -40,12 +46,12 @@ jobs:
4046
python-version: '3.10-dev'
4147

4248
- name: Install dependencies
49+
shell: bash
4350
run: |
4451
python -m pip install --upgrade pip setuptools wheel
4552
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
46-
pip install git+https://github.com/pytest-dev/pytest.git
4753
pip install git+https://github.com/nedbat/coveragepy.git
48-
pip install cython python-dateutil pytz hypothesis pytest-xdist pytest-cov
54+
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov
4955
pip list
5056
5157
- name: Build Pandas
@@ -58,10 +64,9 @@ jobs:
5864
python -c "import pandas; pandas.show_versions();"
5965
6066
- name: Test with pytest
67+
shell: bash
6168
run: |
6269
ci/run_tests.sh
63-
# GH 41935
64-
continue-on-error: true
6570
6671
- name: Publish test results
6772
uses: actions/upload-artifact@master

.github/workflows/sdist.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.8", "3.9"]
26+
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
@@ -53,13 +54,25 @@ jobs:
5354
- uses: conda-incubator/setup-miniconda@v2
5455
with:
5556
activate-environment: pandas-sdist
56-
python-version: ${{ matrix.python-version }}
57+
channels: conda-forge
58+
python-version: '${{ matrix.python-version }}'
5759

5860
- name: Install pandas from sdist
5961
run: |
60-
conda list
62+
pip list
6163
python -m pip install dist/*.gz
6264
65+
- name: Force oldest supported NumPy
66+
run: |
67+
case "${{matrix.python-version}}" in
68+
3.8)
69+
pip install numpy==1.18.5 ;;
70+
3.9)
71+
pip install numpy==1.19.3 ;;
72+
3.10)
73+
pip install numpy==1.21.2 ;;
74+
esac
75+
6376
- name: Import pandas
6477
run: |
6578
cd ..

.pre-commit-config.yaml

+27-13
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.7b0
12+
rev: 21.11b1
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/codespell-project/codespell
@@ -39,10 +39,11 @@ repos:
3939
rev: 3.9.2
4040
hooks:
4141
- id: flake8
42-
additional_dependencies:
43-
- flake8-comprehensions==3.1.0
44-
- flake8-bugbear==21.3.2
45-
- pandas-dev-flaker==0.2.0
42+
additional_dependencies: &flake8_dependencies
43+
- flake8==3.9.2
44+
- flake8-comprehensions==3.1.0
45+
- flake8-bugbear==21.3.2
46+
- pandas-dev-flaker==0.2.0
4647
- id: flake8
4748
alias: flake8-cython
4849
name: flake8 (cython)
@@ -54,11 +55,11 @@ repos:
5455
types: [text]
5556
args: [--append-config=flake8/cython-template.cfg]
5657
- repo: https://github.com/PyCQA/isort
57-
rev: 5.9.3
58+
rev: 5.10.1
5859
hooks:
5960
- id: isort
6061
- repo: https://github.com/asottile/pyupgrade
61-
rev: v2.23.3
62+
rev: v2.29.1
6263
hooks:
6364
- id: pyupgrade
6465
args: [--py38-plus]
@@ -73,14 +74,21 @@ repos:
7374
types: [text] # overwrite types: [rst]
7475
types_or: [python, rst]
7576
- repo: https://github.com/asottile/yesqa
76-
rev: v1.2.3
77+
rev: v1.3.0
7778
hooks:
7879
- id: yesqa
79-
additional_dependencies:
80-
- flake8==3.9.2
81-
- flake8-comprehensions==3.1.0
82-
- flake8-bugbear==21.3.2
83-
- pandas-dev-flaker==0.2.0
80+
additional_dependencies: *flake8_dependencies
81+
- repo: local
82+
hooks:
83+
- id: pyright
84+
name: pyright
85+
entry: pyright
86+
language: node
87+
pass_filenames: false
88+
types: [python]
89+
stages: [manual]
90+
# note: keep version in sync with .github/workflows/ci.yml
91+
additional_dependencies: ['[email protected]']
8492
- repo: local
8593
hooks:
8694
- id: flake8-rst
@@ -124,6 +132,12 @@ repos:
124132
entry: 'np\.random\.seed'
125133
files: ^asv_bench/benchmarks
126134
exclude: ^asv_bench/benchmarks/pandas_vb_common\.py
135+
- id: np-testing-array-equal
136+
name: Check for usage of numpy testing or array_equal
137+
language: pygrep
138+
entry: '(numpy|np)(\.testing|\.array_equal)'
139+
files: ^pandas/tests/
140+
types: [python]
127141
- id: invalid-ea-testing
128142
name: Check for invalid EA testing
129143
language: pygrep

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ global-exclude *.xlsb
3333
global-exclude *.xlsm
3434
global-exclude *.xlsx
3535
global-exclude *.xpt
36+
global-exclude *.cpt
3637
global-exclude *.xz
3738
global-exclude *.zip
3839
global-exclude *~

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[![License](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/master/LICENSE)
1313
[![Azure Build Status](https://dev.azure.com/pandas-dev/pandas/_apis/build/status/pandas-dev.pandas?branch=master)](https://dev.azure.com/pandas-dev/pandas/_build/latest?definitionId=1&branch=master)
1414
[![Coverage](https://codecov.io/github/pandas-dev/pandas/coverage.svg?branch=master)](https://codecov.io/gh/pandas-dev/pandas)
15-
[![Downloads](https://anaconda.org/conda-forge/pandas/badges/downloads.svg)](https://pandas.pydata.org)
15+
[![Downloads](https://static.pepy.tech/personalized-badge/pandas?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/pandas)
1616
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pydata/pandas)
1717
[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)
1818
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

0 commit comments

Comments
 (0)