Skip to content

Commit 84261bc

Browse files
committed
merge main
2 parents 2c4440c + dc5e00d commit 84261bc

File tree

392 files changed

+6964
-8298
lines changed

Some content is hidden

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

392 files changed

+6964
-8298
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
3939
. ~/virtualenvs/pandas-dev/bin/activate && \
4040
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
41-
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
41+
python -m pip install versioneer[toml] && \
42+
python -m pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
4243
python setup.py build_ext -q -j1 && \
4344
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
4445
python -m pip list && \

.github/workflows/code-checks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
- name: Run pre-commit
3838
uses: pre-commit/[email protected]
3939

40-
typing_and_docstring_validation:
41-
name: Docstring and typing validation
40+
docstring_typing_pylint:
41+
name: Docstring validation, typing, and pylint
4242
runs-on: ubuntu-latest
4343
defaults:
4444
run:
@@ -79,6 +79,10 @@ jobs:
7979
run: ci/code_checks.sh docstrings
8080
if: ${{ steps.build.outcome == 'success' && always() }}
8181

82+
- name: Run check of documentation notebooks
83+
run: ci/code_checks.sh notebooks
84+
if: ${{ steps.build.outcome == 'success' && always() }}
85+
8286
- name: Use existing environment for type checking
8387
run: |
8488
echo $PATH >> $GITHUB_PATH

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,27 @@ jobs:
5454
- name: Build documentation zip
5555
run: doc/make.py zip_html
5656

57-
- name: Build the interactive terminal
58-
run: |
59-
cd web/interactive_terminal
60-
jupyter lite build
61-
6257
- name: Install ssh key
6358
run: |
6459
mkdir -m 700 -p ~/.ssh
6560
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
6661
chmod 600 ~/.ssh/id_rsa
67-
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
62+
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFjYkJBk7sos+r7yATODogQc3jUdW1aascGpyOD4bohj8dWjzwLJv/OJ/fyOQ5lmj81WKDk67tGtqNJYGL9acII=" > ~/.ssh/known_hosts
6863
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
6964

7065
- name: Copy cheatsheets into site directory
7166
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
7267

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

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

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

8580
- name: Move docs into site directory

.github/workflows/package-checks.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.community/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+
python -m pip install versioneer[toml]
47+
shell: bash -el {0}
48+
49+
- name: Pip install with extra
50+
run: |
51+
python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation
52+
shell: bash -el {0}

.github/workflows/python-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ jobs:
7575
python -m pip install --upgrade pip setuptools wheel
7676
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
7777
python -m pip install git+https://github.com/nedbat/coveragepy.git
78+
python -m pip install versioneer[toml]
7879
python -m pip install python-dateutil pytz cython hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
7980
python -m pip list
8081

.github/workflows/sdist.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip setuptools wheel
50+
python -m pip install versioneer[toml]
5051
5152
# GH 39416
5253
pip install numpy

