Skip to content

Commit 7796600

Browse files
authored
Merge branch 'main' into DOC/59592/fix-docstring-validation-errors
2 parents 4172738 + 600bbd5 commit 7796600

File tree

88 files changed

+1524
-864
lines changed

Some content is hidden

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

88 files changed

+1524
-864
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
if pip show pandas 1>/dev/null; then
3333
pip uninstall -y pandas
3434
fi
35-
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
35+
python -m pip install --no-build-isolation -ve . -Csetup-args="--werror"
3636
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
3737
sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
3838
ci/run_tests.sh
@@ -57,7 +57,7 @@ jobs:
5757
. ~/virtualenvs/pandas-dev/bin/activate
5858
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
5959
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
60-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
60+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
6161
python -m pip list --no-cache-dir
6262
export PANDAS_CI=1
6363
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml

.github/actions/build_pandas/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,20 @@ runs:
2222
fi
2323
shell: bash -el {0}
2424

25+
- name: Uninstall nomkl
26+
run: |
27+
if conda list nomkl | grep nomkl 1>/dev/null; then
28+
conda remove nomkl -y
29+
fi
30+
shell: bash -el {0}
31+
2532
- name: Build Pandas
2633
run: |
2734
if [[ ${{ inputs.editable }} == "true" ]]; then
2835
pip install -e . --no-build-isolation -v --no-deps \
29-
--config-settings=setup-args="--werror"
36+
-Csetup-args="--werror"
3037
else
3138
pip install . --no-build-isolation -v --no-deps \
32-
--config-settings=setup-args="--werror"
39+
-Csetup-args="--werror"
3340
fi
3441
shell: bash -el {0}

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ jobs:
235235
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
236236
. ~/virtualenvs/pandas-dev/bin/activate
237237
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
238-
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
238+
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
239239
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
240-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
240+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
241241
python -m pip list --no-cache-dir
242242
export PANDAS_CI=1
243243
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -275,7 +275,7 @@ jobs:
275275
. ~/virtualenvs/pandas-dev/bin/activate
276276
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
277277
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
278-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
278+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
279279
python -m pip list --no-cache-dir
280280
281281
- name: Run Tests
@@ -349,7 +349,7 @@ jobs:
349349
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
350350
python -m pip install versioneer[toml]
351351
python -m pip install python-dateutil tzdata cython hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
352-
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
352+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
353353
python -m pip list
354354
355355
- name: Run Tests
@@ -392,7 +392,7 @@ jobs:
392392
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
393393
python -m pip install versioneer[toml]
394394
python -m pip install python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
395-
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
395+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
396396
python -m pip list
397397
398398
- name: Run Tests

.gitpod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ tasks:
1313
mkdir -p .vscode
1414
cp gitpod/settings.json .vscode/settings.json
1515
git fetch --tags
16-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
16+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
1717
pre-commit install --install-hooks
1818
command: |
19-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
19+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
2020
echo "✨ Pre-build complete! You can close this terminal ✨ "
2121
2222
# --------------------------------------------------------

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ repos:
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
26+
exclude: ^pandas/tests/frame/test_query_eval.py
2627
- id: ruff
2728
# TODO: remove autofixe-only rules when they are checked by ruff
2829
name: ruff-selected-autofixes
@@ -31,7 +32,7 @@ repos:
3132
exclude: ^pandas/tests
3233
args: [--select, "ANN001,ANN2", --fix-only, --exit-non-zero-on-fix]
3334
- id: ruff-format
34-
exclude: ^scripts
35+
exclude: ^scripts|^pandas/tests/frame/test_query_eval.py
3536
- repo: https://github.com/jendrikseipp/vulture
3637
rev: 'v2.11'
3738
hooks:
@@ -85,6 +86,7 @@ repos:
8586
types: [text] # overwrite types: [rst]
8687
types_or: [python, rst]
8788
- id: rst-inline-touching-normal
89+
exclude: ^pandas/tests/frame/test_query_eval.py
8890
types: [text] # overwrite types: [rst]
8991
types_or: [python, rst]
9092
- repo: https://github.com/sphinx-contrib/sphinx-lint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ or for installing in [development mode](https://pip.pypa.io/en/latest/cli/pip_in
138138

139139

140140
```sh
141-
python -m pip install -ve . --no-build-isolation --config-settings=editable-verbose=true
141+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
142142
```
143143

