Skip to content

Commit dcfee47

Browse files
authored
Merge branch 'main' into add-pyarrow-conversion-tests
2 parents 8a1a5be + 9db9baa commit dcfee47

File tree

561 files changed

+11164
-6744
lines changed

Some content is hidden

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

561 files changed

+11164
-6744
lines changed

.circleci/config.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
- run:
4848
name: Build aarch64 wheels
4949
command: |
50-
pip3 install cibuildwheel==2.12.1
51-
cibuildwheel --output-dir wheelhouse
50+
pip3 install cibuildwheel==2.14.1
51+
cibuildwheel --prerelease-pythons --output-dir wheelhouse
5252
environment:
5353
CIBW_BUILD: << parameters.cibw-build >>
5454

@@ -91,4 +91,5 @@ workflows:
9191
only: /^v.*/
9292
matrix:
9393
parameters:
94-
cibw-build: ["cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]
94+
# TODO: Enable Python 3.12 wheels when numpy releases a version that supports Python 3.12
95+
cibw-build: ["cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]#, "cp312-manylinux_aarch64"]

.gitattributes

+68
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,71 @@
1414
*.xls binary
1515
*.xlsx binary
1616
pandas/_version.py export-subst
17+
18+
19+
*.bz2 export-ignore
20+
*.csv export-ignore
21+
*.data export-ignore
22+
*.dta export-ignore
23+
*.feather export-ignore
24+
*.tar export-ignore
25+
*.gz export-ignore
26+
*.h5 export-ignore
27+
*.html export-ignore
28+
*.json export-ignore
29+
*.jsonl export-ignore
30+
*.kml export-ignore
31+
*.msgpack export-ignore
32+
*.pdf export-ignore
33+
*.parquet export-ignore
34+
*.pickle export-ignore
35+
*.pkl export-ignore
36+
*.png export-ignore
37+
*.pptx export-ignore
38+
*.ods export-ignore
39+
*.odt export-ignore
40+
*.orc export-ignore
41+
*.sas7bdat export-ignore
42+
*.sav export-ignore
43+
*.so export-ignore
44+
*.txt export-ignore
45+
*.xls export-ignore
46+
*.xlsb export-ignore
47+
*.xlsm export-ignore
48+
*.xlsx export-ignore
49+
*.xpt export-ignore
50+
*.cpt export-ignore
51+
*.xml export-ignore
52+
*.xsl export-ignore
53+
*.xz export-ignore
54+
*.zip export-ignore
55+
*.zst export-ignore
56+
*~ export-ignore
57+
.DS_Store export-ignore
58+
.git* export-ignore
59+
60+
*.py[ocd] export-ignore
61+
*.pxi export-ignore
62+
63+
# Ignoring stuff from the top level
64+
.circleci export-ignore
65+
.github export-ignore
66+
asv_bench export-ignore
67+
ci export-ignore
68+
doc export-ignore
69+
gitpod export-ignore
70+
MANIFEST.in export-ignore
71+
scripts export-ignore
72+
typings export-ignore
73+
web export-ignore
74+
CITATION.cff export-ignore
75+
codecov.yml export-ignore
76+
Dockerfile export-ignore
77+
environment.yml export-ignore
78+
setup.py export-ignore
79+
80+
81+
# GH 39321
82+
# csv_dir_path fixture checks the existence of the directory
83+
# exclude the whole directory to avoid running related tests in sdist
84+
pandas/tests/io/parser/data export-ignore

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ web/ @datapythonista
99

1010
# docs
1111
doc/cheatsheet @Dr-Irv
12+
doc/source/development @noatamir
1213

1314
# pandas
1415
pandas/_libs/ @WillAyd

.github/workflows/autoupdate-pre-commit-config.yml

-39
This file was deleted.

.github/workflows/code-checks.yml

+1-21
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,8 @@ env:
1717
permissions:
1818
contents: read
1919

20+
# pre-commit run by https://pre-commit.ci/
2021
jobs:
21-
pre_commit:
22-
name: pre-commit
23-
runs-on: ubuntu-22.04
24-
concurrency:
25-
# https://github.community/t/concurrecy-not-work-for-push/183068/7
26-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pre-commit
27-
cancel-in-progress: true
28-
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v3
31-
32-
- name: Install Python
33-
uses: actions/setup-python@v4
34-
with:
35-
python-version: '3.9'
36-
37-
- name: Run pre-commit
38-
uses: pre-commit/[email protected]
39-
with:
40-
extra_args: --verbose --all-files
41-
4222
docstring_typing_manual_hooks:
4323
name: Docstring validation, typing, and other manual pre-commit hooks
4424
runs-on: ubuntu-22.04

.github/workflows/unit-tests.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103

104104
services:
105105
mysql:
106-
image: mysql
106+
image: mysql:8.0.33
107107
env:
108108
MYSQL_ALLOW_EMPTY_PASSWORD: yes
109109
MYSQL_DATABASE: pandas
@@ -116,8 +116,9 @@ jobs:
116116
- 3306:3306
117117

118118
postgres:
119-
image: postgres
119+
image: postgres:13
120120
env:
121+
PGUSER: postgres
121122
POSTGRES_USER: postgres
122123
POSTGRES_PASSWORD: postgres
123124
POSTGRES_DB: pandas
@@ -130,7 +131,7 @@ jobs:
130131
- 5432:5432
131132

132133
moto:
133-
image: motoserver/moto:4.1.12
134+
image: motoserver/moto:4.1.13
134135
env:
135136
AWS_ACCESS_KEY_ID: foobar_key
136137
AWS_SECRET_ACCESS_KEY: foobar_secret
@@ -237,7 +238,7 @@ jobs:
237238
run: |
238239
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
239240
. ~/virtualenvs/pandas-dev/bin/activate
240-
python -m pip install -U pip wheel setuptools meson[ninja]==1.0.1 meson-python==0.13.1
241+
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.0.1 meson-python==0.13.1
241242
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
242243
python -m pip install --no-cache-dir --no-build-isolation -e .
243244
python -m pip list --no-cache-dir
@@ -275,7 +276,7 @@ jobs:
275276
run: |
276277
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
277278
. ~/virtualenvs/pandas-dev/bin/activate
278-
python -m pip install -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.0.1
279+
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.0.1
279280
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
280281
python -m pip install --no-cache-dir --no-build-isolation -e .
281282
python -m pip list --no-cache-dir
@@ -310,12 +311,16 @@ jobs:
310311
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
311312
# to the corresponding posix/windows-macos/sdist etc. workflows.
312313
# Feel free to modify this comment as necessary.
313-
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
314+
#if: false # Uncomment this to freeze the workflow, comment it to unfreeze
314315
runs-on: ${{ matrix.os }}
315316
strategy:
316317
fail-fast: false
317318
matrix:
318-
os: [ubuntu-22.04, macOS-latest, windows-latest]
319+
# TODO: Disable macOS for now, Github Actions bug where python is not
320+
# symlinked correctly to 3.12
321+
# xref https://github.com/actions/setup-python/issues/701
322+
#os: [ubuntu-22.04, macOS-latest, windows-latest]
323+
os: [ubuntu-22.04, windows-latest]
319324

320325
timeout-minutes: 180
321326

@@ -339,21 +344,21 @@ jobs:
339344
- name: Set up Python Dev Version
340345
uses: actions/setup-python@v4
341346
with:
342-
python-version: '3.11-dev'
347+
python-version: '3.12-dev'
343348

344349
- name: Install dependencies
345350
run: |
346351
python --version
347-
python -m pip install --upgrade pip setuptools wheel
352+
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.0.1 meson-python==0.13.1
348353
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
349354
python -m pip install git+https://github.com/nedbat/coveragepy.git
350355
python -m pip install versioneer[toml]
351-
python -m pip install python-dateutil pytz cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov pytest-asyncio>=0.17
356+
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov pytest-asyncio>=0.17
352357
python -m pip list
353358
354359
- name: Build Pandas
355360
run: |
356-
python -m pip install -e . --no-build-isolation --no-index
361+
python -m pip install -ve . --no-build-isolation --no-index
357362
358363
- name: Build Version
359364
run: |

.github/workflows/wheels.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ jobs:
9393
- [macos-12, macosx_*]
9494
- [windows-2022, win_amd64]
9595
# TODO: support PyPy?
96-
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]
96+
# TODO: Enable Python 3.12 wheels when numpy releases a version that supports Python 3.12
97+
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]#, ["cp312", "3.12"]]
9798
env:
9899
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
99100
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -103,6 +104,8 @@ jobs:
103104
with:
104105
fetch-depth: 0
105106

