8000 Merge branch 'main' into refactor/weighted-percentile-symmetrization · scikit-learn/scikit-learn@7b943ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 7b943ae

Browse files
authored
Merge branch 'main' into refactor/weighted-percentile-symmetrization
2 parents 19ce825 + a6efcaf commit 7b943ae

File tree

390 files changed

+13001
-4004
lines changed

Some content is hidden

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

390 files changed

+13001
-4004
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
jobs:
44
lint:
55
docker:
6-
- image: cimg/python:3.9.18
6+
- image: cimg/python:3.10.16
77
steps:
88
- checkout
99
- run:
@@ -18,7 +18,7 @@ jobs:
1818

1919
doc-min-dependencies:
2020
docker:
21-
- image: cimg/python:3.9.18
21+
- image: cimg/base:current-22.04
2222
environment:
2323
- MKL_NUM_THREADS: 2
2424
- OPENBLAS_NUM_THREADS: 2
@@ -56,7 +56,7 @@ jobs:
5656

5757
doc:
5858
docker:
59-
- image: cimg/python:3.9.18
59+
- image: cimg/base:current-22.04
6060
environment:
6161
- MKL_NUM_THREADS: 2
6262
- OPENBLAS_NUM_THREADS: 2
@@ -98,7 +98,7 @@ jobs:
9898

9999
deploy:
100100
docker:
101-
- image: cimg/python:3.9.18
101+
- image: cimg/base:current-22.04
102102
steps:
103103
- checkout
104104
- run: ./build_tools/circle/checkout_merge_commit.sh

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ contact_links:
1313
url: https://discord.gg/h9qyrK8Jc8
1414
about: Developers and users can be found on the Discord server
1515
- name: Blank issue
16-
url: https://github.com/scikit-learn/scikit-learn/issues/new
16+
url: https://github.com/scikit-learn/scikit-learn/issues/new?template=BLANK_ISSUE
1717
about: Please note that GitHub Discussions should be used in most cases instead

.github/workflows/check-sdist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.9'
19+
python-version: '3.10'
2020
- name: Install dependencies
2121
# scipy and cython are required to build sdist
2222
run: |

.github/workflows/cuda-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: CUDA GPU
2+
permissions:
3+
contents: read
24

35
# Only run this workflow when a Pull Request is labeled with the
46
# 'CUDA CI' label.
@@ -16,7 +18,7 @@ jobs:
1618
- uses: actions/checkout@v4
1719

1820
- name: Build wheels
19-
uses: pypa/cibuildwheel@v2.23.0
21+
uses: pypa/cibuildwheel@v2.23.2
2022
env:
2123
CIBW_BUILD: cp313-manylinux_x86_64
2224
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014

