Skip to content

Commit 9fe8154

Browse files
committed
Merge branch 'main' into 37715-remove-mypy-ignore-V
2 parents d9c1292 + 4bb8ce7 commit 9fe8154

File tree

209 files changed

+4308
-2052
lines changed

Some content is hidden

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

209 files changed

+4308
-2052
lines changed

.github/workflows/32-bit-linux.yml

-58
This file was deleted.

.github/workflows/asv-bot.yml

-78
This file was deleted.

.github/workflows/comment-commands.yml

+76-11
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,83 @@ permissions:
1111
jobs:
1212
issue_assign:
1313
runs-on: ubuntu-22.04
14+
if: (!github.event.issue.pull_request) && github.event.comment.body == 'take'
15+
concurrency:
16+
group: ${{ github.actor }}-issue-assign
1417
steps:
15-
- if: (!github.event.issue.pull_request) && github.event.comment.body == 'take'
16-
run: |
17-
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
18-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
18+
- run: |
19+
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
20+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
1921
preview_docs:
2022
runs-on: ubuntu-22.04
23+
if: github.event.issue.pull_request && github.event.comment.body == '/preview'
24+
concurrency:
25+
group: ${{ github.actor }}-preview-docs
2126
steps:
22-
- if: github.event.issue.pull_request && github.event.comment.body == '/preview'
23-
run: |
24-
if curl --output /dev/null --silent --head --fail "https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"; then
25-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "Website preview of this PR available at: https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
26-
else
27-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "No preview found for PR #${{ github.event.issue.number }}. Did the docs build complete?"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
28-
fi
27+
- run: |
28+
if curl --output /dev/null --silent --head --fail "https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"; then
29+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "Website preview of this PR available at: https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
30+
else
31+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "No preview found for PR #${{ github.event.issue.number }}. Did the docs build complete?"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
32+
fi
33+
asv_run:
34+
runs-on: ubuntu-22.04
35+
# TODO: Support more benchmarking options later, against different branches, against self, etc
36+
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '@github-actions benchmark')
37+
defaults:
38+
run:
39+
shell: bash -el {0}
40+
env:
41+
ENV_FILE: environment.yml
42+
COMMENT: ${{github.event.comment.body}}
43+
44+
concurrency:
45+
# Set concurrency to prevent abuse(full runs are ~5.5 hours !!!)
46+
# each user can only run one concurrent benchmark bot at a time
47+
# We don't cancel in progress jobs, but if you want to benchmark multiple PRs, you're gonna have
48+
# to wait
49+
group: ${{ github.actor }}-asv
50+
cancel-in-progress: false
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
58+
# Although asv sets up its own env, deps are still needed
59+
# during discovery process
60+
- name: Set up Conda
61+
uses: ./.github/actions/setup-conda
62+
63+
- name: Run benchmarks
64+
id: bench
65+
continue-on-error: true # asv will exit code 1 for regressions
66+
run: |
67+
# extracting the regex, see https://stackoverflow.com/a/36798723
68+
REGEX=$(echo "$COMMENT" | sed -n "s/^.*-b\s*\(\S*\).*$/\1/p")
69+
cd asv_bench
70+
asv check -E existing
71+
git remote add upstream https://github.com/pandas-dev/pandas.git
72+
git fetch upstream
73+
asv machine --yes
74+
asv continuous -f 1.1 -b $REGEX upstream/main HEAD
75+
echo 'BENCH_OUTPUT<<EOF' >> $GITHUB_ENV
76+
asv compare -f 1.1 upstream/main HEAD >> $GITHUB_ENV
77+
echo 'EOF' >> $GITHUB_ENV
78+
echo "REGEX=$REGEX" >> $GITHUB_ENV
79+
80+
- uses: actions/github-script@v6
81+
env:
82+
BENCH_OUTPUT: ${{env.BENCH_OUTPUT}}
83+
REGEX: ${{env.REGEX}}
84+
with:
85+
script: |
86+
const ENV_VARS = process.env
87+
const run_url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`
88+
github.rest.issues.createComment({
89+
issue_number: context.issue.number,
90+
owner: context.repo.owner,
91+
repo: context.repo.repo,
92+
body: '\nBenchmarks completed. View runner logs here.' + run_url + '\nRegex used: '+ 'regex ' + ENV_VARS["REGEX"] + '\n' + ENV_VARS["BENCH_OUTPUT"]
93+
})

.github/workflows/macos-windows.yml

-60
This file was deleted.

.github/workflows/python-dev.yml

-95
This file was deleted.

0 commit comments

Comments
 (0)