107+
# We need to build wheels from the sdist since the sdist
108+
# removes unnecessary files from the release
106109
- name: Download sdist
107110
uses: actions/download-artifact@v3
108111
with:
@@ -114,9 +117,10 @@ jobs:
114117
# TODO: Build wheels from sdist again
115118
# There's some sort of weird race condition?
116119
# within Github that makes the sdist be missing files
117-
#with:
118-
# package-dir: ./dist/${{ needs.build_sdist.outputs.sdist_file }}
120+
with:
121+
package-dir: ./dist/${{ needs.build_sdist.outputs.sdist_file }}
119122
env:
123+
CIBW_PRERELEASE_PYTHONS: True
120124
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
121125

122126
- name: Set up Python
@@ -142,7 +146,7 @@ jobs:
142146
$TST_CMD = @"
143147
python -m pip install pytz six numpy python-dateutil tzdata>=2022.1 hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17;
144148
python -m pip install --find-links=pandas\wheelhouse --no-index pandas;
145-
python -c `'import pandas as pd; pd.test()`';
149+
python -c `'import pandas as pd; pd.test(extra_args=[\"`\"--no-strict-data-files`\"\", \"`\"-m not clipboard and not single_cpu and not slow and not network and not db`\"\"])`';
146150
"@
147151
docker pull python:${{ matrix.python[1] }}-windowsservercore
148152
docker run --env PANDAS_CI='1' -v ${PWD}:C:\pandas python:${{ matrix.python[1] }}-windowsservercore powershell -Command $TST_CMD

