Skip to content

Commit 2be3532

Browse files
committed
Merge branch 'is/30027' of https://github.com/kostayScr/scikit-learn into is/30027
2 parents d6f5b55 + af9f2c1 commit 2be3532

File tree

942 files changed

+46414
-20459
lines changed

Some content is hidden

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

942 files changed

+46414
-20459
lines changed

.binder/postBuild

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set -e
66
# inside a git checkout of the scikit-learn/scikit-learn repo. This script is
77
# generating notebooks from the scikit-learn python examples.
88

9-
if [[ ! -f /.dockerenv ]]; then
10-
echo "This script was written for repo2docker and is supposed to run inside a docker container."
11-
echo "Exiting because this script can delete data if run outside of a docker container."
9+
if [[ -z "${REPO_DIR}" ]]; then
10+
echo "This script was written for repo2docker and the REPO_DIR environment variable is supposed to be set."
11+
echo "Exiting because this script can delete data if run outside of a repo2docker context."
1212
exit 1
1313
fi
1414

@@ -23,7 +23,7 @@ find . -delete
2323
GENERATED_NOTEBOOKS_DIR=.generated-notebooks
2424
cp -r $TMP_CONTENT_DIR/examples $GENERATED_NOTEBOOKS_DIR
2525

26-
find $GENERATED_NOTEBOOKS_DIR -name '*.py' -exec sphx_glr_python_to_jupyter.py '{}' +
26+
find $GENERATED_NOTEBOOKS_DIR -name '*.py' -exec sphinx_gallery_py2jupyter '{}' +
2727
NON_NOTEBOOKS=$(find $GENERATED_NOTEBOOKS_DIR -type f | grep -v '\.ipynb')
2828
rm -f $NON_NOTEBOOKS
2929

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ 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:
1010
name: dependencies
1111
command: |
1212
source build_tools/shared.sh
1313
# Include pytest compatibility with mypy
14-
pip install pytest $(get_dep ruff min) $(get_dep mypy min) $(get_dep black min) cython-lint
14+
pip install pytest $(get_dep ruff min) $(get_dep mypy min) cython-lint
1515
- run:
1616
name: linting
1717
command: ./build_tools/linting.sh
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
@@ -107,7 +107,7 @@ jobs:
107107
- attach_workspace:
108108
at: doc/_build/html
109109
- run: ls -ltrh doc/_build/html/stable
110-
- deploy:
110+
- run:
111111
command: |
112112
if [[ "${CIRCLE_BRANCH}" =~ ^main$|^[0-9]+\.[0-9]+\.X$ ]]; then
113113
bash build_tools/circle/push_doc.sh doc/_build/html/stable

.cirrus.star

Lines changed: 0 additions & 37 deletions
This file was deleted.

.coveragerc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[run]
2-
branch = True
2+
# Use statement coverage rather than branch coverage because
3+
# COVERAGE_CORE=sysmon can make branch coverage slower rather than faster. See
4+
# https://github.com/nedbat/coveragepy/issues/1812 for more details.
5+
branch = False
36
source = sklearn
47
parallel = True
58
omit =

.git-blame-ignore-revs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,17 @@ d4aad64b1eb2e42e76f49db2ccfbe4b4660d092b
3232
# PR 26649: Add isort and ruff rules
3333
42173fdb34b5aded79664e045cada719dfbe39dc
3434