144144
See the full instructions for [installing from source](https://pandas.pydata.org/docs/dev/development/contributing_environment.html).

ci/code_checks.sh

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -132,35 +132,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
132132
-i "pandas.Series.dt.tz_convert PR01,PR02" \
133133
-i "pandas.Series.dt.tz_localize PR01,PR02" \
134134
-i "pandas.Series.dt.unit GL08" \
135-
-i "pandas.Series.gt SA01" \
136-
-i "pandas.Series.list.__getitem__ SA01" \
137-
-i "pandas.Series.list.flatten SA01" \
138-
-i "pandas.Series.list.len SA01" \
139-
-i "pandas.Series.lt SA01" \
140-
-i "pandas.Series.ne SA01" \
141135
-i "pandas.Series.pad PR01,SA01" \
142-
-i "pandas.Series.pop SA01" \
143-
-i "pandas.Series.prod RT03" \
144-
-i "pandas.Series.product RT03" \
145-
-i "pandas.Series.reorder_levels RT03,SA01" \
146-
-i "pandas.Series.sem PR01,RT03,SA01" \
147136
-i "pandas.Series.sparse PR01,SA01" \
148-
-i "pandas.Series.sparse.density SA01" \
149137
-i "pandas.Series.sparse.fill_value SA01" \
150138
-i "pandas.Series.sparse.from_coo PR07,SA01" \
151139
-i "pandas.Series.sparse.npoints SA01" \
152140
-i "pandas.Series.sparse.sp_values SA01" \
153141
-i "pandas.Series.sparse.to_coo PR07,RT03,SA01" \
154-
-i "pandas.Series.std PR01,RT03,SA01" \
155-
-i "pandas.Series.str.match RT03" \
156-
-i "pandas.Series.str.normalize RT03,SA01" \
157-
-i "pandas.Series.str.repeat SA01" \
158-
-i "pandas.Series.str.replace SA01" \
159-
-i "pandas.Series.str.wrap RT03,SA01" \
160-
-i "pandas.Series.str.zfill RT03" \
161-
-i "pandas.Series.struct.dtypes SA01" \
162-
-i "pandas.Series.to_markdown SA01" \
163-
-i "pandas.Series.update PR07,SA01" \
164142
-i "pandas.Timedelta.asm8 SA01" \
165143
-i "pandas.Timedelta.ceil SA01" \
166144
-i "pandas.Timedelta.components SA01" \
@@ -178,37 +156,15 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
178156
-i "pandas.TimedeltaIndex.nanoseconds SA01" \
179157
-i "pandas.TimedeltaIndex.seconds SA01" \
180158
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
181-
-i "pandas.Timestamp.day GL08" \
182159
-i "pandas.Timestamp.fold GL08" \
183-
-i "pandas.Timestamp.hour GL08" \
184160
-i "pandas.Timestamp.max PR02" \
185-
-i "pandas.Timestamp.microsecond GL08" \
186161
-i "pandas.Timestamp.min PR02" \
187-
-i "pandas.Timestamp.minute GL08" \
188-
-i "pandas.Timestamp.month GL08" \
189162
-i "pandas.Timestamp.nanosecond GL08" \
190163
-i "pandas.Timestamp.resolution PR02" \
191-
-i "pandas.Timestamp.second GL08" \
192-
-i "pandas.Timestamp.strptime PR01,SA01" \
193-
-i "pandas.Timestamp.timetz SA01" \
194-
-i "pandas.Timestamp.to_datetime64 SA01" \
195164
-i "pandas.Timestamp.tzinfo GL08" \
196165
-i "pandas.Timestamp.value GL08" \
197166
-i "pandas.Timestamp.year GL08" \
198-
-i "pandas.api.extensions.ExtensionArray._pad_or_backfill PR01,RT03,SA01" \
199-
-i "pandas.api.extensions.ExtensionArray._reduce RT03,SA01" \
200-
-i "pandas.api.extensions.ExtensionArray._values_for_factorize SA01" \
201-
-i "pandas.api.extensions.ExtensionArray.astype SA01" \
202-
-i "pandas.api.extensions.ExtensionArray.dropna RT03,SA01" \
203-
-i "pandas.api.extensions.ExtensionArray.dtype SA01" \
204-
-i "pandas.api.extensions.ExtensionArray.duplicated RT03,SA01" \
205-
-i "pandas.api.extensions.ExtensionArray.fillna SA01" \
206-
-i "pandas.api.extensions.ExtensionArray.insert PR07,RT03,SA01" \
207167
-i "pandas.api.extensions.ExtensionArray.interpolate PR01,SA01" \
208-
-i "pandas.api.extensions.ExtensionArray.isin PR07,RT03,SA01" \
209-
-i "pandas.api.extensions.ExtensionArray.tolist RT03,SA01" \
210-
-i "pandas.api.extensions.ExtensionArray.unique RT03,SA01" \
211-
-i "pandas.api.extensions.ExtensionArray.view SA01" \
212168
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
213169
-i "pandas.api.types.is_bool PR01,SA01" \
214170
-i "pandas.api.types.is_categorical_dtype SA01" \
@@ -261,7 +217,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
261217
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
262218
-i "pandas.core.groupby.DataFrameGroupBy.ohlc SA01" \
263219
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
264-
-i "pandas.core.groupby.DataFrameGroupBy.prod SA01" \
265220
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
266221
-i "pandas.core.groupby.DataFrameGroupBy.sum SA01" \
267222
-i "pandas.core.groupby.SeriesGroupBy.__iter__ RT03,SA01" \
@@ -278,7 +233,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
278233
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
279234
-i "pandas.core.groupby.SeriesGroupBy.ohlc SA01" \
280235
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
281-
-i "pandas.core.groupby.SeriesGroupBy.prod SA01" \
282236
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
283237
-i "pandas.core.groupby.SeriesGroupBy.sum SA01" \
284238
-i "pandas.core.resample.Resampler.__iter__ RT03,SA01" \
@@ -331,34 +285,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
331285
-i "pandas.errors.UnsupportedFunctionCall SA01" \
332286
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
333287
-i "pandas.infer_freq SA01" \
334-
-i "pandas.io.formats.style.Styler.apply RT03" \
335-
-i "pandas.io.formats.style.Styler.apply_index RT03" \
336-
-i "pandas.io.formats.style.Styler.background_gradient RT03" \
337-
-i "pandas.io.formats.style.Styler.bar RT03,SA01" \
338-
-i "pandas.io.formats.style.Styler.clear SA01" \
339-
-i "pandas.io.formats.style.Styler.concat RT03,SA01" \
340-
-i "pandas.io.formats.style.Styler.export RT03" \
341-
-i "pandas.io.formats.style.Styler.from_custom_template SA01" \
342-
-i "pandas.io.formats.style.Styler.hide RT03,SA01" \
343-
-i "pandas.io.formats.style.Styler.highlight_between RT03" \
344-
-i "pandas.io.formats.style.Styler.highlight_max RT03" \
345-
-i "pandas.io.formats.style.Styler.highlight_min RT03" \
346-
-i "pandas.io.formats.style.Styler.highlight_null RT03" \
347-
-i "pandas.io.formats.style.Styler.highlight_quantile RT03" \
348-
-i "pandas.io.formats.style.Styler.map RT03" \
349-
-i "pandas.io.formats.style.Styler.map_index RT03" \
350-
-i "pandas.io.formats.style.Styler.set_caption RT03,SA01" \
351-
-i "pandas.io.formats.style.Styler.set_properties RT03,SA01" \
352-
-i "pandas.io.formats.style.Styler.set_sticky RT03,SA01" \
353-
-i "pandas.io.formats.style.Styler.set_table_attributes PR07,RT03" \
354-
-i "pandas.io.formats.style.Styler.set_table_styles RT03" \
355-
-i "pandas.io.formats.style.Styler.set_td_classes RT03" \
356-
-i "pandas.io.formats.style.Styler.set_tooltips RT03,SA01" \
357-
-i "pandas.io.formats.style.Styler.set_uuid PR07,RT03,SA01" \
358-
-i "pandas.io.formats.style.Styler.text_gradient RT03" \
359-
-i "pandas.io.formats.style.Styler.to_excel PR01" \
360-
-i "pandas.io.formats.style.Styler.to_string SA01" \
361-
-i "pandas.io.formats.style.Styler.use RT03" \
362288
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
363289
-i "pandas.io.stata.StataReader.data_label SA01" \
364290
-i "pandas.io.stata.StataReader.value_labels RT03,SA01" \

doc/source/development/contributing_environment.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ To compile pandas with meson, run::
227227
# By default, this will print verbose output
228228
# showing the "rebuild" taking place on import (see section below for explanation)
229229
# If you do not want to see this, omit everything after --no-build-isolation
230-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
230+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
231231

232232
.. note::
233233
The version number is pulled from the latest repository tag. Be sure to fetch the latest tags from upstream
@@ -242,15 +242,15 @@ To compile pandas with meson, run::
242242
It is possible to pass options from the pip frontend to the meson backend if you would like to configure your
243243
install. Occasionally, you'll want to use this to adjust the build directory, and/or toggle debug/optimization levels.
244244

245-
You can pass a build directory to pandas by appending ``--config-settings builddir="your builddir here"`` to your pip command.
245+
You can pass a build directory to pandas by appending ``-Cbuilddir="your builddir here"`` to your pip command.
246246
This option allows you to configure where meson stores your built C extensions, and allows for fast rebuilds.
247247

248248
Sometimes, it might be useful to compile pandas with debugging symbols, when debugging C extensions.
249-
Appending ``--config-settings setup-args="-Ddebug=true"`` will do the trick.
249+
Appending ``-Csetup-args="-Ddebug=true"`` will do the trick.
250250

251251
With pip, it is possible to chain together multiple config settings (for example specifying both a build directory
252252
and building with debug symbols would look like
253-
``--config-settings builddir="your builddir here" --config-settings=setup-args="-Dbuildtype=debug"``.
253+
``-Cbuilddir="your builddir here" -Csetup-args="-Dbuildtype=debug"``.
254254

255255
**Compiling pandas with setup.py**
256256

@@ -291,7 +291,7 @@ At this point you may want to try
291291

292292
When building pandas with meson, importing pandas will automatically trigger a rebuild, even when C/Cython files are modified.
293293
By default, no output will be produced by this rebuild (the import will just take longer). If you would like to see meson's
294-
output when importing pandas, you can set the environment variable ``MESONPY_EDTIABLE_VERBOSE``. For example, this would be::
294+
output when importing pandas, you can set the environment variable ``MESONPY_EDITABLE_VERBOSE``. For example, this would be::
295295

296296
# On Linux/macOS
297297
MESONPY_EDITABLE_VERBOSE=1 python
@@ -302,7 +302,7 @@ output when importing pandas, you can set the environment variable ``MESONPY_EDT
302302

303303
If you would like to see this verbose output every time, you can set the ``editable-verbose`` config setting to ``true`` like so::
304304

305-
python -m pip install -ve . --config-settings editable-verbose=true
305+
python -m pip install -ve . -Ceditable-verbose=true
306306

307307
.. tip::
308308
If you ever find yourself wondering whether setuptools or meson was used to build your pandas,

doc/source/development/debugging_extensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Debugging locally
1919

2020
By default building pandas from source will generate a release build. To generate a development build you can type::
2121

22-
pip install -ve . --no-build-isolation --config-settings=builddir="debug" --config-settings=setup-args="-Dbuildtype=debug"
22+
pip install -ve . --no-build-isolation -Cbuilddir="debug" -Csetup-args="-Dbuildtype=debug"
2323

2424
.. note::
2525

@@ -42,7 +42,7 @@ Inside the image, you can use meson to build/install pandas and place the build
4242

4343
.. code-block:: sh
4444
45-
python -m pip install -ve . --no-build-isolation --config-settings=builddir="debug" --config-settings=setup-args="-Dbuildtype=debug"
45+
python -m pip install -ve . --no-build-isolation -Cbuilddir="debug" -Csetup-args="-Dbuildtype=debug"
4646
4747
If planning to use cygdb, the files required by that application are placed within the build folder. So you have to first ``cd`` to the build folder, then start that application.
4848

doc/source/development/maintaining.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ and then run::
157157
git bisect start
158158
git bisect good v1.4.0
159159
git bisect bad v1.5.0
160-
git bisect run bash -c "python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true; python t.py"
160+
git bisect run bash -c "python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true; python t.py"
161161

162162
This finds the first commit that changed the behavior. The C extensions have to be
163163
rebuilt at every step, so the search can take a while.
164164

165165
Exit bisect and rebuild the current version::
166166

167167
git bisect reset
168-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
168+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
169169

170170
Report your findings under the corresponding issue and ping the commit author to get
171171
their input.

0 commit comments

Comments
 (0)