Skip to content

Commit a569233

Browse files
committed
Merging main
Signed-off-by: Adam Li <adam2392@gmail.com>
2 parents 4fd15fd + 4c78d7c commit a569233

File tree

273 files changed

+3667
-2375
lines changed

Some content is hidden

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

273 files changed

+3667
-2375
lines changed

.github/workflows/check-changelog.yml

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,30 @@ name: Check Changelog
44
# To bypass this check, label the PR with "No Changelog Needed".
55
on:
66
pull_request:
7-
types: [opened, edited, labeled, unlabeled, synchronize]
7+
types: [opened, synchronize, labeled, unlabeled]
88

99
jobs:
1010
check:
1111
name: A reviewer will let you know if it is required or can be bypassed
1212
runs-on: ubuntu-latest
13-
if: ${{ contains(github.event.pull_request.labels.*.name, 'No Changelog Needed') == 0 }}
1413
steps:
15-
- name: Get PR number and milestone
16-
run: |
17-
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
18-
echo "TAGGED_MILESTONE=${{ github.event.pull_request.milestone.title }}" >> $GITHUB_ENV
1914
- uses: actions/checkout@v4
2015
with:
2116
fetch-depth: '0'
22-
- name: Check the changelog entry
17+
- name: Check if tests have changed
18+
id: tests_changed
2319
run: |
2420
set -xe
2521
changed_files=$(git diff --name-only origin/main)
2622
# Changelog should be updated only if tests have been modified
27-
if [[ ! "$changed_files" =~ tests ]]
28-
then
29-
exit 0
30-
fi
31-
all_changelogs=$(cat ./doc/whats_new/v*.rst)
32-
if [[ "$all_changelogs" =~ :pr:\`$PR_NUMBER\` ]]
23+
if [[ "$changed_files" =~ tests ]]
3324
then
34-
echo "Changelog has been updated."
35-
# If the pull request is milestoned check the correspondent changelog
36-
if exist -f ./doc/whats_new/v${TAGGED_MILESTONE:0:4}.rst
37-
then
38-
expected_changelog=$(cat ./doc/whats_new/v${TAGGED_MILESTONE:0:4}.rst)
39-
if [[ "$expected_changelog" =~ :pr:\`$PR_NUMBER\` ]]
40-
then
41-
echo "Changelog and milestone correspond."
42-
else
43-
echo "Changelog and milestone do not correspond."
44-
echo "If you see this error make sure that the tagged milestone for the PR"
45-
echo "and the edited changelog filename properly match."
46-
exit 1
47-
fi
48-
fi
49-
else
50-
echo "A Changelog entry is missing."
51-
echo ""
52-
echo "Please add an entry to the changelog at 'doc/whats_new/v*.rst'"
53-
echo "to document your change assuming that the PR will be merged"
54-
echo "in time for the next release of scikit-learn."
55-
echo ""
56-
echo "Look at other entries in that file for inspiration and please"
57-
echo "reference this pull request using the ':pr:' directive and"
58-
echo "credit yourself (and other contributors if applicable) with"
59-
echo "the ':user:' directive."
60-
echo ""
61-
echo "If you see this error and there is already a changelog entry,"
62-
echo "check that the PR number is correct."
63-
echo ""
64-
echo "If you believe that this PR does not warrant a changelog"
65-
echo "entry, say so in a comment so that a maintainer will label"
66-
echo "the PR with 'No Changelog Needed' to bypass this check."
67-
exit 1
25+
echo "check_changelog=true" >> $GITHUB_OUTPUT
6826
fi
27+
28+
- name: Check changelog entry
29+
if: steps.tests_changed.outputs.check_changelog == 'true'
30+
uses: scientific-python/action-towncrier-changelog@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
BOT_USERNAME: changelog-bot

.github/workflows/update-lock-files.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,15 @@ jobs:
6363
if: steps.cpr.outputs.pull-request-number != '' && matrix.name == 'array-api'
6464
env:
6565
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
66+
PR_NUMBER: ${{steps.cpr.outputs.pull-request-number}}
6667
run: |
67-
gh pr edit ${{steps.cpr.outputs.pull-request-number}} --add-label "CUDA CI"
68+
curl -L \
69+
-X POST \
70+
-H "Accept: application/vnd.github+json" \
71+
-H "Authorization: Bearer $GH_TOKEN" \
72+
-H "X-GitHub-Api-Version: 2022-11-28" \
73+
https://api.github.com/repos/scikit-learn/scikit-learn/issues/$PR_NUMBER/labels \
74+
-d '{"labels":["CUDA CI"]}'
6875
6976
- name: Check Pull Request
7077
if: steps.cpr.outputs.pull-request-number != ''

.github/workflows/wheels.yml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
build_wheels:
4545
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
4646
runs-on: ${{ matrix.os }}
47+
48+
# For conda-incubator/setup-miniconda to work
49+
defaults:
50+
run:
51+
shell: bash -el {0}
4752
needs: check_build_trigger
4853
if: needs.check_build_trigger.outputs.build
4954

@@ -102,22 +107,22 @@ jobs:
102107
free_threaded_support: True
103108

104109
# MacOS x86_64
105-
- os: macos-12
110+
- os: macos-13
106111
python: 39
107112
platform_id: macosx_x86_64
108-
- os: macos-12
113+
- os: macos-13
109114
python: 310
110115
platform_id: macosx_x86_64
111-
- os: macos-12
116+
- os: macos-13
112117
python: 311
113118
platform_id: macosx_x86_64
114-
- os: macos-12
119+
- os: macos-13
115120
python: 312
116121
platform_id: macosx_x86_64
117-
- os: macos-12
122+
- os: macos-13
118123
python: 313
119124
platform_id: macosx_x86_64
120-
- os: macos-12
125+
- os: macos-13
121126
python: 313t
122127
platform_id: macosx_x86_64
123128
free_threaded_support: True
@@ -152,33 +157,8 @@ jobs:
152157
with:
153158
python-version: "3.11" # update once build dependencies are available
154159

155-
- name: Install conda for macos arm64
156-
if: ${{ matrix.platform_id == 'macosx_arm64' }}
157-
run: |
158-
set -ex
159-
# macos arm64 runners do not have conda installed. Thus we much install conda manually
160-
EXPECTED_SHA="dd832d8a65a861b5592b2cf1d55f26031f7c1491b30321754443931e7b1e6832"
161-
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh"
162-
curl -L --retry 10 $MINIFORGE_URL -o miniforge.sh
163-
164-
# Check SHA
165-
file_sha=$(shasum -a 256 miniforge.sh | awk '{print $1}')
166-
if [ "$EXPECTED_SHA" != "$file_sha" ]; then
167-
echo "SHA values did not match!"
168-
exit 1
169-
fi
170-
171-
# Install miniforge
172-
MINIFORGE_PATH=$HOME/miniforge
173-
bash ./miniforge.sh -b -p $MINIFORGE_PATH
174-
echo "$MINIFORGE_PATH/bin" >> $GITHUB_PATH
175-
echo "CONDA_HOME=$MINIFORGE_PATH" >> $GITHUB_ENV
176-
177-
- name: Set conda environment for non-macos arm64 environments
178-
if: ${{ matrix.platform_id != 'macosx_arm64' }}
179-
run: |
180-
# Non-macos arm64 envrionments already have conda installed
181-
echo "CONDA_HOME=/usr/local/miniconda" >> $GITHUB_ENV
160+
- uses: conda-incubator/setup-miniconda@v3
161+
if: ${{ startsWith(matrix.platform_id, 'macosx') }}
182162

183163
- name: Build and test wheels
184164
env:

build_tools/azure/debian_32bit_lock.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# pip-compile --output-file=build_tools/azure/debian_32bit_lock.txt build_tools/azure/debian_32bit_requirements.txt
66
#
7-
coverage[toml]==7.6.1
7+
coverage[toml]==7.6.3
88
# via pytest-cov
99
cython==3.0.11
1010
# via -r build_tools/azure/debian_32bit_requirements.txt
@@ -25,7 +25,7 @@ packaging==24.1
2525
# pytest
2626
pluggy==1.5.0
2727
# via pytest
28-
pyproject-metadata==0.8.0
28+
pyproject-metadata==0.8.1
2929
# via meson-python
3030
pytest==8.3.3
3131
# via

0 commit comments

Comments
 (0)