Skip to content

Commit ce09bf0

Browse files
committed
Merge branch 'main' into enh-stata-non-nano
2 parents a6570a3 + cbe1b32 commit ce09bf0

File tree

290 files changed

+3924
-2313
lines changed

Some content is hidden

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

290 files changed

+3924
-2313
lines changed

.circleci/setup_env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ if pip show pandas 1>/dev/null; then
5555
fi
5656

5757
echo "Install pandas"
58-
python -m pip install --no-build-isolation -ve .
58+
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
5959

6060
echo "done"

.github/actions/build_pandas/action.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ runs:
2525
- name: Build Pandas
2626
run: |
2727
if [[ ${{ inputs.editable }} == "true" ]]; then
28-
pip install -e . --no-build-isolation -v --no-deps
28+
pip install -e . --no-build-isolation -v --no-deps \
29+
--config-settings=setup-args="--werror"
2930
else
30-
pip install . --no-build-isolation -v --no-deps
31+
pip install . --no-build-isolation -v --no-deps \
32+
--config-settings=setup-args="--werror"
3133
fi
3234
shell: bash -el {0}

.github/workflows/code-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170

171171
- name: Setup Python
172172
id: setup_python
173-
uses: actions/setup-python@v4
173+
uses: actions/setup-python@v5
174174
with:
175175
python-version: '3.10'
176176
cache: 'pip'

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

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Build Pandas
4747
uses: ./.github/actions/build_pandas
4848

49+
- name: Test website
50+
run: python -m pytest web/
51+
4952
- name: Build website
5053
run: python web/pandas_web.py web/pandas --target-path=web/build
5154

.github/workflows/package-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Setup Python
4242
id: setup_python
43-
uses: actions/setup-python@v4
43+
uses: actions/setup-python@v5
4444
with:
4545
python-version: '3.10'
4646

.github/workflows/stale-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository_owner == 'pandas-dev'
1515
runs-on: ubuntu-22.04
1616
steps:
17-
- uses: actions/stale@v8
17+
- uses: actions/stale@v9
1818
with:
1919
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020
stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this."

.github/workflows/unit-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ jobs:
254254
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
255255
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
256256
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
257-
python -m pip install --no-cache-dir --no-build-isolation -e .
257+
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
258258
python -m pip list --no-cache-dir
259259
export PANDAS_CI=1
260260
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -292,7 +292,7 @@ jobs:
292292
. ~/virtualenvs/pandas-dev/bin/activate
293293
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
294294
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
295-
python -m pip install --no-cache-dir --no-build-isolation -e .
295+
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
296296
python -m pip list --no-cache-dir
297297
298298
- name: Run Tests
@@ -354,7 +354,7 @@ jobs:
354354
fetch-depth: 0
355355

356356
- name: Set up Python Dev Version
357-
uses: actions/setup-python@v4
357+
uses: actions/setup-python@v5
358358
with:
359359
python-version: '3.12-dev'
360360

@@ -365,7 +365,7 @@ jobs:
365365
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
366366
python -m pip install versioneer[toml]
367367
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov
368-
python -m pip install -ve . --no-build-isolation --no-index --no-deps
368+
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
369369
python -m pip list
370370
371371
- name: Run Tests

.github/workflows/wheels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
fetch-depth: 0
5454

5555
- name: Set up Python
56-
uses: actions/setup-python@v4
56+
uses: actions/setup-python@v5
5757
with:
5858
python-version: '3.11'
5959

asv_bench/benchmarks/arithmetic.py

-37
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
date_range,
1313
to_timedelta,
1414
)
15-
from pandas.core.algorithms import checked_add_with_arr
1615

1716
from .pandas_vb_common import numeric_dtypes
1817

@@ -389,42 +388,6 @@ def time_add_timedeltas(self, df):
389388
df["timedelta"] + df["timedelta"]
390389

391390

392-
class AddOverflowScalar:
393-
params = [1, -1, 0]
394-
param_names = ["scalar"]
395-
396-
def setup(self, scalar):
397-
N = 10**6
398-
self.arr = np.arange(N)
399-
400-
def time_add_overflow_scalar(self, scalar):
401-
checked_add_with_arr(self.arr, scalar)
402-
403-
404-
class AddOverflowArray:
405-
def setup(self):
406-
N = 10**6
407-
self.arr = np.arange(N)
408-
self.arr_rev = np.arange(-N, 0)
409-
self.arr_mixed = np.array([1, -1]).repeat(N / 2)
410-
self.arr_nan_1 = np.random.choice([True, False], size=N)
411-
self.arr_nan_2 = np.random.choice([True, False], size=N)
412-
413-
def time_add_overflow_arr_rev(self):
414-
checked_add_with_arr(self.arr, self.arr_rev)
415-
416-
def time_add_overflow_arr_mask_nan(self):
417-
checked_add_with_arr(self.arr, self.arr_mixed, arr_mask=self.arr_nan_1)
418-
419-
def time_add_overflow_b_mask_nan(self):
420-
checked_add_with_arr(self.arr, self.arr_mixed, b_mask=self.arr_nan_1)
421-
422-
def time_add_overflow_both_arg_nan(self):
423-
checked_add_with_arr(
424-
self.arr, self.arr_mixed, arr_mask=self.arr_nan_1, b_mask=self.arr_nan_2
425-
)
426-
427-
428391
hcal = pd.tseries.holiday.USFederalHolidayCalendar()
429392
# These offsets currently raise a NotImplementedError with .apply_index()
430393
non_apply = [

ci/code_checks.sh

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# $ ./ci/code_checks.sh single-docs # check single-page docs build warning-free
1515
# $ ./ci/code_checks.sh notebooks # check execution of documentation notebooks
1616

17+
set -uo pipefail
18+
1719
[[ -z "$1" || "$1" == "code" || "$1" == "doctests" || "$1" == "docstrings" || "$1" == "single-docs" || "$1" == "notebooks" ]] || \
1820
{ echo "Unknown command $1. Usage: $0 [code|doctests|docstrings|single-docs|notebooks]"; exit 9999; }
1921

doc/make.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ def html(self):
236236
os.remove(zip_fname)
237237

238238
if ret_code == 0:
239-
if self.single_doc_html is not None and not self.no_browser:
240-
self._open_browser(self.single_doc_html)
239+
if self.single_doc_html is not None:
240+
if not self.no_browser:
241+
self._open_browser(self.single_doc_html)
241242
else:
242243
self._add_redirects()
243244
if self.whatsnew and not self.no_browser:

0 commit comments

Comments
 (0)