Skip to content

Commit 0443ae8

Browse files
Merge remote-tracking branch 'upstream/main' into pandas-dev#60365-enforce-numpy-docstring-validation
2 parents a0e3160 + d067e08 commit 0443ae8

File tree

257 files changed

+2616
-1471
lines changed

Some content is hidden

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

257 files changed

+2616
-1471
lines changed

.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ pandas/tests/io/parser/data export-ignore
8585

8686
# Include cibw script in sdist since it's needed for building wheels
8787
scripts/cibw_before_build.sh -export-ignore
88-
scripts/cibw_before_test.sh -export-ignore
88+
scripts/cibw_before_build_windows.sh -export-ignore
89+
scripts/cibw_before_test_windows.sh -export-ignore

.github/workflows/unit-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ jobs:
387387
- name: Build Environment
388388
run: |
389389
python --version
390-
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
391-
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
390+
python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.2.1 meson-python==0.13.1
391+
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
392392
python -m pip install versioneer[toml]
393393
python -m pip install python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
394394
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"

.github/workflows/wheels.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ jobs:
111111
- buildplat: [ubuntu-22.04, pyodide_wasm32]
112112
python: ["cp312", "3.12"]
113113
cibw_build_frontend: 'build'
114-
# TODO: Build free-threaded wheels for Windows
115-
exclude:
116-
- buildplat: [windows-2022, win_amd64]
117-
python: ["cp313t", "3.13"]
118114

119115
env:
120116
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
@@ -156,7 +152,7 @@ jobs:
156152
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
157153

158154
- name: Build wheels
159-
uses: pypa/cibuildwheel@v2.21.3
155+
uses: pypa/cibuildwheel@v2.22.0
160156
with:
161157
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
162158
env:
@@ -181,20 +177,6 @@ jobs:
181177
shell: bash -el {0}
182178
run: for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done
183179

184-
# Testing on windowsservercore instead of GHA runner to fail on missing DLLs
185-
- name: Test Windows Wheels
186-
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
187-
shell: pwsh
188-
run: |
189-
$TST_CMD = @"
190-
python -m pip install hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0;
191-
python -m pip install `$(Get-Item pandas\wheelhouse\*.whl);
192-
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`\"])`';
193-
"@
194-
# add rc to the end of the image name if the Python version is unreleased
195-
docker pull python:${{ matrix.python[1] == '3.13' && '3.13-rc' || format('{0}-windowsservercore', matrix.python[1]) }}
196-
docker run --env PANDAS_CI='1' -v ${PWD}:C:\pandas python:${{ matrix.python[1] == '3.13' && '3.13-rc' || format('{0}-windowsservercore', matrix.python[1]) }} powershell -Command $TST_CMD
197-
198180
- uses: actions/upload-artifact@v4
199181
with:
200182
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}

.pre-commit-config.yaml

+3-3
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.7.2
22+
rev: v0.8.1
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -47,7 +47,7 @@ repos:
4747
types_or: [python, rst, markdown, cython, c]
4848
additional_dependencies: [tomli]
4949
- repo: https://github.com/MarcoGorelli/cython-lint
50-
rev: v0.16.2
50+
rev: v0.16.6
5151
hooks:
5252
- id: cython-lint
5353
- id: double-quote-cython-strings
@@ -95,7 +95,7 @@ repos:
9595
- id: sphinx-lint
9696
args: ["--enable", "all", "--disable", "line-too-long"]
9797
- repo: https://github.com/pre-commit/mirrors-clang-format
98-
rev: v19.1.3
98+
rev: v19.1.4
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ graft pandas/_libs/include
6565

6666
# Include cibw script in sdist since it's needed for building wheels
6767
include scripts/cibw_before_build.sh
68+
include scripts/cibw_before_build_windows.sh
69+
include scripts/cibw_before_test_windows.sh

