Skip to content

Commit 29a52be

Browse files
Merge remote-tracking branch 'neurodata/submodulev3' into submodulev3
2 parents 3ba5f74 + d455aa1 commit 29a52be

File tree

781 files changed

+21873
-27052
lines changed

Some content is hidden

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

781 files changed

+21873
-27052
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ d4aad64b1eb2e42e76f49db2ccfbe4b4660d092b
3131

3232
# PR 26649: Add isort and ruff rules
3333
42173fdb34b5aded79664e045cada719dfbe39dc
34+
35+
# PR #28802: Update black to 24.3.0
36+
c4c546355667b070edd5c892b206aa4a97af9a0b

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions as recommended in SPEC8:
4+
# https://github.com/scientific-python/specs/pull/325
5+
# At the time of writing, release critical workflows such as
6+
# pypa/gh-action-pypi-publish should use hash-based versioning for security
7+
# reasons. This strategy may be generalized to all other github actions
8+
# in the future.
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "monthly"
13+
groups:
14+
actions:
15+
patterns:
16+
- "*"
17+
labels:
18+
- "Build / CI"
19+
- "dependencies"
20+
reviewers:
21+
- "scikit-learn/core-devs"

.github/workflows/check-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
run: |
1717
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
1818
echo "TAGGED_MILESTONE=${{ github.event.pull_request.milestone.title }}" >> $GITHUB_ENV
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
with:
2121
fetch-depth: '0'
2222
- name: Check the changelog entry

.github/workflows/check-sdist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- uses: actions/setup-python@v5
1616
with:
1717
python-version: '3.9'

.github/workflows/cuda-gpu-ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CUDA GPU
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
pr_id:
6+
description: Test the contents of this Pull Request
7+
required: true
8+
9+
permissions: read-all
10+
11+
jobs:
12+
tests:
13+
runs-on:
14+
group: cuda-gpu-runner-group
15+
name: Run Array API unit tests
16+
steps:
17+
- uses: actions/setup-python@v5
18+
with:
19+
# XXX: The 3.12.4 release of Python on GitHub Actions is corrupted:
20+
# https://github.com/actions/setup-python/issues/886
21+
python-version: '3.12.3'
22+
- name: Checkout main repository
23+
uses: actions/checkout@v4
24+
- run: |
25+
git fetch origin +refs/pull/${{ inputs.pr_id }}/head:pr-${{ inputs.pr_id }}
26+
git checkout pr-${{ inputs.pr_id }}
27+
echo "Checked out commit $(git rev-parse HEAD)"
28+
- name: Cache conda environment
29+
id: cache-conda
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/conda
33+
key: ${{ runner.os }}-build-${{ hashFiles('build_tools/github/create_gpu_environment.sh') }}-${{ hashFiles('build_tools/github/pylatest_conda_forge_cuda_array-api_linux-64_conda.lock') }}
34+
- name: Install miniforge
35+
if: ${{ steps.cache-conda.outputs.cache-hit != 'true' }}
36+
run: bash build_tools/github/create_gpu_environment.sh
37+
- name: Install scikit-learn
38+
run: |
39+
source "${HOME}/conda/etc/profile.d/conda.sh"
40+
conda activate sklearn
41+
pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable .
42+
- name: Run array API tests
43+
run: |
44+
source "${HOME}/conda/etc/profile.d/conda.sh"
45+
conda activate sklearn
46+
pytest -k 'array_api'

.github/workflows/labeler-title-regex.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
labeler:
1616
runs-on: ubuntu-20.04
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- uses: actions/setup-python@v5
2020
with:
2121
python-version: '3.9'

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
ref: ${{ github.event.pull_request.head.sha }}
2626

@@ -52,7 +52,7 @@ jobs:
5252
5353
- name: Upload Artifact
5454
if: always()
55-
uses: actions/upload-artifact@v3
55+
uses: actions/upload-artifact@v4
5656
with:
5757
name: lint-log
5858
path: |
@@ -72,7 +72,7 @@ jobs:
7272

