Skip to content

Commit 1ee9ad9

Browse files
committed
Merge branch 'main' into ref-get_values_for_loc
2 parents 90c2518 + c152288 commit 1ee9ad9

File tree

530 files changed

+13522
-9308
lines changed

Some content is hidden

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

530 files changed

+13522
-9308
lines changed

.github/ISSUE_TEMPLATE/feature_request.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ body:
6868
attributes:
6969
label: Additional Context
7070
description: >
71-
Please provide any relevant Github issues, code examples or references that help describe and support
71+
Please provide any relevant GitHub issues, code examples or references that help describe and support
7272
the feature request.

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
1+
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
22
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
33
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
44
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
8282

8383
- name: Upload prod docs
84-
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/version/${GITHUB_REF_NAME}
84+
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/version/${GITHUB_REF_NAME:1}
8585
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
8686

8787
- name: Move docs into site directory

.github/workflows/macos-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows-MacOS
1+
name: Windows-macOS
22

33
on:
44
push:

.github/workflows/python-dev.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# In general, this file will remain frozen(present, but not running) until:
55
# - The next unreleased Python version has released beta 1
6-
# - This version should be available on Github Actions.
6+
# - This version should be available on GitHub Actions.
77
# - Our required build/runtime dependencies(numpy, pytz, Cython, python-dateutil)
88
# support that unreleased Python version.
99
# To unfreeze, comment out the ``if: false`` condition, and make sure you update
@@ -54,7 +54,7 @@ jobs:
5454
os: [ubuntu-latest, macOS-latest, windows-latest]
5555

5656
name: actions-311-dev
57-
timeout-minutes: 80
57+
timeout-minutes: 120
5858

5959
concurrency:
6060
#https://github.community/t/concurrecy-not-work-for-push/183068/7
@@ -75,15 +75,16 @@ jobs:
7575
run: |
7676
python --version
7777
python -m pip install --upgrade pip setuptools wheel
78-
python -m pip install git+https://github.com/numpy/numpy.git
78+
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
7979
python -m pip install git+https://github.com/nedbat/coveragepy.git
8080
python -m pip install python-dateutil pytz cython hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
8181
python -m pip list
8282
83+
# GH 47305: Parallel build can cause flaky ImportError from pandas/_libs/tslibs
8384
- name: Build Pandas
8485
run: |
85-
python setup.py build_ext -q -j2
86-
python -m pip install -e . --no-build-isolation --no-use-pep517
86+
python setup.py build_ext -q -j1
87+
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
8788
8889
- name: Build Version
8990
run: |

.github/workflows/scorecards.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Scorecards supply-chain security
2+
on:
3+
# Only the default branch is supported.
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '27 19 * * 4'
7+
push:
8+
branches: [ "main" ]
9+
10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard.
19+
security-events: write
20+
# Used to receive a badge.
21+
id-token: write
22+
23+
if: github.repository == 'pandas-dev/pandas' # don't run on forks
24+
25+
steps:
26+
- name: "Checkout code"
27+
uses: actions/checkout@v3
28+
with:
29+
persist-credentials: false
30+
31+
- name: "Run analysis"
32+
uses: ossf/[email protected]
33+
with:
34+
results_file: results.sarif
35+
results_format: sarif
36+
37+
# Publish the results for public repositories to enable scorecard badges. For more details, see
38+
# https://github.com/ossf/scorecard-action#publishing-results.
39+
publish_results: true
40+
41+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
42+
# format to the repository Actions tab.
43+
- name: "Upload artifact"
44+
uses: actions/upload-artifact@v3
45+
with:
46+
name: SARIF file
47+
path: results.sarif
48+
retention-days: 5
49+
50+
# Upload the results to GitHub's code scanning dashboard.
51+
- name: "Upload to code-scanning"
52+
uses: github/codeql-action/upload-sarif@v1
53+
with:
54+
sarif_file: results.sarif

