Skip to content

Commit 0d0c449

Browse files
committed
Merge branch 'main' into submodulev3
2 parents d455aa1 + 0ad90d5 commit 0d0c449

File tree

89 files changed

+1396
-553
lines changed

Some content is hidden

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

89 files changed

+1396
-553
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
command: |
1212
source build_tools/shared.sh
1313
# Include pytest compatibility with mypy
14-
pip install pytest ruff $(get_dep mypy min) $(get_dep black min) cython-lint
14+
pip install pytest $(get_dep ruff min) $(get_dep mypy min) $(get_dep black min) cython-lint
1515
- run:
1616
name: linting
1717
command: ./build_tools/linting.sh

.github/workflows/artifact-redirector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Run CircleCI artifacts redirector
1616
steps:
1717
- name: GitHub Action step
18-
uses: larsoner/circleci-artifacts-redirector-action@master
18+
uses: scientific-python/circleci-artifacts-redirector-action@v1
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
api-token: ${{ secrets.CIRCLECI_TOKEN }}

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: CUDA GPU
22
on:
33
workflow_dispatch:
44
inputs:
5-
pr_id:
6-
description: Test the contents of this Pull Request
5+
commit_hash:
6+
description: Commit hash to test
77
required: true
88

99
permissions: read-all
@@ -19,12 +19,13 @@ jobs:
1919
# XXX: The 3.12.4 release of Python on GitHub Actions is corrupted:
2020
# https://github.com/actions/setup-python/issues/886
2121
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)"
22+
- uses: actions/checkout@v4
23+
with:
24+
ref: ${{ inputs.commit_hash }}
25+
- name: PRs associated with commit
26+
run: |
27+
echo "This commit belongs to PR(s):"
28+
git ls-remote origin 'pull/*/head' | grep -F -f <(git rev-parse HEAD) | awk -F'/' '{print $3}'
2829
- name: Cache conda environment
2930
id: cache-conda
3031
uses: actions/cache@v4

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
source build_tools/shared.sh
3535
# Include pytest compatibility with mypy
36-
pip install pytest ruff $(get_dep mypy min) $(get_dep black min) cython-lint
36+
pip install pytest $(get_dep ruff min) $(get_dep mypy min) $(get_dep black min) cython-lint
3737
# we save the versions of the linters to be used in the error message later.
3838
python -c "from importlib.metadata import version; print(f\"ruff={version('ruff')}\")" >> /tmp/versions.txt
3939
python -c "from importlib.metadata import version; print(f\"mypy={version('mypy')}\")" >> /tmp/versions.txt

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
env:
6969
GH_TOKEN: ${{ github.token }}
7070
run: |
71-
gh workflow run .github/workflows/cuda-gpu-ci.yml -f pr_id=${{steps.cpr.outputs.pull-request-number}}
71+
gh workflow run .github/workflows/cuda-gpu-ci.yml -f commit_hash=`git rev-parse HEAD`
7272
7373
- name: Check Pull Request
7474
if: steps.cpr.outputs.pull-request-number != ''

.github/workflows/wheels.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ jobs:
8686
python: 312
8787
platform_id: manylinux_x86_64
8888
manylinux_image: manylinux2014
89+
- os: ubuntu-latest
90+
python: 313t
91+
platform_id: manylinux_x86_64
92+
manylinux_image: manylinux2014
93+
# TODO: remove next line when Python 3.13 is released
94+
prerelease_pythons: True
95+
free_threaded_support: True
8996

9097
# MacOS x86_64
9198
- os: macos-12
@@ -154,7 +161,8 @@ jobs:
154161
155162
- name: Build and test wheels
156163
env:
157-
CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease }}
164+
CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease_pythons }}
165+
CIBW_FREE_THREADED_SUPPORT: ${{ matrix.free_threaded_support }}
158166
CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1
159167
SKLEARN_BUILD_PARALLEL=3
160168
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
@@ -167,7 +175,8 @@ jobs:
167175
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
168176
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir}
169177
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }}
170-
CIBW_TEST_REQUIRES: pytest pandas
178+
CIBW_TEST_REQUIRES: pytest
179+
CIBW_BEFORE_TEST: bash {project}/build_tools/wheels/cibw_before_test.sh
171180
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh
172181
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }}
173182
CIBW_BUILD_VERBOSITY: 1
@@ -249,6 +258,6 @@ jobs:
249258
# Secret variables need to be mapped to environment variables explicitly
250259
SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN }}
251260
SCIKIT_LEARN_STAGING_UPLOAD_TOKEN: ${{ secrets.SCIKIT_LEARN_STAGING_UPLOAD_TOKEN }}
252-
ARTIFACTS_PATH: dist/artifact
261+
ARTIFACTS_PATH: dist
253262
# Force a replacement if the remote file already exists
254263
run: bash build_tools/github/upload_anaconda.sh