.libcst.codemod.yaml

-18
This file was deleted.

.pre-commit-config.yaml

+13-22
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ default_stages: [
1414
]
1515
ci:
1616
autofix_prs: false
17+
autoupdate_schedule: monthly
18+
# manual stage hooks
19+
skip: [pylint, pyright, mypy]
1720
repos:
1821
- repo: https://github.com/hauntsaninja/black-pre-commit-mirror
1922
# black compiled with mypyc
@@ -25,6 +28,11 @@ repos:
2528
hooks:
2629
- id: ruff
2730
args: [--exit-non-zero-on-fix]
31+
- id: ruff
32+
# TODO: remove autofixe-only rules when they are checked by ruff
33+
name: ruff-selected-autofixes
34+
alias: ruff-selected-autofixes
35+
args: [--select, "ANN001,ANN204", --fix-only, --exit-non-zero-on-fix]
2836
- repo: https://github.com/jendrikseipp/vulture
2937
rev: 'v2.7'
3038
hooks:
@@ -131,7 +139,7 @@ repos:
131139
stages: [manual]
132140
additional_dependencies: &pyright_dependencies
133141
134-
- id: pyright_reportGeneralTypeIssues
142+
- id: pyright
135143
# note: assumes python env is setup and activated
136144
name: pyright reportGeneralTypeIssues
137145
entry: pyright --skipunannotated -p pyright_reportGeneralTypeIssues.json --level warning
@@ -148,7 +156,7 @@ repos:
148156
pass_filenames: false
149157
types: [python]
150158
stages: [manual]
151-
- id: stubtest
159+
- id: mypy
152160
# note: assumes python env is setup and activated
153161
# note: requires pandas dev to be installed
154162
name: mypy (stubtest)
@@ -243,17 +251,11 @@ repos:
243251
244252
# os.remove
245253
|os\.remove
254+
255+
# Unseeded numpy default_rng
256+
|default_rng\(\)
246257
files: ^pandas/tests/
247258
types_or: [python, cython, rst]
248-
- id: unwanted-patterns-in-ea-tests
249-
name: Unwanted patterns in EA tests
250-
language: pygrep
251-
entry: |
252-
(?x)
253-
tm.assert_(series|frame)_equal
254-
files: ^pandas/tests/extension/base/
255-
exclude: ^pandas/tests/extension/base/base\.py$
256-
types_or: [python, cython, rst]
257259
- id: unwanted-patterns-in-cython
258260
name: Unwanted patterns in Cython code
259261
language: pygrep
@@ -371,17 +373,6 @@ repos:
371373
/(__init__\.py)|(api\.py)|(_version\.py)|(testing\.py)|(conftest\.py)$
372374
|/tests/
373375
|/_testing/
374-
- id: autotyping
375-
name: autotyping
376-
entry: python -m scripts.run_autotyping
377-
types_or: [python, pyi]
378-
files: ^pandas
379-
exclude: ^(pandas/tests|pandas/_version.py|pandas/io/clipboard)
380-
language: python
381-
stages: [manual]
382-
additional_dependencies:
383-
- autotyping==23.3.0
384-
- libcst==0.4.9
385376
- id: check-test-naming
386377
name: check that test names start with 'test'
387378
entry: python -m scripts.check_test_naming

0 commit comments

Comments
 (0)