.github/workflows/ubuntu.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ jobs:
3131
matrix:
3232
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
3333
pattern: ["not single_cpu", "single_cpu"]
34-
# Don't test pyarrow v2/3: Causes timeouts in read_csv engine
35-
# even if tests are skipped/xfailed
36-
pyarrow_version: ["5", "6", "7"]
34+
pyarrow_version: ["7", "8", "9"]
3735
include:
3836
- name: "Downstream Compat"
3937
env_file: actions-38-downstream_compat.yaml
@@ -77,7 +75,6 @@ jobs:
7775
- name: "Numpy Dev"
7876
env_file: actions-310-numpydev.yaml
7977
pattern: "not slow and not network and not single_cpu"
80-
pandas_testing_mode: "deprecate"
8178
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
8279
exclude:
8380
- env_file: actions-39.yaml
@@ -96,7 +93,6 @@ jobs:
9693
EXTRA_APT: ${{ matrix.extra_apt || '' }}
9794
LANG: ${{ matrix.lang || '' }}
9895
LC_ALL: ${{ matrix.lc_all || '' }}
99-
PANDAS_TESTING_MODE: ${{ matrix.pandas_testing_mode || '' }}
10096
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}
10197
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
10298
TEST_ARGS: ${{ matrix.test_args || '' }}

