Skip to content

Commit 2fab43a

Browse files
author
MarcoGorelli
committed
Merge remote-tracking branch 'upstream/main' into pandas-devgh-49298
2 parents d915cf7 + 0168e27 commit 2fab43a

File tree

654 files changed

+10765
-16637
lines changed

Some content is hidden

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

654 files changed

+10765
-16637
lines changed

.github/workflows/32-bit-linux.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
paths-ignore:
1513
- "doc/**"
1614

.github/workflows/code-checks.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412

1513
env:
1614
ENV_FILE: environment.yml
@@ -39,8 +37,8 @@ jobs:
3937
- name: Run pre-commit
4038
uses: pre-commit/action@v2.0.3
4139

42-
typing_and_docstring_validation:
43-
name: Docstring and typing validation
40+
docstring_typing_pylint:
41+
name: Docstring validation, typing, and pylint
4442
runs-on: ubuntu-latest
4543
defaults:
4644
run:
@@ -88,7 +86,7 @@ jobs:
8886
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
8987
if: ${{ steps.build.outcome == 'success' && always() }}
9088

91-
- name: Typing
89+
- name: Typing + pylint
9290
uses: pre-commit/action@v2.0.3
9391
with:
9492
extra_args: --hook-stage manual --all-files

.github/workflows/docbuild-and-upload.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
tags:
109
- '*'
1110
pull_request:
1211
branches:
1312
- main
1413
- 1.5.x
15-
- 1.4.x
1614

1715
env:
1816
ENV_FILE: environment.yml
@@ -66,22 +64,22 @@ jobs:
6664
mkdir -m 700 -p ~/.ssh
6765
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
6866
chmod 600 ~/.ssh/id_rsa
69-
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
67+
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFjYkJBk7sos+r7yATODogQc3jUdW1aascGpyOD4bohj8dWjzwLJv/OJ/fyOQ5lmj81WKDk67tGtqNJYGL9acII=" > ~/.ssh/known_hosts
7068
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
7169

7270
- name: Copy cheatsheets into site directory
7371
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
7472

7573
- name: Upload web
76-
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
74+
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ web@${{ secrets.server_ip }}:/var/www/html
7775
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7876

7977
- name: Upload dev docs
80-
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
78+
run: rsync -az --delete doc/build/html/ web@${{ secrets.server_ip }}:/var/www/html/pandas-docs/dev
8179
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
8280

8381
- name: Upload prod docs
84-
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/version/${GITHUB_REF_NAME:1}
82+
run: rsync -az --delete doc/build/html/ web@${{ secrets.server_ip }}:/var/www/html/pandas-docs/version/${GITHUB_REF_NAME:1}
8583
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
8684

8785
- name: Move docs into site directory

.github/workflows/macos-windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
paths-ignore:
1513
- "doc/**"
1614

.github/workflows/package-checks.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Package Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 1.5.x
8+
pull_request:
9+
branches:
10+
- main
11+
- 1.5.x
12+
types: [ labeled, opened, synchronize, reopened ]
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
pip:
19+
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
extra: ["test", "performance", "timezone", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "all"]
24+
fail-fast: false
25+
name: Install Extras - ${{ matrix.extra }}
26+
concurrency:
27+
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
28+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pip-extras-${{ matrix.extra }}
29+
cancel-in-progress: true
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Setup Python
38+
id: setup_python
39+
uses: actions/setup-python@v3
40+
with:
41+
python-version: '3.8'
42+
43+
- name: Install required dependencies
44+
run: |
45+
python -m pip install --upgrade pip setuptools wheel python-dateutil pytz numpy cython
46+
shell: bash -el {0}
47+
48+
- name: Pip install with extra
49+
run: |
50+
python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation
51+
shell: bash -el {0}

.github/workflows/python-dev.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ on:
2525
branches:
2626
- main
2727
- 1.5.x
28-
- 1.4.x
2928
pull_request:
3029
branches:
3130
- main
3231
- 1.5.x
33-
- 1.4.x
3432
paths-ignore:
3533
- "doc/**"
3634

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: "Run analysis"
32-
uses: ossf/scorecard-action@v2.0.3
32+
uses: ossf/scorecard-action@v2.0.6
3333
with:
3434
results_file: results.sarif
3535
results_format: sarif

.github/workflows/sdist.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
types: [labeled, opened, synchronize, reopened]
1513
paths-ignore:
1614
- "doc/**"
@@ -30,7 +28,7 @@ jobs:
3028
strategy:
3129
fail-fast: false
3230
matrix:
33-
python-version: ["3.8", "3.9", "3.10"]
31+
python-version: ["3.8", "3.9", "3.10", "3.11"]
3432
concurrency:
3533
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
3634
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist
@@ -42,7 +40,7 @@ jobs:
4240
fetch-depth: 0
4341

4442
- name: Set up Python
45-
uses: actions/setup-python@v3
43+
uses: actions/setup-python@v4
4644
with:
4745
python-version: ${{ matrix.python-version }}
4846

@@ -86,6 +84,8 @@ jobs:
8684
pip install numpy==1.20.3 ;;
8785
3.10)
8886
pip install numpy==1.21.2 ;;
87+
3.11)
88+
pip install numpy==1.23.2 ;;
8989
esac
9090
9191
- name: Import pandas

.github/workflows/ubuntu.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
paths-ignore:
1513
- "doc/**"
1614

