Skip to content

Commit 297f4e8

Browse files
committed
Merge remote-tracking branch 'upstream/main' into bump/optional
2 parents 7dfe5bc + 513e787 commit 297f4e8

File tree

157 files changed

+2972
-627
lines changed

Some content is hidden

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

157 files changed

+2972
-627
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# ci
55
ci/ @mroeschke
66

7-
# web
8-
web/ @datapythonista
9-
107
# docs
118
doc/cheatsheet @Dr-Irv
129
doc/source/development @noatamir

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
if: failure()
1515

1616
- name: Upload coverage to Codecov
17-
uses: codecov/codecov-action@v4
17+
uses: codecov/codecov-action@v5
1818
with:
1919
flags: unittests
2020
name: codecov-pandas

.github/actions/setup-conda/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
using: composite
88
steps:
99
- name: Install ${{ inputs.environment-file }}
10-
uses: mamba-org/setup-micromamba@v1
10+
uses: mamba-org/setup-micromamba@v2
1111
with:
1212
environment-file: ${{ inputs.environment-file }}
1313
environment-name: test

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
- name: Build documentation
6060
run: doc/make.py --warnings-are-errors
6161

62+
- name: Build the interactive terminal
63+
working-directory: web/interactive_terminal
64+
run: jupyter lite build
65+
6266
- name: Build documentation zip
6367
run: doc/make.py zip_html
6468

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
154154

155155
- name: Build wheels
156-
uses: pypa/cibuildwheel@v2.22.0
156+
uses: pypa/cibuildwheel@v2.23.0
157157
with:
158158
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
159159
env:

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ci:
1919
skip: [pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.9.4
22+
rev: v0.9.9
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -70,7 +70,7 @@ repos:
7070
- id: trailing-whitespace
7171
args: [--markdown-linebreak-ext=md]
7272
- repo: https://github.com/PyCQA/isort
73-
rev: 6.0.0
73+
rev: 6.0.1
7474
hooks:
7575
- id: isort
7676
- repo: https://github.com/asottile/pyupgrade
@@ -106,6 +106,11 @@ repos:
106106
hooks:
107107
- id: meson-fmt
108108
args: ['--inplace']
109+
- repo: https://github.com/shellcheck-py/shellcheck-py
110+
rev: v0.10.0.1
111+
hooks:
112+
- id: shellcheck
113+
args: ["--severity=warning"]
109114
- repo: local
110115
hooks:
111116
- id: pyright

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ COPY requirements-dev.txt /tmp
1313
RUN python -m pip install -r /tmp/requirements-dev.txt
1414
RUN git config --global --add safe.directory /home/pandas
1515

16-
ENV SHELL "/bin/bash"
16+
ENV SHELL="/bin/bash"
1717
CMD ["/bin/bash"]

asv_bench/benchmarks/rolling.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,19 @@ class Methods:
1010
["DataFrame", "Series"],
1111
[("rolling", {"window": 10}), ("rolling", {"window": 1000}), ("expanding", {})],
1212
["int", "float"],
13-
["median", "mean", "max", "min", "std", "count", "skew", "kurt", "sum", "sem"],
13+
[
14+
"median",
15+
"mean",
16+
"max",
17+
"min",
18+
"std",
19+
"count",
20+
"skew",
21+
"kurt",
22+
"sum",
23+
"sem",
24+
"nunique",
25+
],
1426
)
1527
param_names = ["constructor", "window_kwargs", "dtype", "method"]
1628

ci/code_checks.sh

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ else
2424
fi
2525

2626
[[ -z "$CHECK" || "$CHECK" == "code" || "$CHECK" == "doctests" || "$CHECK" == "docstrings" || "$CHECK" == "single-docs" || "$CHECK" == "notebooks" ]] || \
27-
{ echo "Unknown command $1. Usage: $0 [code|doctests|docstrings|single-docs|notebooks]"; exit 9999; }
27+
{ echo "Unknown command $1. Usage: $0 [code|doctests|docstrings|single-docs|notebooks]"; exit 1; }
2828

29-
BASE_DIR="$(dirname $0)/.."
29+
BASE_DIR="$(dirname "$0")/.."
3030
RET=0
3131

3232
### CODE ###
3333
if [[ -z "$CHECK" || "$CHECK" == "code" ]]; then
3434

35-
MSG='Check import. No warnings, and blocklist some optional dependencies' ; echo $MSG
35+
MSG='Check import. No warnings, and blocklist some optional dependencies' ; echo "$MSG"
3636
python -W error -c "
3737
import sys
3838
import pandas
@@ -49,24 +49,24 @@ if mods:
4949
sys.stderr.write('err: pandas should not import: {}\n'.format(', '.join(mods)))
5050
sys.exit(len(mods))
5151
"
52-
RET=$(($RET + $?)) ; echo $MSG "DONE"
52+
RET=$(($RET + $?)) ; echo "$MSG" "DONE"
5353

5454
fi
5555

5656
### DOCTESTS ###
5757
if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
5858

