Skip to content

Commit aff01ac

Browse files
Merge branch 'main' into test_numpy_complex
2 parents f82ed4e + 14a6c9a commit aff01ac

Some content is hidden

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

73 files changed

+550
-451
lines changed

.github/workflows/unit-tests.yml

+9-22
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,12 @@ jobs:
7777
env_file: actions-311-numpydev.yaml
7878
pattern: "not slow and not network and not single_cpu"
7979
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
80-
# TODO(cython3): Re-enable once next-beta(after beta 1) comes out
81-
# There are some warnings failing the build with -werror
82-
pandas_ci: "0"
8380
- name: "Pyarrow Nightly"
8481
env_file: actions-311-pyarrownightly.yaml
8582
pattern: "not slow and not network and not single_cpu"
8683
fail-fast: false
8784
name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }}
8885
env:
89-
ENV_FILE: ci/deps/${{ matrix.env_file }}
9086
PATTERN: ${{ matrix.pattern }}
9187
EXTRA_APT: ${{ matrix.extra_apt || '' }}
9288
LANG: ${{ matrix.lang || 'C.UTF-8' }}
@@ -150,14 +146,13 @@ jobs:
150146

151147
- name: Generate extra locales
152148
# These extra locales will be available for locale.setlocale() calls in tests
153-
run: |
154-
sudo locale-gen ${{ matrix.extra_loc }}
149+
run: sudo locale-gen ${{ matrix.extra_loc }}
155150
if: ${{ matrix.extra_loc }}
156151

157152
- name: Set up Conda
158153
uses: ./.github/actions/setup-conda
159154
with:
160-
environment-file: ${{ env.ENV_FILE }}
155+
environment-file: ci/deps/${{ matrix.env_file }}
161156

162157
- name: Build Pandas
163158
id: build
@@ -312,15 +307,14 @@ jobs:
312307
# to the corresponding posix/windows-macos/sdist etc. workflows.
313308
# Feel free to modify this comment as necessary.
314309
#if: false # Uncomment this to freeze the workflow, comment it to unfreeze
310+
defaults:
311+
run:
312+
shell: bash -eou pipefail {0}
315313
runs-on: ${{ matrix.os }}
316314
strategy:
317315
fail-fast: false
318316
matrix:
319-
# TODO: Disable macOS for now, Github Actions bug where python is not
320-
# symlinked correctly to 3.12
321-
# xref https://github.com/actions/setup-python/issues/701
322-
#os: [ubuntu-22.04, macOS-latest, windows-latest]
323-
os: [ubuntu-22.04, windows-latest]
317+
os: [ubuntu-22.04, macOS-latest, windows-latest]
324318

325319
timeout-minutes: 180
326320

@@ -345,22 +339,15 @@ jobs:
345339
with:
346340
python-version: '3.12-dev'
347341

348-
- name: Install dependencies
342+
- name: Build Environment
349343
run: |
350344
python --version
351345
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.0.1 meson-python==0.13.1
352346
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
353347
python -m pip install versioneer[toml]
354348
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov pytest-asyncio>=0.17
355-
python -m pip list
356-
357-
- name: Build Pandas
358-
run: |
359349
python -m pip install -ve . --no-build-isolation --no-index
350+
python -m pip list
360351
361-
- name: Build Version
362-
run: |
363-
python -c "import pandas; pandas.show_versions();"
364-
365-
- name: Test
352+
- name: Run Tests
366353
uses: ./.github/actions/run-tests

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,17 @@ In the `pandas` directory (same one where you found this file after
130130
cloning the git repo), execute:
131131

132132
```sh
133-
python setup.py install
133+
pip install .
134134
```
135135