.github/workflows/wheels.yml

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# Workflow to build wheels for upload to PyPI.
2+
# Inspired by numpy's cibuildwheel config https://github.com/numpy/numpy/blob/main/.github/workflows/wheels.yml
3+
#
4+
# In an attempt to save CI resources, wheel builds do
5+
# not run on each push but only weekly and for releases.
6+
# Wheel builds can be triggered from the Actions page
7+
# (if you have the perms) on a commit to master.
8+
#
9+
# Alternatively, you can add labels to the pull request in order to trigger wheel
10+
# builds.
11+
# The label(s) that trigger builds are:
12+
# - Build
13+
name: Wheel builder
14+
15+
on:
16+
schedule:
17+
# ┌───────────── minute (0 - 59)
18+
# │ ┌───────────── hour (0 - 23)
19+
# │ │ ┌───────────── day of the month (1 - 31)
20+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
21+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
22+
# │ │ │ │ │
23+
- cron: "27 3 */1 * *"
24+
push:
25+
pull_request:
26+
types: [labeled, opened, synchronize, reopened]
27+
workflow_dispatch:
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
build_wheels:
35+
name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
36+
if: >-
37+
github.event_name == 'schedule' ||
38+
github.event_name == 'workflow_dispatch' ||
39+
(github.event_name == 'pull_request' &&
40+
contains(github.event.pull_request.labels.*.name, 'Build')) ||
41+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
42+
runs-on: ${{ matrix.buildplat[0] }}
43+
strategy:
44+
# Ensure that a wheel builder finishes even if another fails
45+
fail-fast: false
46+
matrix:
47+
# GitHub Actions doesn't support pairing matrix values together, let's improvise
48+
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
49+
buildplat:
50+
- [ubuntu-20.04, manylinux_x86_64]
51+
- [macos-11, macosx_*]
52+
- [windows-2019, win_amd64]
53+
- [windows-2019, win32]
54+
# TODO: support PyPy?
55+
python: [["cp38", "3.8"], ["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11-dev"]]# "pp38", "pp39"]
56+
env:
57+
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
58+
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
59+
steps:
60+
- name: Checkout pandas
61+
uses: actions/checkout@v3
62+
with:
63+
submodules: true
64+
# versioneer.py requires the latest tag to be reachable. Here we
65+
# fetch the complete history to get access to the tags.
66+
# A shallow clone can work when the following issue is resolved:
67+
# https://github.com/actions/checkout/issues/338
68+
fetch-depth: 0
69+
70+
- name: Build wheels
71+
uses: pypa/[email protected]
72+
env:
73+
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
74+
75+
# Used to test the built wheels
76+
- uses: actions/setup-python@v3
77+
with:
78+
python-version: ${{ matrix.python[1] }}
79+
80+
- name: Test wheels (Windows 64-bit only)
81+
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
82+
shell: cmd
83+
run: |
84+
python ci/test_wheels.py wheelhouse
85+
86+
- uses: actions/upload-artifact@v3
87+
with:
88+
name: ${{ matrix.python[0] }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
89+
path: ./wheelhouse/*.whl
90+
91+
# Used to push the built wheels
92+
# TODO: once Python 3.11 is available on conda, de-dup with
93+
# setup python above
94+
- uses: conda-incubator/setup-miniconda@v2
95+
with:
96+
auto-update-conda: true
97+
# Really doesn't matter what version we upload with
98+
# just the version we test with
99+
python-version: '3.8'
100+
channels: conda-forge
101+
channel-priority: true
102+
mamba-version: "*"
103+
104+
- name: Install anaconda client
105+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
106+
run: conda install -q -y anaconda-client
107+
108+
109+
- name: Upload wheels
110+
if: success()
111+
shell: bash -el {0}
112+
env:
113+
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
114+
PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
115+
run: |
116+
source ci/upload_wheels.sh
117+
set_upload_vars
118+
# trigger an upload to
119+
# https://anaconda.org/scipy-wheels-nightly/pandas
120+
# for cron jobs or "Run workflow" (restricted to main branch).
121+
# Tags will upload to
122+
# https://anaconda.org/multibuild-wheels-staging/pandas
123+
# The tokens were originally generated at anaconda.org
124+
upload_wheels
125+
build_sdist:
126+
name: Build sdist
127+
if: >-
128+
github.event_name == 'schedule' ||
129+
github.event_name == 'workflow_dispatch' ||
130+
(github.event_name == 'pull_request' &&
131+
contains(github.event.pull_request.labels.*.name, 'Build')) ||
132+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
133+
runs-on: ubuntu-latest
134+
env:
135+
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
136+
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
137+
steps:
138+
- name: Checkout pandas
139+
uses: actions/checkout@v3
140+
with:
141+
submodules: true
142+
# versioneer.py requires the latest tag to be reachable. Here we
143+
# fetch the complete history to get access to the tags.
144+
# A shallow clone can work when the following issue is resolved:
145+
# https://github.com/actions/checkout/issues/338
146+
fetch-depth: 0
147+
148+
# Used to push the built sdist
149+
- uses: conda-incubator/setup-miniconda@v2
150+
with:
151+
auto-update-conda: true
152+
# Really doesn't matter what version we upload with
153+
# just the version we test with
154+
python-version: '3.8'
155+
channels: conda-forge
156+
channel-priority: true
157+
mamba-version: "*"
158+
159+
- name: Build sdist
160+
run: |
161+
pip install build
162+
python -m build --sdist
163+
- name: Test the sdist
164+
shell: bash -el {0}
165+
run: |
166+
# TODO: Don't run test suite, and instead build wheels from sdist
167+
# by splitting the wheel builders into a two stage job
168+
# (1. Generate sdist 2. Build wheels from sdist)
169+
# This tests the sdists, and saves some build time
170+
python -m pip install dist/*.gz
171+
pip install hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-asyncio>=0.17
172+
cd .. # Not a good idea to test within the src tree
173+
python -c "import pandas; print(pandas.__version__);
174+
pandas.test(extra_args=['-m not clipboard and not single_cpu', '--skip-slow', '--skip-network', '--skip-db', '-n=2']);
175+
pandas.test(extra_args=['-m not clipboard and single_cpu', '--skip-slow', '--skip-network', '--skip-db'])"
176+
- uses: actions/upload-artifact@v3
177+
with:
178+
name: sdist
179+
path: ./dist/*
180+
181+
- name: Install anaconda client
182+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
183+
run: |
184+
conda install -q -y anaconda-client
185+
186+
- name: Upload sdist
187+
if: success()
188+
shell: bash -el {0}
189+
env:
190+
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
191+
PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
192+
run: |
193+
source ci/upload_wheels.sh
194+
set_upload_vars
195+
# trigger an upload to
196+
# https://anaconda.org/scipy-wheels-nightly/pandas
197+
# for cron jobs or "Run workflow" (restricted to main branch).
198+
# Tags will upload to
199+
# https://anaconda.org/multibuild-wheels-staging/pandas
200+
# The tokens were originally generated at anaconda.org
201+
upload_wheels

0 commit comments

Comments
 (0)