7373
steps:
7474
- name: Checkout code
75-
uses: actions/checkout@v3
75+
uses: actions/checkout@v4
7676

7777
- name: Set up Python
7878
uses: actions/setup-python@v5
@@ -84,7 +84,7 @@ jobs:
8484

8585
- name: Download artifact
8686
id: download-artifact
87-
uses: actions/download-artifact@v3
87+
uses: actions/download-artifact@v4
8888
with:
8989
name: lint-log
9090

.github/workflows/publish_pypi.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# IMPORTANT: this permission is mandatory for trusted publishing
1919
id-token: write
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.8'
@@ -39,10 +39,13 @@ jobs:
3939
run: |
4040
python build_tools/github/check_wheels.py
4141
- name: Publish package to TestPyPI
42-
uses: pypa/gh-action-pypi-publish@v1.8.5
42+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
4343
with:
44-
repository_url: https://test.pypi.org/legacy/
44+
repository-url: https://test.pypi.org/legacy/
45+
print-hash: true
4546
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
4647
- name: Publish package to PyPI
47-
uses: pypa/gh-action-pypi-publish@v1.8.5
48+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
4849
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}
50+
with:
51+
print-hash: true

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
schedule:
77
- cron: '0 5 * * 1'
88

9+
# XXX Set the right permissions, per step??
10+
# Can we set read only at the global level here and then elevate to write for some steps?
11+
#permissions: read-all
12+
913
jobs:
1014
update_lock_files:
1115
if: github.repository == 'scikit-learn/scikit-learn'
@@ -25,9 +29,8 @@ jobs:
2529
- name: cirrus-arm
2630
update_script_args: "--select-tag arm"
2731
additional_commit_message: "[cirrus arm]"
28-
- name: pypy
29-
update_script_args: "--select-tag pypy"
30-
additional_commit_message: "[pypy]"
32+
- name: array-api
33+
update_script_args: "--select-tag cuda"
3134

3235
steps:
3336
- uses: actions/checkout@v4
@@ -43,7 +46,7 @@ jobs:
4346
4447
- name: Create Pull Request
4548
id: cpr
46-
uses: peter-evans/create-pull-request@v5
49+
uses: peter-evans/create-pull-request@v6
4750
with:
4851
token: ${{ secrets.BOT_GITHUB_TOKEN }}
4952
push-to-fork: scikit-learn-bot/scikit-learn
@@ -59,6 +62,14 @@ jobs:
5962
### Note
6063
If the CI tasks fail, create a new branch based on this PR and add the required fixes to that branch.
6164
65+
# The CUDA workflow needs to be triggered explicitly as it uses an expensive runner
66+
- name: Trigger additional tests
67+
if: steps.cpr.outputs.pull-request-number != '' && matrix.name == 'array-api'
68+
env:
69+
GH_TOKEN: ${{ github.token }}
70+
run: |
71+
gh workflow run .github/workflows/cuda-gpu-ci.yml -f pr_id=${{steps.cpr.outputs.pull-request-number}}
72+
6273
- name: Check Pull Request
6374
if: steps.cpr.outputs.pull-request-number != ''
6475
run: |

.github/workflows/update_tracking_issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
if: github.repository == 'scikit-learn/scikit-learn' && github.event_name == 'schedule'
2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
- uses: actions/setup-python@v5
3131
with:
3232
python-version: '3.9'

.github/workflows/wheels.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: Checkout scikit-learn
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
ref: ${{ github.event.pull_request.head.sha }}
3838

@@ -53,8 +53,6 @@ jobs:
5353
matrix:
5454
include:
5555
# Window 64 bit
56-
# Note: windows-2019 is needed for older Python versions:
57-
# https://github.com/scikit-learn/scikit-learn/issues/22530
5856
- os: windows-latest
5957
python: 39
6058
platform_id: win_amd64
@@ -90,16 +88,16 @@ jobs:
9088
manylinux_image: manylinux2014
9189