136136
or for installing in [development mode](https://pip.pypa.io/en/latest/cli/pip_install/#install-editable):
137137

138138

139139
```sh
140-
python -m pip install -e . --no-build-isolation --no-use-pep517
140+
python -m pip install -ve . --no-build-isolation --config-settings=editable-verbose=true
141141
```
142142

143-
or alternatively
144-
145-
```sh
146-
python setup.py develop
147-
```
148-
149-
See the full instructions for [installing from source](https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#installing-from-source).
143+
See the full instructions for [installing from source](https://pandas.pydata.org/docs/dev/development/contributing_environment.html).
150144

151145
## License
152146
[BSD 3](LICENSE)

ci/deps/actions-310.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -47,7 +46,6 @@ dependencies:
4746
- pymysql>=1.0.2
4847
- pyreadstat>=1.1.5
4948
- pytables>=3.7.0
50-
- python-snappy>=0.6.1
5149
- pyxlsb>=1.0.9
5250
- s3fs>=2022.05.0
5351
- scipy>=1.8.1

ci/deps/actions-311-downstream_compat.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- beautifulsoup4>=4.11.1
2929
- blosc>=1.21.0
3030
- bottleneck>=1.3.4
31-
- brotlipy>=0.7.0
3231
- fastparquet>=0.8.1
3332
- fsspec>=2022.05.0
3433
- html5lib>=1.1
@@ -48,7 +47,6 @@ dependencies:
4847
- pymysql>=1.0.2
4948
- pyreadstat>=1.1.5
5049
- pytables>=3.7.0
51-
- python-snappy>=0.6.1
5250
- pyxlsb>=1.0.9
5351
- s3fs>=2022.05.0
5452
- scipy>=1.8.1

ci/deps/actions-311.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -47,7 +46,6 @@ dependencies:
4746
- pymysql>=1.0.2
4847
- pyreadstat>=1.1.5
4948
# - pytables>=3.7.0, 3.8.0 is first version that supports 3.11
50-
- python-snappy>=0.6.1
5149
- pyxlsb>=1.0.9
5250
- s3fs>=2022.05.0
5351
- scipy>=1.8.1

ci/deps/actions-39-minimum_versions.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ dependencies:
2929
- beautifulsoup4=4.11.1
3030
- blosc=1.21.0
3131
- bottleneck=1.3.4
32-
- brotlipy=0.7.0
3332
- fastparquet=0.8.1
3433
- fsspec=2022.05.0
3534
- html5lib=1.1
@@ -49,7 +48,6 @@ dependencies:
4948
- pymysql=1.0.2
5049
- pyreadstat=1.1.5
5150
- pytables=3.7.0
52-
- python-snappy=0.6.1
5351
- pyxlsb=1.0.9
5452
- s3fs=2022.05.0
5553
- scipy=1.8.1

ci/deps/actions-39.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -47,7 +46,6 @@ dependencies:
4746
- pymysql>=1.0.2
4847
- pyreadstat>=1.1.5
4948
- pytables>=3.7.0
50-
- python-snappy>=0.6.1
5149
- pyxlsb>=1.0.9
5250
- s3fs>=2022.05.0
5351
- scipy>=1.8.1

ci/deps/circle-310-arm64.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dependencies:
2727
- beautifulsoup4>=4.11.1
2828
- blosc>=1.21.0
2929
- bottleneck>=1.3.4
30-
- brotlipy>=0.7.0
3130
- fastparquet>=0.8.1
3231
- fsspec>=2022.05.0
3332
- html5lib>=1.1
@@ -48,7 +47,6 @@ dependencies:
4847
- pymysql>=1.0.2
4948
# - pyreadstat>=1.1.5 not available on ARM
5049
- pytables>=3.7.0
51-
- python-snappy>=0.6.1
5250
- pyxlsb>=1.0.9
5351
- s3fs>=2022.05.0
5452
- scipy>=1.8.1

doc/_templates/autosummary/class.rst

+25-26
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
{% extends "!autosummary/class.rst" %}
1+
{{ fullname | escape | underline}}
22

3-
{% block methods %}
4-
{% if methods %}
3+
.. currentmodule:: {{ module }}
54

6-
..
7-
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
8-
.. autosummary::
9-
:toctree:
10-
{% for item in all_methods %}
11-
{%- if not item.startswith('_') or item in ['__call__'] %}
12-
{{ name }}.{{ item }}
13-
{%- endif -%}
14-
{%- endfor %}
5+
.. autoclass:: {{ objname }}
156

16-
{% endif %}
17-
{% endblock %}
7+
{% block methods %}
188

19-
{% block attributes %}
20-
{% if attributes %}
9+
{% block attributes %}
10+
{% if attributes %}
11+
.. rubric:: {{ _('Attributes') }}
2112

22-
..
23-
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
2413
.. autosummary::
25-
:toctree:
26-
{% for item in all_attributes %}
27-
{%- if not item.startswith('_') %}
28-
{{ name }}.{{ item }}
29-
{%- endif -%}
30-
{%- endfor %}
14+
{% for item in attributes %}
15+
{% if item in members and not item.startswith('_') %}
16+
~{{ name }}.{{ item }}
17+
{% endif %}
18+
{%- endfor %}
19+
{% endif %}
20+
{% endblock %}
21+
22+
{% if methods %}
23+
.. rubric:: {{ _('Methods') }}
3124

32-
{% endif %}
33-
{% endblock %}
25+
.. autosummary::
26+
{% for item in methods %}
27+
{% if item in members and (not item.startswith('_') or item in ['__call__']) %}
28+
~{{ name }}.{{ item }}
29+
{% endif %}
30+
{%- endfor %}
31+
{% endif %}
32+
{% endblock %}

doc/source/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
# to ensure that include files (partial pages) aren't built, exclude them
7777
# https://github.com/sphinx-doc/sphinx/issues/1965#issuecomment-124732907
7878
"**/includes/**",
79-
"**/api/pandas.Series.dt.rst",
8079
]
8180
try:
8281
import nbconvert
@@ -130,6 +129,8 @@
130129
autodoc_typehints = "none"
131130

132131
# numpydoc
132+
numpydoc_show_class_members = False
133+
numpydoc_show_inherited_class_members = False
133134
numpydoc_attributes_as_param_list = False
134135

135136
# matplotlib plot directive

doc/source/development/contributing_codebase.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ install pandas) by typing::
754754
your installation is probably fine and you can start contributing!
755755

756756
Often it is worth running only a subset of tests first around your changes before running the
757-
entire suite (tip: you can use the [pandas-coverage app](https://pandas-coverage-12d2130077bc.herokuapp.com/))
757+
entire suite (tip: you can use the `pandas-coverage app <https://pandas-coverage-12d2130077bc.herokuapp.com/>`_)
758758
to find out which tests hit the lines of code you've modified, and then run only those).
759759

760760
The easiest way to do this is with::

doc/source/development/contributing_environment.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ due to limitations in setuptools.
214214

215215
The newer build system, invokes the meson backend through pip (via a `PEP 517 <https://peps.python.org/pep-0517/>`_ build).
216216
It automatically uses all available cores on your CPU, and also avoids the need for manual rebuilds by
217-
rebuilding automatically whenever pandas is imported(with an editable install).
217+
rebuilding automatically whenever pandas is imported (with an editable install).
218218

219219
For these reasons, you should compile pandas with meson.
220220
Because the meson build system is newer, you may find bugs/minor issues as it matures. You can report these bugs
@@ -228,6 +228,14 @@ To compile pandas with meson, run::
228228
# If you do not want to see this, omit everything after --no-build-isolation
229229
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
230230

231+
.. note::
232+
The version number is pulled from the latest repository tag. Be sure to fetch the latest tags from upstream
233+
before building::
234+
235+
# set the upstream repository, if not done already, and fetch the latest tags
236+
git remote add upstream https://github.com/pandas-dev/pandas.git
237+
git fetch upstream --tags
238+
231239
**Build options**
232240

233241
It is possible to pass options from the pip frontend to the meson backend if you would like to configure your

doc/source/getting_started/install.rst

-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,6 @@ Installable with ``pip install "pandas[compression]"``
412412
========================= ================== =============== =============================================================
413413
Dependency Minimum Version pip extra Notes
414414
========================= ================== =============== =============================================================
415-
brotli 0.7.0 compression Brotli compression
416-
python-snappy 0.6.1 compression Snappy compression
417415
Zstandard 0.17.0 compression Zstandard compression
418416
========================= ================== =============== =============================================================
419417

doc/source/reference/series.rst

+13-16
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,19 @@ pandas provides dtype-specific methods under various accessors.
273273
These are separate namespaces within :class:`Series` that only apply
274274
to specific data types.
275275

276+
.. autosummary::
277+
:toctree: api/
278+
:nosignatures:
279+
:template: autosummary/accessor.rst
280+
281+
Series.str
282+
Series.cat
283+
Series.dt
284+
Series.sparse
285+
DataFrame.sparse
286+
Index.str
287+
288+
276289
=========================== =================================
277290
Data Type Accessor
278291
=========================== =================================
@@ -458,22 +471,6 @@ strings and apply several methods to it. These can be accessed like
458471
Series.str.isdecimal
459472
Series.str.get_dummies
460473

461-
..
462-
The following is needed to ensure the generated pages are created with the
463-
correct template (otherwise they would be created in the Series/Index class page)
464-
465-
..
466-
.. autosummary::
467-
:toctree: api/
468-
:template: autosummary/accessor.rst
469-
470-
Series.str
471-
Series.cat
472-
Series.dt
473-
Series.sparse
474-
DataFrame.sparse
475-
Index.str
476-
477474
.. _api.series.cat:
478475

479476
Categorical accessor

0 commit comments

Comments
 (0)