Skip to content

Commit a14e86d

Browse files
committed
Merge branch 'main' into fix/retry-on-http-error
2 parents 4def96a + 5272d34 commit a14e86d

File tree

475 files changed

+17826
-7887
lines changed

Some content is hidden

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

475 files changed

+17826
-7887
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ jobs:
5353
- OMP_NUM_THREADS: 2
5454
- MKL_NUM_THREADS: 2
5555
- CONDA_ENV_NAME: testenv
56-
- PYTHON_VERSION: 3
56+
- PYTHON_VERSION: '3.9'
5757
- NUMPY_VERSION: 'latest'
5858
- SCIPY_VERSION: 'latest'
5959
- MATPLOTLIB_VERSION: 'latest'
6060
- CYTHON_VERSION: 'latest'
6161
- SCIKIT_IMAGE_VERSION: 'latest'
62-
- SPHINX_VERSION: 'min'
62+
# Bump the sphinx version from time to time. Avoid latest sphinx version
63+
# that tends to break things slightly too often
64+
- SPHINX_VERSION: 4.2.0
6365
- PANDAS_VERSION: 'latest'
6466
- SPHINX_GALLERY_VERSION: 'latest'
6567
- NUMPYDOC_VERSION: 'latest'
@@ -138,8 +140,6 @@ jobs:
138140
- ~/.cache/ccache
139141
- ~/.cache/pip
140142
- ~/scikit_learn_data
141-
# The source build folder.
142-
- ~/project/build
143143
deploy:
144144
docker:
145145
- image: circleci/python:3.7

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919

2020
# PR 20502: Runs Black on examples
2121
70a185ae59b4362633d18b0d0083abb1b6f7370c
22+
23+
# PR 22474: Update to Black 22.1.0
24+
1fc86b6aacd89da44a3b4e8abf7c3e2ba4336ffe

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: Create a report to help us reproduce and correct the bug
3-
labels: ['Bug: triage']
3+
labels: ['Bug', 'Needs Triage']
44