asv_bench/benchmarks/groupby.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,7 @@ def setup(self, dtype, method, application, ncols, engine):
511511
# grouping on multiple columns
512512
# and we lack kernels for a bunch of methods
513513
if (
514-
engine == "numba"
515-
and method in _numba_unsupported_methods
514+
(engine == "numba" and method in _numba_unsupported_methods)
516515
or ncols > 1
517516
or application == "transformation"
518517
or dtype == "datetime"

ci/code_checks.sh

+4-27
Original file line numberDiff line numberDiff line change
@@ -73,44 +73,33 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
7575
-i "pandas.RangeIndex.from_range PR01,SA01" \
76-
-i "pandas.Series.dt.freq GL08" \
7776
-i "pandas.Series.dt.unit GL08" \
7877
-i "pandas.Series.pad PR01,SA01" \
7978
-i "pandas.Timedelta.max PR02" \
8079
-i "pandas.Timedelta.min PR02" \
8180
-i "pandas.Timedelta.resolution PR02" \
8281
-i "pandas.Timestamp.max PR02" \
8382
-i "pandas.Timestamp.min PR02" \
84-
-i "pandas.Timestamp.nanosecond GL08" \
8583
-i "pandas.Timestamp.resolution PR02" \
8684
-i "pandas.Timestamp.tzinfo GL08" \
87-
-i "pandas.Timestamp.year GL08" \
88-
-i "pandas.api.types.is_re_compilable PR07,SA01" \
89-
-i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \
9085
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
91-
-i "pandas.arrays.IntegerArray SA01" \
9286
-i "pandas.arrays.IntervalArray.length SA01" \
93-
-i "pandas.arrays.IntervalArray.right SA01" \
9487
-i "pandas.arrays.NumpyExtensionArray SA01" \
95-
-i "pandas.arrays.SparseArray PR07,SA01" \
9688
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
9789
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
9890
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
91+
<<<<<<< HEAD
9992
-i "pandas.core.groupby.DataFrameGroupBy.groups SA01" \
10093
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
10194
-i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \
95+
=======
96+
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
97+
>>>>>>> upstream/main
10298
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
10399
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
104-
-i "pandas.core.groupby.SeriesGroupBy.groups SA01" \
105-
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
106-
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
107-
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
108-
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
109100
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
110101
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
111102
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \
112-
-i "pandas.core.resample.Resampler.groups SA01" \
113-
-i "pandas.core.resample.Resampler.indices SA01" \
114103
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
115104
-i "pandas.core.resample.Resampler.mean SA01" \
116105
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
@@ -120,24 +109,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
120109
-i "pandas.core.resample.Resampler.std SA01" \
121110
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
122111
-i "pandas.core.resample.Resampler.var SA01" \
123-
-i "pandas.errors.AttributeConflictWarning SA01" \
124-
-i "pandas.errors.ChainedAssignmentError SA01" \
125-
-i "pandas.errors.DataError SA01" \
126-
-i "pandas.errors.DuplicateLabelError SA01" \
127-
-i "pandas.errors.IntCastingNaNError SA01" \
128-
-i "pandas.errors.InvalidIndexError SA01" \
129112
-i "pandas.errors.NullFrequencyError SA01" \
130-
-i "pandas.errors.NumExprClobberingError SA01" \
131113
-i "pandas.errors.NumbaUtilError SA01" \
132-
-i "pandas.errors.OutOfBoundsTimedelta SA01" \
133114
-i "pandas.errors.PerformanceWarning SA01" \
134-
-i "pandas.errors.PossibleDataLossError SA01" \
135115
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
136-
-i "pandas.errors.UnsortedIndexError SA01" \
137116
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
138-
-i "pandas.infer_freq SA01" \
139117
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
140-
-i "pandas.io.stata.StataWriter.write_file SA01" \
141118
-i "pandas.plotting.andrews_curves RT03,SA01" \
142119
-i "pandas.plotting.scatter_matrix PR07,SA01" \
143120
-i "pandas.tseries.offsets.BDay PR02,SA01" \

doc/source/conf.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@
242242
"external_links": [],
243243
"footer_start": ["pandas_footer", "sphinx-version"],
244244
"github_url": "https://github.com/pandas-dev/pandas",
245-
"twitter_url": "https://twitter.com/pandas_dev",
246245
"analytics": {
247246
"plausible_analytics_domain": "pandas.pydata.org",
248247
"plausible_analytics_url": "https://views.scientific-python.org/js/script.js",
@@ -258,6 +257,11 @@
258257
# patch version doesn't compare as equal (e.g. 2.2.1 != 2.2.0 but it should be)
259258
"show_version_warning_banner": False,
260259
"icon_links": [
260+
{
261+
"name": "X",
262+
"url": "https://x.com/pandas_dev",
263+
"icon": "fa-brands fa-square-x-twitter",
264+
},
261265
{
262266
"name": "Mastodon",
263267
"url": "https://fosstodon.org/@pandas_dev",

doc/source/development/contributing_docstring.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ Finally, docstrings can also be appended to with the ``doc`` decorator.
940940

941941
In this example, we'll create a parent docstring normally (this is like
942942
``pandas.core.generic.NDFrame``). Then we'll have two children (like
943-
``pandas.core.series.Series`` and ``pandas.DataFrame``). We'll
943+
``pandas.Series`` and ``pandas.DataFrame``). We'll
944944
substitute the class names in this docstring.
945945

946946
.. code-block:: python
@@ -995,5 +995,5 @@ mapping function names to docstrings. Wherever possible, we prefer using
995995
``doc``, since the docstring-writing processes is slightly closer to normal.
996996

997997
See ``pandas.core.generic.NDFrame.fillna`` for an example template, and
998-
``pandas.core.series.Series.fillna`` and ``pandas.core.generic.frame.fillna``
998+
``pandas.Series.fillna`` and ``pandas.core.generic.frame.fillna``
999999
for the filled versions.

0 commit comments

Comments
 (0)