35-
# PR #28802: Update black to 24.3.0
35+
# PR 28802: Update black to 24.3.0
3636
c4c546355667b070edd5c892b206aa4a97af9a0b
37+
38+
# PR 30694: Enforce ruff rules (RUF)
39+
fe7c4176828af5231f526e76683fb9bdb9ea0367
40+
41+
# PR 30695: Apply ruff/flake8-implicit-str-concat rules (ISC)
42+
5cdbbf15e3fade7cc2462ef66dc4ea0f37f390e3
43+
44+
# PR 31015: black -> ruff format
45+
ff78e258ccf11068e2b3a433c51517ae56234f88
46+
47+
# PR 31226: Enforce ruff/pygrep-hooks rules
48+
b98dc797c480b1b9495f918e201d45ee07f29feb

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
blank_issues_enabled: true
1+
blank_issues_enabled: false
22
contact_links:
33
- name: Discussions
44
url: https://github.com/scikit-learn/scikit-learn/discussions/new
@@ -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/arm-unit-tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Unit test for ARM
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint:
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
if: github.repository == 'scikit-learn/scikit-learn'
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.12'
25+
cache: 'pip'
26+
- name: Install linters
27+
run: |
28+
source build_tools/shared.sh
29+
# Include pytest compatibility with mypy
30+
pip install pytest $(get_dep ruff min) $(get_dep mypy min) cython-lint
31+
- name: Run linters
32+
run: ./build_tools/linting.sh
33+
- name: Run Meson OpenMP checks
34+
run: |
35+
pip install ninja meson scipy
36+
python build_tools/check-meson-openmp-dependencies.py
37+
38+
run-unit-tests:
39+
name: Run unit tests
40+
runs-on: ubuntu-24.04-arm
41+
if: github.repository == 'scikit-learn/scikit-learn'
42+
needs: [lint]
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
- uses: mamba-org/setup-micromamba@v2
47+
with:
48+
environment-file: build_tools/github/pymin_conda_forge_arm_linux-aarch64_conda.lock
49+
environment-name: ci
50+
cache-environment: true
51+
52+
- name: Build and run tests
53+
shell: bash -el {0}
54+
run: bash build_tools/github/build_test_arm.sh

.github/workflows/assign.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/check-changelog.yml

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,36 @@
11
name: Check Changelog
2+
permissions:
3+
contents: read
4+
25
# This check makes sure that the changelog is properly updated
36
# when a PR introduces a change in a test file.
47
# To bypass this check, label the PR with "No Changelog Needed".
58
on:
69
pull_request:
7-
types: [opened, edited, labeled, unlabeled, synchronize]
10+
types: [opened, synchronize, labeled, unlabeled]
811

912
jobs:
1013
check:
1114
name: A reviewer will let you know if it is required or can be bypassed
1215
runs-on: ubuntu-latest
13-
if: ${{ contains(github.event.pull_request.labels.*.name, 'No Changelog Needed') == 0 }}
1416
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
1917
- uses: actions/checkout@v4
2018
with:
2119
fetch-depth: '0'
22-
- name: Check the changelog entry
20+
- name: Check if tests have changed
21+
id: tests_changed
2322
run: |
2423
set -xe
2524
changed_files=$(git diff --name-only origin/main)
2625
# Changelog should be updated only if tests have been modified
27-
if [[ ! "$changed_files" =~ tests ]]
26+
if [[ "$changed_files" =~ tests ]]
2827
then
29-
exit 0
30-
fi
31-
all_changelogs=$(cat ./doc/whats_new/v*.rst)
32-
if [[ "$all_changelogs" =~ :pr:\`$PR_NUMBER\` ]]
33-
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
28+
echo "check_changelog=true" >> $GITHUB_OUTPUT
6829
fi
30+
31+
- name: Check changelog entry
32+
if: steps.tests_changed.outputs.check_changelog == 'true'
33+
uses: scientific-python/action-towncrier-changelog@v1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
BOT_USERNAME: changelog-bot

.github/workflows/check-sdist.yml

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

35
on:
46
schedule:
@@ -14,7 +16,7 @@ jobs:
1416
- uses: actions/checkout@v4
1517
- uses: actions/setup-python@v5
1618
with:
17-
python-version: '3.9'
19+
python-version: '3.10'
1820
- name: Install dependencies
1921
# scipy and cython are required to build sdist
2022
run: |

0 commit comments

Comments
 (0)