Skip to content

Commit 9a7d2b0

Browse files
committed
Updating to latest
2 parents a8b8637 + 4692686 commit 9a7d2b0

File tree

759 files changed

+16394
-23730
lines changed

Some content is hidden

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

759 files changed

+16394
-23730
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
jobs:
44
test-arm:
55
machine:
6-
image: ubuntu-2004:2022.04.1
6+
image: default
77
resource_class: arm.large
88
environment:
99
ENV_FILE: ci/deps/circle-310-arm64.yaml
@@ -46,7 +46,7 @@ jobs:
4646
cibw-build:
4747
type: string
4848
machine:
49-
image: ubuntu-2004:2022.04.1
49+
image: default
5050
resource_class: arm.large
5151
environment:
5252
TRIGGER_SOURCE: << pipeline.trigger_source >>

.github/actions/run-tests/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ runs:
2020
path: test-data.xml
2121
if: failure()
2222

23-
- name: Report Coverage
24-
run: coverage report -m
25-
shell: bash -el {0}
26-
if: failure()
27-
2823
- name: Upload coverage to Codecov
2924
uses: codecov/codecov-action@v3
3025
with:

.github/workflows/code-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
if: ${{ steps.build.outcome == 'success' && always() }}
8787

8888
- name: Typing + pylint
89-
uses: pre-commit/[email protected].0
89+
uses: pre-commit/[email protected].1
9090
with:
9191
extra_args: --verbose --hook-stage manual --all-files
9292
if: ${{ steps.build.outcome == 'success' && always() }}

.github/workflows/comment-commands.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
concurrency:
2525
group: ${{ github.actor }}-preview-docs
2626
steps:
27-
- uses: pandas-dev/[email protected].1
27+
- uses: pandas-dev/[email protected].2
2828
with:
2929
previewer-server: "https://pandas.pydata.org/preview"
3030
artifact-job: "Doc Build and Upload"

.github/workflows/package-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-22.04
2525
strategy:
2626
matrix:
27-
extra: ["test", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output-formatting", "clipboard", "compression", "consortium-standard", "all"]
27+
extra: ["test", "pyarrow", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output-formatting", "clipboard", "compression", "all"]
2828
fail-fast: false
2929
name: Install Extras - ${{ matrix.extra }}
3030
concurrency:

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,14 @@ jobs:
5757
# Also install zh_CN (its encoding is gb2312) but do not activate it.
5858
# It will be temporarily activated during tests with locale.setlocale
5959
extra_loc: "zh_CN"
60-
- name: "Copy-on-Write 3.9"
61-
env_file: actions-39.yaml
62-
pattern: "not slow and not network and not single_cpu"
63-
pandas_copy_on_write: "1"
64-
- name: "Copy-on-Write 3.10"
65-
env_file: actions-310.yaml
66-
pattern: "not slow and not network and not single_cpu"
67-
pandas_copy_on_write: "1"
68-
- name: "Copy-on-Write 3.11"
69-
env_file: actions-311.yaml
70-
pattern: "not slow and not network and not single_cpu"
71-
pandas_copy_on_write: "1"
72-
- name: "Copy-on-Write 3.12"
73-
env_file: actions-312.yaml
74-
pattern: "not slow and not network and not single_cpu"
75-
pandas_copy_on_write: "1"
7660
- name: "Pypy"
7761
env_file: actions-pypy-39.yaml
7862
pattern: "not slow and not network and not single_cpu"
7963
test_args: "--max-worker-restart 0"
8064
- name: "Numpy Dev"
8165
env_file: actions-311-numpydev.yaml
8266
pattern: "not slow and not network and not single_cpu"
83-
# Currently restricted the warnings that error to Deprecation Warnings from numpy
84-
# done since pyarrow isn't compatible with numpydev always
85-
# TODO: work with pyarrow to revert this?
86-
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
67+
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
8768
- name: "Pyarrow Nightly"
8869
env_file: actions-311-pyarrownightly.yaml
8970
pattern: "not slow and not network and not single_cpu"
@@ -101,7 +82,6 @@ jobs:
10182
PATTERN: ${{ matrix.pattern }}
10283
LANG: ${{ matrix.lang || 'C.UTF-8' }}
10384
LC_ALL: ${{ matrix.lc_all || '' }}
104-
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
10585
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
10686
TEST_ARGS: ${{ matrix.test_args || '' }}
10787
PYTEST_WORKERS: ${{ matrix.pytest_workers || 'auto' }}
@@ -111,7 +91,7 @@ jobs:
11191
QT_QPA_PLATFORM: offscreen
11292
concurrency:
11393
# https://github.community/t/concurrecy-not-work-for-push/183068/7
114-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_copy_on_write || '' }}
94+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}}
11595
cancel-in-progress: true
11696

11797
services:

.pre-commit-config.yaml

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ci:
1919
skip: [pylint, pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.1.6
22+
rev: v0.3.1
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -30,9 +30,14 @@ repos:
3030
files: ^pandas
3131
exclude: ^pandas/tests
3232
args: [--select, "ANN001,ANN2", --fix-only, --exit-non-zero-on-fix]
33+
- id: ruff
34+
name: ruff-use-pd_array-in-core
35+
alias: ruff-use-pd_array-in-core
36+
files: ^pandas/core/
37+
exclude: ^pandas/core/api\.py$
38+
args: [--select, "ICN001", --exit-non-zero-on-fix]
3339
- id: ruff-format
34-
# TODO: "." not needed in ruff 0.1.8
35-
args: ["."]
40+
exclude: ^scripts
3641
- repo: https://github.com/jendrikseipp/vulture
3742
rev: 'v2.10'
3843
hooks:
@@ -54,13 +59,11 @@ repos:
5459
- repo: https://github.com/pre-commit/pre-commit-hooks
5560
rev: v4.5.0
5661
hooks:
57-
- id: check-ast
5862
- id: check-case-conflict
5963
- id: check-toml
6064
- id: check-xml
6165
- id: check-yaml
6266
exclude: ^ci/meta.yaml$
63-
- id: debug-statements
6467
- id: end-of-file-fixer
6568
exclude: \.txt$
6669
- id: mixed-line-ending
@@ -130,7 +133,7 @@ repos:
130133
types: [python]
131134
stages: [manual]
132135
additional_dependencies: &pyright_dependencies
133-
136+
134137
- id: pyright
135138
# note: assumes python env is setup and activated
136139
name: pyright reportGeneralTypeIssues
@@ -209,39 +212,22 @@ repos:
209212
language: pygrep
210213
entry: |
211214
(?x)
212-
# pytest.xfail instead of pytest.mark.xfail
213-
pytest\.xfail
214-
215215
# imports from pandas._testing instead of `import pandas._testing as tm`
216-
|from\ pandas\._testing\ import
216+
from\ pandas\._testing\ import
217217
|from\ pandas\ import\ _testing\ as\ tm
218218
219-
# No direct imports from conftest
220-
|conftest\ import
221-
|import\ conftest
222-
223219
# pandas.testing instead of tm
224220
|pd\.testing\.
225221
226222
# pd.api.types instead of from pandas.api.types import ...
227223
|(pd|pandas)\.api\.types\.
228224
229-
# np.testing, np.array_equal
230-
|(numpy|np)(\.testing|\.array_equal)
231-
232-
# unittest.mock (use pytest builtin monkeypatch fixture instead)
233-
|(unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)
225+
# np.array_equal
226+
|(numpy|np)\.array_equal
234227
235228
# pytest raises without context
236229
|\s\ pytest.raises
237230
238-
# TODO
239-
# pytest.warns (use tm.assert_produces_warning instead)
240-
# |pytest\.warns
241-
242-
# os.remove
243-
|os\.remove
244-
245231
# Unseeded numpy default_rng
246232
|default_rng\(\)
247233
files: ^pandas/tests/
@@ -292,25 +278,6 @@ repos:
292278
language: python
293279
entry: python scripts/validate_unwanted_patterns.py --validation-type="nodefault_used_not_only_for_typing"
294280
types: [python]
295-
- id: use-pd_array-in-core
296-
name: Import pandas.array as pd_array in core
297-
language: python
298-
entry: python scripts/use_pd_array_in_core.py
299-
files: ^pandas/core/
300-
exclude: ^pandas/core/api\.py$
301-
types: [python]
302-
- id: use-io-common-urlopen
303-
name: Use pandas.io.common.urlopen instead of urllib.request.urlopen
304-
language: python
305-
entry: python scripts/use_io_common_urlopen.py
306-
files: ^pandas/
307-
exclude: ^pandas/tests/
308-
types: [python]
309-
- id: no-bool-in-core-generic
310-
name: Use bool_t instead of bool in pandas/core/generic.py
311-
entry: python scripts/no_bool_in_generic.py
312-
language: python
313-
files: ^pandas/core/generic\.py$
314281
- id: no-return-exception
315282
name: Use raise instead of return for exceptions
316283
language: pygrep

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<div align="center">
2-
<img src="https://pandas.pydata.org/static/img/pandas.svg"><br>
3-
</div>
1+
<picture align="center">
2+
<source media="(prefers-color-scheme: dark)" srcset="https://pandas.pydata.org/static/img/pandas_white.svg">
3+
<img alt="Pandas Logo" src="https://pandas.pydata.org/static/img/pandas.svg">
4+
</picture>
45

56
-----------------
67

asv_bench/benchmarks/frame_methods.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,6 @@ def setup(self):
159159

160160
def time_items(self):
161161
# (monitor no-copying behaviour)
162-
if hasattr(self.df, "_item_cache"):
163-
self.df._item_cache.clear()
164-
for name, col in self.df.items():
165-
pass
166-
167-
def time_items_cached(self):
168162
for name, col in self.df.items():
169163
pass
170164

asv_bench/benchmarks/index_object.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,14 @@ def setup(self):
136136
self.int_idxs.append(i_idx)
137137
o_idx = i_idx.astype(str)
138138
self.object_idxs.append(o_idx)
139+
self.same_range_idx = [self.range_idx] * N
139140

140141
def time_append_range_list(self):
141142
self.range_idx.append(self.range_idxs)
142143

144+
def time_append_range_list_same(self):
145+
self.range_idx.append(self.same_range_idx)
146+
143147
def time_append_int_list(self):
144148
self.int_idx.append(self.int_idxs)
145149

0 commit comments

Comments
 (0)