59-
MSG='Python and Cython Doctests' ; echo $MSG
59+
MSG='Python and Cython Doctests' ; echo "$MSG"
6060
python -c 'import pandas as pd; pd.test(run_doctests=True)'
61-
RET=$(($RET + $?)) ; echo $MSG "DONE"
61+
RET=$(($RET + $?)) ; echo "$MSG" "DONE"
6262

6363
fi
6464

6565
### DOCSTRINGS ###
6666
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
6767

68-
MSG='Validate Docstrings' ; echo $MSG
69-
$BASE_DIR/scripts/validate_docstrings.py \
68+
MSG='Validate Docstrings' ; echo "$MSG"
69+
"$BASE_DIR"/scripts/validate_docstrings.py \
7070
--format=actions \
7171
-i ES01 `# For now it is ok if docstrings are missing the extended summary` \
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
@@ -83,6 +83,16 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8383
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
8484
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
8585
-i "pandas.tseries.offsets.BDay PR02,SA01" \
86+
-i "pandas.tseries.offsets.BHalfYearBegin.is_on_offset GL08" \
87+
-i "pandas.tseries.offsets.BHalfYearBegin.n GL08" \
88+
-i "pandas.tseries.offsets.BHalfYearBegin.normalize GL08" \
89+
-i "pandas.tseries.offsets.BHalfYearBegin.rule_code GL08" \
90+
-i "pandas.tseries.offsets.BHalfYearBegin.startingMonth GL08" \
91+
-i "pandas.tseries.offsets.BHalfYearEnd.is_on_offset GL08" \
92+
-i "pandas.tseries.offsets.BHalfYearEnd.n GL08" \
93+
-i "pandas.tseries.offsets.BHalfYearEnd.normalize GL08" \
94+
-i "pandas.tseries.offsets.BHalfYearEnd.rule_code GL08" \
95+
-i "pandas.tseries.offsets.BHalfYearEnd.startingMonth GL08" \
8696
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
8797
-i "pandas.tseries.offsets.BQuarterBegin.n GL08" \
8898
-i "pandas.tseries.offsets.BQuarterBegin.normalize GL08" \
@@ -185,6 +195,16 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
185195
-i "pandas.tseries.offsets.FY5253Quarter.variation GL08" \
186196
-i "pandas.tseries.offsets.FY5253Quarter.weekday GL08" \
187197
-i "pandas.tseries.offsets.FY5253Quarter.year_has_extra_week GL08" \
198+
-i "pandas.tseries.offsets.HalfYearBegin.is_on_offset GL08" \
199+
-i "pandas.tseries.offsets.HalfYearBegin.n GL08" \
200+
-i "pandas.tseries.offsets.HalfYearBegin.normalize GL08" \
201+
-i "pandas.tseries.offsets.HalfYearBegin.rule_code GL08" \
202+
-i "pandas.tseries.offsets.HalfYearBegin.startingMonth GL08" \
203+
-i "pandas.tseries.offsets.HalfYearEnd.is_on_offset GL08" \
204+
-i "pandas.tseries.offsets.HalfYearEnd.n GL08" \
205+
-i "pandas.tseries.offsets.HalfYearEnd.normalize GL08" \
206+
-i "pandas.tseries.offsets.HalfYearEnd.rule_code GL08" \
207+
-i "pandas.tseries.offsets.HalfYearEnd.startingMonth GL08" \
188208
-i "pandas.tseries.offsets.Hour.is_on_offset GL08" \
189209
-i "pandas.tseries.offsets.Hour.n GL08" \
190210
-i "pandas.tseries.offsets.Hour.normalize GL08" \
@@ -265,7 +285,7 @@ fi
265285
if [[ -z "$CHECK" || "$CHECK" == "notebooks" ]]; then
266286

267287
MSG='Notebooks' ; echo $MSG
268-
jupyter nbconvert --execute $(find doc/source -name '*.ipynb') --to notebook
288+
jupyter nbconvert --execute "$(find doc/source -name '*.ipynb')" --to notebook
269289
RET=$(($RET + $?)) ; echo $MSG "DONE"
270290

271291
fi

ci/run_tests.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
# Workaround for pytest-xdist (it collects different tests in the workers if PYTHONHASHSEED is not set)
44
# https://github.com/pytest-dev/pytest/issues/920
55
# https://github.com/pytest-dev/pytest/issues/1075
6-
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
7-
8-
# May help reproduce flaky CI builds if set in subsequent runs
9-
echo PYTHONHASHSEED=$PYTHONHASHSEED
6+
PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
7+
export PYTHONHASHSEED
108

119
COVERAGE="-s --cov=pandas --cov-report=xml --cov-append --cov-config=pyproject.toml"
1210

@@ -16,5 +14,5 @@ if [[ "$PATTERN" ]]; then
1614
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""
1715
fi
1816

19-
echo $PYTEST_CMD
17+
echo "$PYTEST_CMD"
2018
sh -c "$PYTEST_CMD"

0 commit comments

Comments
 (0)