55
body:
66
- type: markdown
@@ -19,7 +19,7 @@ body:
1919
attributes:
2020
label: Steps/Code to Reproduce
2121
description: |
22-
Please add a minimal example that we can reproduce the error by running the code. Be as succinct as possible, do not depend on external data. In short, we are going to copy-paste your code and we expect to get the same result as you. Example:
22+
Please add a minimal code example that can reproduce the error when running it. Be as succinct as possible, **do not depend on external data files**: instead you can generate synthetic data using `numpy.random`, [sklearn.datasets.make_regression](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_regression.html), [sklearn.datasets.make_classification](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_classification.html) or a few lines of Python code. Example:
2323
2424
```python
2525
from sklearn.feature_extraction.text import CountVectorizer
@@ -37,6 +37,10 @@ body:
3737
```
3838
3939
If the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com.
40+
41+
In short, **we are going to copy-paste your code** to run it and we expect to get the same result as you.
42+
43+
We acknowledge that crafting a minimal reproducible code example requires some effort on your side but it really helps the maintainers quickly reproduce the problem and analyze its cause without any ambiguity. Ambiguous bug reports tend to be slower to fix because they will require more effort and back and forth discussion between the maintainers and the reporter to pin-point the precise conditions necessary to reproduce the problem.
4044
placeholder: |
4145
```
4246
Sample code to reproduce the problem
@@ -55,15 +59,29 @@ body:
5559
- type: textarea
5660
attributes:
5761
label: Actual Results
58-
description: >
59-
Please paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full** traceback of the exception.
62+
description: |
63+
Please paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full traceback** of the exception. For instance the code above raises the following exception:
64+
65+
```python-traceback
66+
---------------------------------------------------------------------------
67+
TypeError Traceback (most recent call last)
68+
<ipython-input-1-a674e682c281> in <module>
69+
4 vectorizer = CountVectorizer(input=docs, analyzer='word')
70+
5 lda_features = vectorizer.fit_transform(docs)
71+
----> 6 lda_model = LatentDirichletAllocation(
72+
7 n_topics=10,
73+
8 learning_method='online',
74+
75+
TypeError: __init__() got an unexpected keyword argument 'n_topics'
76+
```
6077
placeholder: >
6178
Please paste or specifically describe the actual output or traceback.
6279
validations:
6380
required: true
6481
- type: textarea
6582
attributes:
6683
label: Versions
84+
render: shell
6785
description: |
6886
Please run the following and paste the output below.
6987
```python

.github/ISSUE_TEMPLATE/doc_improvement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Documentation improvement
22
description: Create a report to help us improve the documentation. Alternatively you can just open a pull request with the suggested change.
3-
labels: [Documentation]
3+
labels: [Documentation, 'Needs Triage']
44

55
body:
66
- type: textarea

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature request
22
description: Suggest a new algorithm, enhancement to an existing algorithm, etc.
3-
labels: ['New Feature']
3+
labels: ['New Feature', 'Needs Triage']
44

55
body:
66
- type: markdown

.github/workflows/assign.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
jobs:
88
one:
99
runs-on: ubuntu-latest
10+
# Note that string comparisons is not case sensitive.
1011
if: >-
11-
(github.event.comment.body == 'take' ||
12-
github.event.comment.body == 'Take')
13-
&& !github.event.issue.assignee
12+
startsWith(github.event.comment.body, '/take')
13+
&& !github.event.issue.assignee
1414
steps:
1515
- run: |
1616
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"

.github/workflows/check-changelog.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
check:
11+
name: A reviewer will let you know if it is required or can be bypassed
1112
runs-on: ubuntu-latest
1213
if: ${{ contains(github.event.pull_request.labels.*.name, 'No Changelog Needed') == 0 }}
1314
steps:
@@ -18,7 +19,7 @@ jobs:
1819
- uses: actions/checkout@v2
1920
with:
2021
fetch-depth: '0'
21-
- name: Check the changelog
22+
- name: Check the changelog entry
2223
run: |
2324
set -xe
2425
changed_files=$(git diff --name-only origin/main)
@@ -60,8 +61,8 @@ jobs:
6061
echo "If you see this error and there is already a changelog entry,"
6162
echo "check that the PR number is correct."
6263
echo ""
63-
echo" If you believe that this PR does no warrant a changelog"
64-
echo "entry, say so in a comment so that a maintainer will label "
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"
6566
echo "the PR with 'No Changelog Needed' to bypass this check."
6667
exit 1
6768
fi

.github/workflows/check-manifest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
jobs:
88
check:
9+
# Don't run on forks
10+
if: github.repository == 'scikit-learn/scikit-learn'
11+
912
runs-on: ubuntu-latest
1013
steps:
1114
- uses: actions/checkout@v2
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Labels Blank issues
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
label-blank-issues:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: andymckay/labeler@1.0.4
12+
with:
13+
add-labels: "Needs Triage"
14+
ignore-if-labeled: true

.github/workflows/wheels.yml

Lines changed: 91 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,111 @@ jobs:
4747
# Ensure that a wheel builder finishes even if another fails
4848
fail-fast: false
4949
matrix:
50-
os: [windows-latest, ubuntu-latest, macos-latest]
51-
python: [37, 38, 39]
52-
bitness: [32, 64]
53-
manylinux_image: [manylinux1, manylinux2010]
5450
include:
55-
# Run 32 and 64 bit version in parallel for Linux and Windows
51+
# Window 64 bit
5652
- os: windows-latest
53+
python: 37
5754
bitness: 64
5855
platform_id: win_amd64
5956
- os: windows-latest
57+
python: 38
58+
bitness: 64
59+
platform_id: win_amd64
60+
- os: windows-latest
61+
python: 39
62+
bitness: 64
63+
platform_id: win_amd64
64+
- os: windows-latest
65+
python: 310
66+
bitness: 64
67+
platform_id: win_amd64
68+
69+
# Window 32 bit
70+
- os: windows-latest
71+
python: 37
6072
bitness: 32
6173
platform_id: win32
74+
- os: windows-latest
75+
python: 38
76+
bitness: 32
77+
platform_id: win32
78+
- os: windows-latest
79+
python: 39
80+
bitness: 32
81+
platform_id: win32
82+
83+
# Linux 64 bit manylinux2014
6284
- os: ubuntu-latest
85+
python: 37
6386
bitness: 64
6487
platform_id: manylinux_x86_64
88+
manylinux_image: manylinux2014
6589
- os: ubuntu-latest
66-
bitness: 32
67-
platform_id: manylinux_i686
90+
python: 38
91+
bitness: 64
92+
platform_id: manylinux_x86_64
93+
manylinux_image: manylinux2014
94+
- os: ubuntu-latest
95+
python: 39
96+
bitness: 64
97+
platform_id: manylinux_x86_64
98+
manylinux_image: manylinux2014
99+
100+
# Linux 64 bit manylinux2010
101+
- os: ubuntu-latest
102+
python: 37
103+
bitness: 64
104+
platform_id: manylinux_x86_64
105+
manylinux_image: manylinux2010
106+
- os: ubuntu-latest
107+
python: 38
108+
bitness: 64
109+
platform_id: manylinux_x86_64
110+
manylinux_image: manylinux2010
111+
- os: ubuntu-latest
112+
python: 39
113+
bitness: 64
114+
platform_id: manylinux_x86_64
115+
manylinux_image: manylinux2010
116+
117+
# NumPy on Python 3.10 only supports 64bit and is only available with manylinux2014
118+
- os: ubuntu-latest
119+
python: 310
120+
bitness: 64
121+
platform_id: manylinux_x86_64
122+
manylinux_image: manylinux2014
123+
124+
# MacOS x86_64
68125
- os: macos-latest
69126
bitness: 64
127+
python: 37
70128
platform_id: macosx_x86_64
71-
exclude:
72129
- os: macos-latest
73-
bitness: 32
74-
# Remove manylinux1 from the windows and osx build matrix since
75-
# manylinux_image is not used for these platforms
76-
- os: windows-latest
77-
manylinux_image: manylinux1
130+
bitness: 64
131+
python: 38
132+
platform_id: macosx_x86_64
133+
- os: macos-latest
134+
bitness: 64
135+
python: 39
136+
platform_id: macosx_x86_64
78137
- os: macos-latest
79-
manylinux_image: manylinux1
138+
bitness: 64
139+
python: 310
140+
platform_id: macosx_x86_64
141+
142+
# MacOS arm64
143+
- os: macos-latest
144+
bitness: 64
145+
python: 38
146+
platform_id: macosx_arm64
147+
- os: macos-latest
148+
bitness: 64
149+
python: 39
150+
platform_id: macosx_arm64
151+
- os: macos-latest
152+
bitness: 64
153+
python: 310
154+
platform_id: macosx_arm64
80155

81156
steps:
82157
- name: Checkout scikit-learn
@@ -95,10 +170,11 @@ jobs:
95170
OPENBLAS_NUM_THREADS=2
96171
SKLEARN_SKIP_NETWORK_TESTS=1
97172
SKLEARN_BUILD_PARALLEL=3
98-
MACOSX_DEPLOYMENT_TARGET=10.13
99173
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
174+
CIBW_ARCHS: all
100175
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
101176
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
177+
CIBW_TEST_SKIP: "*-macosx_arm64"
102178
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }}
103179
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }}
104180
CIBW_TEST_REQUIRES: pytest pandas threadpoolctl

0 commit comments

Comments
 (0)