9290
# MacOS x86_64
93-
- os: macos-latest
91+
- os: macos-12
9492
python: 39
9593
platform_id: macosx_x86_64
96-
- os: macos-latest
94+
- os: macos-12
9795
python: 310
9896
platform_id: macosx_x86_64
99-
- os: macos-latest
97+
- os: macos-12
10098
python: 311
10199
platform_id: macosx_x86_64
102-
- os: macos-latest
100+
- os: macos-12
103101
python: 312
104102
platform_id: macosx_x86_64
105103

@@ -119,7 +117,7 @@ jobs:
119117

120118
steps:
121119
- name: Checkout scikit-learn
122-
uses: actions/checkout@v3
120+
uses: actions/checkout@v4
123121

124122
- name: Setup Python
125123
uses: actions/setup-python@v5
@@ -177,8 +175,9 @@ jobs:
177175
run: bash build_tools/wheels/build_wheels.sh
178176

179177
- name: Store artifacts
180-
uses: actions/upload-artifact@v3
178+
uses: actions/upload-artifact@v4
181179
with:
180+
name: cibw-wheels-cp${{ matrix.python }}-${{ matrix.platform_id }}
182181
path: wheelhouse/*.whl
183182

184183
update-tracker:
@@ -199,7 +198,7 @@ jobs:
199198

200199
steps:
201200
- name: Checkout scikit-learn
202-
uses: actions/checkout@v3
201+
uses: actions/checkout@v4
203202

204203
- name: Setup Python
205204
uses: actions/setup-python@v5
@@ -217,8 +216,9 @@ jobs:
217216
SKLEARN_SKIP_NETWORK_TESTS: 1
218217

219218
- name: Store artifacts
220-
uses: actions/upload-artifact@v3
219+
uses: actions/upload-artifact@v4
221220
with:
221+
name: cibw-sdist
222222
path: dist/*.tar.gz
223223

224224
# Upload the wheels and the source distribution
@@ -232,12 +232,14 @@ jobs:
232232

233233
steps:
234234
- name: Checkout scikit-learn
235-
uses: actions/checkout@v3
235+
uses: actions/checkout@v4
236236

237237
- name: Download artifacts
238-
uses: actions/download-artifact@v3
238+
uses: actions/download-artifact@v4
239239
with:
240+
pattern: cibw-*
240241
path: dist
242+
merge-multiple: true
241243

242244
- name: Setup Python
243245
uses: actions/setup-python@v5

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ dist/
1515
MANIFEST
1616
doc/sg_execution_times.rst
1717
doc/_build/
18+
doc/api/*.rst
1819
doc/auto_examples/
20+
doc/css/*
21+
!doc/css/.gitkeep
1922
doc/modules/generated/
2023
doc/datasets/generated/
24+
doc/index.rst
2125
doc/min_dependency_table.rst
2226
doc/min_dependency_substitutions.rst
2327
*.pdf
@@ -55,6 +59,7 @@ examples/cluster/joblib
5559
reuters/
5660
benchmarks/bench_covertype_data/
5761
benchmarks/HIGGS.csv.gz
62+
bench_pca_solvers.csv
5863

5964
*.prefs
6065
.pydevproject

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ repos:
2727
# TODO: add the double-quote-cython-strings hook when it's usability has improved:
2828
# possibility to pass a directory and use it as a check instead of auto-formatter.
2929
- id: cython-lint
30+
- repo: https://github.com/pre-commit/mirrors-prettier
31+
rev: v2.7.1
32+
hooks:
33+
- id: prettier
34+
files: ^doc/scss/|^doc/js/scripts/
35+
exclude: ^doc/js/scripts/vendor/
36+
types_or: ["scss", "javascript"]

0 commit comments

Comments
 (0)