.github/workflows/emscripten.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Test Emscripten/Pyodide build
2+
3+
on:
4+
schedule:
5+
# Nightly build at 3:42 A.M.
6+
- cron: "42 3 */1 * *"
7+
push:
8+
branches:
9+
- main
10+
# Release branches
11+
- "[0-9]+.[0-9]+.X"
12+
pull_request:
13+
branches:
14+
- main
15+
- "[0-9]+.[0-9]+.X"
16+
# Manual run
17+
workflow_dispatch:
18+
19+
env:
20+
FORCE_COLOR: 3
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
check_build_trigger:
31+
name: Check build trigger
32+
runs-on: ubuntu-latest
33+
if: github.repository == 'scikit-learn/scikit-learn'
34+
outputs:
35+
build: ${{ steps.check_build_trigger.outputs.build }}
36+
steps:
37+
- name: Checkout scikit-learn
38+
uses: actions/checkout@v4
39+
with:
40+
ref: ${{ github.event.pull_request.head.sha }}
41+
persist-credentials: false
42+
43+
- id: check_build_trigger
44+
name: Check build trigger
45+
shell: bash
46+
run: |
47+
set -e
48+
set -x
49+
50+
COMMIT_MSG=$(git log --no-merges -1 --oneline)
51+
52+
# The commit marker "[pyodide]" will trigger the build when required
53+
if [[ "$GITHUB_EVENT_NAME" == schedule ||
54+
"$GITHUB_EVENT_NAME" == workflow_dispatch ||
55+
"$COMMIT_MSG" =~ \[pyodide\] ]]; then
56+
echo "build=true" >> $GITHUB_OUTPUT
57+
fi
58+
59+
build_wasm_wheel:
60+
name: Build WASM wheel
61+
runs-on: ubuntu-latest
62+
needs: check_build_trigger
63+
if: needs.check_build_trigger.outputs.build
64+
steps:
65+
- name: Checkout scikit-learn
66+
uses: actions/checkout@v4
67+
with:
68+
persist-credentials: false
69+
70+
- uses: pypa/cibuildwheel@6c426a3a17cfcadf4b6048de53653eba55d7ae4f # v2.23.2
71+
env:
72+
CIBW_PLATFORM: pyodide
73+
SKLEARN_SKIP_OPENMP_TEST: "true"
74+
SKLEARN_SKIP_NETWORK_TESTS: 1
75+
CIBW_TEST_REQUIRES: "pytest pandas"
76+
CIBW_TEST_COMMAND: "python -m pytest -svra --pyargs sklearn --durations 20 --showlocals"
77+
78+
- name: Upload wheel artifact
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: pyodide_wheel
82+
path: ./wheelhouse/*.whl
83+
if-no-files-found: error
84+
85+
# Push to https://anaconda.org/scientific-python-nightly-wheels/scikit-learn
86+
# WARNING: this job will overwrite any existing WASM wheels.
87+
upload-wheels:
88+
name: Upload scikit-learn WASM wheels to Anaconda.org
89+
runs-on: ubuntu-latest
90+
permissions: {}
91+
environment: upload_anaconda
92+
needs: [build_wasm_wheel]
93+
if: github.repository == 'scikit-learn/scikit-learn' && github.event_name != 'pull_request'
94+
steps:
95+
- name: Download wheel artifact
96+
uses: actions/download-artifact@v4
97+
with:
98+
path: wheelhouse/
99+
merge-multiple: true
100+
101+
- name: Push to Anaconda PyPI index
102+
uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2
103+
with:
104+
artifacts_path: wheelhouse/
105+
anaconda_nightly_upload_token: ${{ secrets.SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN }}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Workflow to update lock files
22
name: Update lock files
3+
permissions:
4+
contents: read
35

46
on:
57
workflow_dispatch:

.github/workflows/wheels.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ jobs:
6060
matrix:
6161
include:
6262
# Window 64 bit
63-
- os: windows-latest
64-
python: 39
65-
platform_id: win_amd64
6663
- os: windows-latest
6764
python: 310
6865
platform_id: win_amd64
@@ -81,17 +78,10 @@ jobs:
8178
free_threaded_support: True
8279

8380
# Linux 64 bit manylinux2014
84-
- os: ubuntu-latest
85-
python: 39
86-
platform_id: manylinux_x86_64
87-
manylinux_image: manylinux2014
88-
89-
# NumPy on Python 3.10 only supports 64bit and is only available with manylinux2014
9081
- os: ubuntu-latest
9182
python: 310
9283
platform_id: manylinux_x86_64
9384
manylinux_image: manylinux2014
94-
9585
- os: ubuntu-latest
9686
python: 311
9787
platform_id: manylinux_x86_64
@@ -111,10 +101,6 @@ jobs:
111101
free_threaded_support: True
112102

113103
# # Linux 64 bit manylinux2014
114-
- os: ubuntu-24.04-arm
115-
python: 39
116-
platform_id: manylinux_aarch64
117-
manylinux_image: manylinux2014
118104
- os: ubuntu-24.04-arm
119105
python: 310
120106
platform_id: manylinux_aarch64
@@ -133,9 +119,6 @@ jobs:
133119
manylinux_image: manylinux2014
134120

135121
# MacOS x86_64
136-
- os: macos-13
137-
python: 39
138-
platform_id: macosx_x86_64
139122
- os: macos-13
140123
python: 310
141124
platform_id: macosx_x86_64
@@ -154,9 +137,6 @@ jobs:
154137
free_threaded_support: True
155138

156139
# MacOS arm64
157-
- os: macos-14
158-
python: 39
159-
platform_id: macosx_arm64
160140
- os: macos-14
161141
python: 310
162142
platform_id: macosx_arm64
@@ -244,7 +224,7 @@ jobs:
244224
- name: Setup Python
245225
uses: actions/setup-python@v5
246226
with:
247-
python-version: "3.9" # update once build dependencies are available
227+
python-version: "3.12"
248228

249229
- name: Build source distribution
250230
run: bash build_tools/github/build_source.sh

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
exclude: '^(.git/|sklearn/externals/|asv_benchmarks/env/)'
12
repos:
23
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.3.0
4+
rev: v5.0.0
45
hooks:
56
- id: check-yaml
67
- id: end-of-file-fixer
78
- id: trailing-whitespace
89
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
# Ruff version.
10-
rev: v0.5.1
10+
rev: v0.11.0
1111
hooks:
1212
- id: ruff
1313
args: ["--fix", "--output-format=full"]
@@ -16,7 +16,7 @@ repos:
1616
hooks:
1717
- id: black
1818
- repo: https://github.com/pre-commit/mirrors-mypy
19-
rev: v1.9.0
19+
rev: v1.15.0
2020
hooks:
2121
- id: mypy
2222
files: sklearn/

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ all priceless contributions.
1313

1414
We abide by the principles of openness, respect, and consideration of others of
1515
the Python Software Foundation: https://www.python.org/psf/codeofconduct/
16-

README.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
.. |Benchmark| image:: https://img.shields.io/badge/Benchmarked%20by-asv-blue
3030
:target: https://scikit-learn.org/scikit-learn-benchmarks
3131

32-
.. |PythonMinVersion| replace:: 3.9
33-
.. |NumP 10000 yMinVersion| replace:: 1.19.5
34-
.. |SciPyMinVersion| replace:: 1.6.0
32+
.. |PythonMinVersion| replace:: 3.10
33+
.. |NumPyMinVersion| replace:: 1.22.0
34+
.. |SciPyMinVersion| replace:: 1.8.0
3535
.. |JoblibMinVersion| replace:: 1.2.0
3636
.. |ThreadpoolctlMinVersion| replace:: 3.1.0
37-
.. |MatplotlibMinVersion| replace:: 3.3.4
38-
.. |Scikit-ImageMinVersion| replace:: 0.17.2
39-
.. |PandasMinVersion| replace:: 1.2.0
37+
.. |MatplotlibMinVersion| replace:: 3.5.0
38+
.. |Scikit-ImageMinVersion| replace:: 0.19.0
39+
.. |PandasMinVersion| replace:: 1.4.0
4040
.. |SeabornMinVersion| replace:: 0.9.0
4141
.. |PytestMinVersion| replace:: 7.1.2
4242
.. |PlotlyMinVersion| replace:: 5.14.0
@@ -72,10 +72,6 @@ scikit-learn requires:
7272

7373
=======
7474

75-
**Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4.**
76-
scikit-learn 1.0 and later require Python 3.7 or newer.
77-
scikit-learn 1.1 and later require Python 3.8 or newer.
78-
7975
Scikit-learn plotting capabilities (i.e., functions start with ``plot_`` and
8076
classes end with ``Display``) require Matplotlib (>= |MatplotlibMinVersion|).
8177
For running the examples Matplotlib >= |MatplotlibMinVersion| is required.

SECURITY.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99

1010
## Reporting a Vulnerability
1111

12-
Please report security vulnerabilities by email to `security@scikit-learn.org`.
13-
This email is an alias to a subset of the scikit-learn maintainers' team.
12+
Please report security vulnerabilities by opening a new [GitHub security
13+
advisory](https://github.com/scikit-learn/scikit-learn/security/advisories/new).
14+
15+
You can also send an email to `security@scikit-learn.org`, which is an alias to
16+
a subset of the scikit-learn maintainers' team.
1417

1518
If the security vulnerability is accepted, a patch will be crafted privately
1619
in order to prepare a dedicated bugfix release as timely as possible (depending
1720
on the complexity of the fix).
1821

19-
In addition to sending the report by email, you can also report security
20-
vulnerabilities to [tidelift](https://tidelift.com/security).
22+
In addition to the options above, you can also report security vulnerabilities
23+
to [tidelift](https://tidelift.com/security).

0 commit comments

Comments
 (0)
0