Makefile

Lines changed: 17 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,30 @@
11
# simple makefile to simplify repetitive build env management tasks under posix
22

3-
# caution: testing won't work on windows, see README
4-
53
PYTHON ?= python
6-
CYTHON ?= cython
7-
PYTEST ?= pytest
84

9-
# skip doctests on 32bit python
10-
BITS := $(shell python -c 'import struct; print(8 * struct.calcsize("P"))')
5+
all:
6+
@echo "Please use 'make <target>' where <target> is one of"
7+
@echo " dev build scikit-learn with Meson"
8+
@echo " clean clean scikit-learn Meson build. Very rarely needed,"
9+
@echo " one use case is when switching back to setuptools"
10+
@echo " dev-setuptools build scikit-learn with setuptools (deprecated)"
11+
@echo " clean-setuptools clean scikit-learn setuptools build (deprecated)"
1112

12-
all: clean inplace test
13+
.PHONY: all
1314

14-
clean:
15-
$(PYTHON) setup.py clean
16-
rm -rf dist
17-
18-
in: inplace # just a shortcut
19-
inplace:
20-
$(PYTHON) setup.py build_ext -i
15+
dev: dev-meson
2116

2217
dev-meson:
2318
pip install --verbose --no-build-isolation --editable . --check-build-dependencies --config-settings editable-verbose=true
2419

20+
clean: clean-meson
21+
2522
clean-meson:
2623
pip uninstall -y scikit-learn
2724

28-
test-code: in
29-
$(PYTEST) --showlocals -v sklearn --durations=20
30-
test-sphinxext:
31-
$(PYTEST) --showlocals -v doc/sphinxext/
32-
test-doc:
33-
ifeq ($(BITS),64)
34-
$(PYTEST) $(shell find doc -name '*.rst' | sort)
35-
endif
36-
test-code-parallel: in
37-
$(PYTEST) -n auto --showlocals -v sklearn --durations=20
38-
39-
test-coverage:
40-
rm -rf coverage .coverage
41-
$(PYTEST) sklearn --showlocals -v --cov=sklearn --cov-report=html:coverage
42-
test-coverage-parallel:
43-
rm -rf coverage .coverage .coverage.*
44-
$(PYTEST) sklearn -n auto --showlocals -v --cov=sklearn --cov-report=html:coverage
45-
46-
test: test-code test-sphinxext test-doc
47-
48-
cython:
49-
python setup.py build_src
50-
51-
doc: inplace
52-
$(MAKE) -C doc html
53-
54-
doc-noplot: inplace
55-
$(MAKE) -C doc html-noplot
25+
dev-setuptools:
26+
$(PYTHON) setup.py build_ext -i
27+
28+
clean-setuptools:
29+
$(PYTHON) setup.py clean
30+
rm -rf dist

asv_benchmarks/asv.conf.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
//
2424
// "install_command": ["python -mpip install {wheel_file}"],
2525
// "uninstall_command": ["return-code=any python -mpip uninstall -y {project}"],
26-
// "build_command": [
27-
// "python setup.py build",
28-
// "PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
29-
// ],
30-
26+
// "build_command": ["python -m build --wheel -o {build_cache_dir} {build_dir}"],
3127
// List of branches to benchmark. If not provided, defaults to "master
3228
// (for git) or "default" (for mercurial).
3329
"branches": ["main"],

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- bash: |
3636
source build_tools/shared.sh
3737
# Include pytest compatibility with mypy
38-
pip install pytest ruff $(get_dep mypy min) $(get_dep black min) cython-lint
38+
pip install pytest $(get_dep ruff min) $(get_dep mypy min) $(get_dep black min) cython-lint
3939
displayName: Install linters
4040
- bash: |
4141
./build_tools/linting.sh

0 commit comments

Comments
 (0)