.pre-commit-config.yaml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ repos:
2626
hooks:
2727
- id: codespell
2828
types_or: [python, rst, markdown]
29+
additional_dependencies: [tomli]
2930
- repo: https://github.com/MarcoGorelli/cython-lint
30-
rev: v0.2.1
31+
rev: v0.9.1
3132
hooks:
3233
- id: cython-lint
3334
- repo: https://github.com/pre-commit/pre-commit-hooks
34-
rev: v4.3.0
35+
rev: v4.4.0
3536
hooks:
3637
- id: debug-statements
3738
- id: end-of-file-fixer
@@ -50,26 +51,45 @@ repos:
5051
exclude: ^pandas/_libs/src/(klib|headers)/
5152
args: [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
5253
- repo: https://github.com/PyCQA/flake8
53-
rev: 5.0.4
54+
rev: 6.0.0
5455
hooks:
5556
- id: flake8
5657
# Need to patch os.remove rule in pandas-dev-flaker
5758
exclude: ^ci/fix_wheels.py
5859
additional_dependencies: &flake8_dependencies
59-
- flake8==5.0.4
60+
- flake8==6.0.0
6061
- flake8-bugbear==22.7.1
6162
- pandas-dev-flaker==0.5.0
6263
- repo: https://github.com/pycqa/pylint
63-
rev: v2.15.5
64+
rev: v2.15.6
6465
hooks:
6566
- id: pylint
6667
stages: [manual]
68+
- repo: https://github.com/pycqa/pylint
69+
rev: v2.15.6
70+
hooks:
71+
- id: pylint
72+
alias: redefined-outer-name
73+
name: Redefining name from outer scope
74+
files: ^pandas/
75+
exclude: |
76+
(?x)
77+
^pandas/tests # keep excluded
78+
|/_testing/ # keep excluded
79+
|^pandas/util/_test_decorators\.py # keep excluded
80+
|^pandas/_version\.py # keep excluded
81+
|^pandas/conftest\.py # keep excluded
82+
|^pandas/core/tools/datetimes\.py
83+
|^pandas/io/formats/format\.py
84+
|^pandas/core/generic\.py
85+
args: [--disable=all, --enable=redefined-outer-name]
86+
stages: [manual]
6787
- repo: https://github.com/PyCQA/isort
6888
rev: 5.10.1
6989
hooks:
7090
- id: isort
7191
- repo: https://github.com/asottile/pyupgrade
72-
rev: v3.2.0
92+
rev: v3.2.2
7393
hooks:
7494
- id: pyupgrade
7595
args: [--py38-plus]
@@ -201,7 +221,7 @@ repos:
201221
entry: python scripts/sync_flake8_versions.py
202222
files: ^(\.pre-commit-config\.yaml|environment\.yml)$
203223
pass_filenames: false
204-
additional_dependencies: [pyyaml]
224+
additional_dependencies: [pyyaml, toml]
205225
- id: title-capitalization
206226
name: Validate correct capitalization among titles in documentation
207227
entry: python scripts/validate_rst_title_capitalization.py
@@ -287,5 +307,4 @@ repos:
287307
language: python
288308
additional_dependencies:
289309
- autotyping==22.9.0
290-
- black==22.6.0
291310
- libcst==0.4.7

asv_bench/asv.conf.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"odfpy": [],
5858
"jinja2": [],
5959
},
60-
"conda_channels": ["defaults", "conda-forge"],
60+
"conda_channels": ["conda-forge"],
6161
// Combinations of libraries/python versions can be excluded/included
6262
// from the set to test. Each entry is a dictionary containing additional
6363
// key-value pairs to include/exclude.
@@ -125,6 +125,7 @@
125125
"regression_thresholds": {
126126
},
127127
"build_command":
128-
["python setup.py build -j4",
128+
["python -m pip install versioneer[toml]",
129+
"python setup.py build -j4",
129130
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"],
130131
}

asv_bench/benchmarks/frame_ctor.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,4 @@ def time_frame_from_arrays_sparse(self):
205205
)
206206

207207

208-
class From3rdParty:
209-
# GH#44616
210-
211-
def setup(self):
212-
try:
213-
import torch
214-
except ImportError:
215-
raise NotImplementedError
216-
217-
row = 700000
218-
col = 64
219-
self.val_tensor = torch.randn(row, col)
220-
221-
def time_from_torch(self):
222-
DataFrame(self.val_tensor)
223-
224-
225208
from .pandas_vb_common import setup # noqa: F401 isort:skip

asv_bench/benchmarks/frame_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,10 @@ def setup(self, axis):
454454
)
455455

456456
def time_count_level_multi(self, axis):
457-
self.df.count(axis=axis, level=1)
457+
self.df.count(axis=axis)
458458

459459
def time_count_level_mixed_dtypes_multi(self, axis):
460-
self.df_mixed.count(axis=axis, level=1)
460+
self.df_mixed.count(axis=axis)
461461

462462

463463
class Apply:

0 commit comments

Comments
 (0)