.github/workflows/wheels.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- [windows-2019, win_amd64]
5353
- [windows-2019, win32]
5454
# TODO: support PyPy?
55-
python: [["cp38", "3.8"], ["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11-dev"]]# "pp38", "pp39"]
55+
python: [["cp38", "3.8"], ["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]# "pp38", "pp39"]
5656
env:
5757
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
5858
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -72,14 +72,22 @@ jobs:
7272
env:
7373
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
7474

75-
# Used to test the built wheels
76-
- uses: actions/setup-python@v3
75+
# Used to test(Windows-only) and push the built wheels
76+
# You might need to use setup-python separately
77+
# if the new Python-dev version
78+
# is unavailable on conda-forge.
79+
- uses: conda-incubator/setup-miniconda@v2
7780
with:
81+
auto-update-conda: true
7882
python-version: ${{ matrix.python[1] }}
83+
activate-environment: test
84+
channels: conda-forge, anaconda
85+
channel-priority: true
86+
mamba-version: "*"
7987

8088
- name: Test wheels (Windows 64-bit only)
8189
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
82-
shell: cmd
90+
shell: cmd /C CALL {0}
8391
run: |
8492
python ci/test_wheels.py wheelhouse
8593
@@ -88,26 +96,15 @@ jobs:
8896
name: ${{ matrix.python[0] }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
8997
path: ./wheelhouse/*.whl
9098

91-
# Used to push the built wheels
92-
# TODO: once Python 3.11 is available on conda, de-dup with
93-
# setup python above
94-
- uses: conda-incubator/setup-miniconda@v2
95-
with:
96-
auto-update-conda: true
97-
# Really doesn't matter what version we upload with
98-
# just the version we test with
99-
python-version: '3.8'
100-
channels: conda-forge
101-
channel-priority: true
102-
mamba-version: "*"
10399

104100
- name: Install anaconda client
105101
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
102+
shell: bash -el {0}
106103
run: conda install -q -y anaconda-client
107104

108105

109106
- name: Upload wheels
110-
if: success()
107+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
111108
shell: bash -el {0}
112109
env:
113110
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
@@ -180,11 +177,12 @@ jobs:
180177

181178
- name: Install anaconda client
182179
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
180+
shell: bash -el {0}
183181
run: |
184182
conda install -q -y anaconda-client
185183
186184
- name: Upload sdist
187-
if: success()
185+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
188186
shell: bash -el {0}
189187
env:
190188
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}

.pre-commit-config.yaml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ repos:
1818
pass_filenames: true
1919
require_serial: false
2020
- repo: https://github.com/python/black
21-
rev: 22.8.0
21+
rev: 22.10.0
2222
hooks:
2323
- id: black
2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.2.1
25+
rev: v2.2.2
2626
hooks:
2727
- id: codespell
2828
types_or: [python, rst, markdown]
2929
- repo: https://github.com/MarcoGorelli/cython-lint
30-
rev: v0.1.8
30+
rev: v0.2.1
3131
hooks:
3232
- id: cython-lint
3333
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -60,15 +60,35 @@ repos:
6060
- flake8-bugbear==22.7.1
6161
- pandas-dev-flaker==0.5.0
6262
- repo: https://github.com/pycqa/pylint
63-
rev: v2.15.3
63+
rev: v2.15.5
6464
hooks:
6565
- id: pylint
66+
stages: [manual]
67+
- repo: https://github.com/pycqa/pylint
68+
rev: v2.15.5
69+
hooks:
70+
- id: pylint
71+
alias: redefined-outer-name
72+
name: Redefining name from outer scope
73+
files: ^pandas/
74+
exclude: |
75+
(?x)
76+
^pandas/tests # keep excluded
77+
|/_testing/ # keep excluded
78+
|^pandas/util/_test_decorators\.py # keep excluded
79+
|^pandas/_version\.py # keep excluded
80+
|^pandas/conftest\.py # keep excluded
81+
|^pandas/core/tools/datetimes\.py
82+
|^pandas/io/formats/format\.py
83+
|^pandas/core/generic\.py
84+
args: [--disable=all, --enable=redefined-outer-name]
85+
stages: [manual]
6686
- repo: https://github.com/PyCQA/isort
6787
rev: 5.10.1
6888
hooks:
6989
- id: isort
7090
- repo: https://github.com/asottile/pyupgrade
71-
rev: v2.38.2
91+
rev: v3.2.0
7292
hooks:
7393
- id: pyupgrade
7494
args: [--py38-plus]
@@ -83,7 +103,7 @@ repos:
83103
types: [text] # overwrite types: [rst]
84104
types_or: [python, rst]
85105
- repo: https://github.com/sphinx-contrib/sphinx-lint
86-
rev: v0.6.1
106+
rev: v0.6.7
87107
hooks:
88108
- id: sphinx-lint
89109
- repo: https://github.com/asottile/yesqa
@@ -200,7 +220,7 @@ repos:
200220
entry: python scripts/sync_flake8_versions.py
201221
files: ^(\.pre-commit-config\.yaml|environment\.yml)$
202222
pass_filenames: false
203-
additional_dependencies: [pyyaml]
223+
additional_dependencies: [pyyaml, toml]
204224
- id: title-capitalization
205225
name: Validate correct capitalization among titles in documentation
206226
entry: python scripts/validate_rst_title_capitalization.py
@@ -286,5 +306,4 @@ repos:
286306
language: python
287307
additional_dependencies:
288308
- autotyping==22.9.0
289-
- black==22.6.0
290309
- libcst==0.4.7

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,6 @@ You can also triage issues which may include reproducing bug reports, or asking
166166

167167
Or maybe through using pandas you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’...you can do something about it!
168168

169-
Feel free to ask questions on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas).
169+
Feel free to ask questions on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Slack](https://pandas.pydata.org/docs/dev/development/community.html?highlight=slack#community-slack).
170170

171171
As contributors and maintainers to this project, you are expected to abide by pandas' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/.github/blob/master/CODE_OF_CONDUCT.md)

0 commit comments

Comments
 (0)