Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b383b9d

Browse files
committed
fixed conflicts in doc/whats_new/v1.2.rst
2 parents a29b92d + 9aae2ad commit b383b9d

File tree

411 files changed

+18379
-11695
lines changed

Some content is hidden

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

411 files changed

+18379
-11695
lines changed

.binder/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
--extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn
1+
--find-links https://pypi.anaconda.org/scipy-wheels-nightly/simple/scikit-learn
22
--pre
33
matplotlib
44
scikit-image
55
pandas
6+
seaborn
7+
Pillow
68
sphinx-gallery
79
scikit-learn
8-

.binder/runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.9

.circleci/config.yml

Lines changed: 25 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,42 @@
11
version: 2.1
22

3+
# Parameters required to trigger the execution
4+
# of the "doc-min-dependencies" and "doc" jobs
5+
parameters:
6+
GITHUB_RUN_URL:
7+
type: string
8+
default: "none"
9+
310
jobs:
411
doc-min-dependencies:
512
docker:
613
- image: cimg/python:3.8.12
714
environment:
8-
- OMP_NUM_THREADS: 2
9-
- MKL_NUM_THREADS: 2
10-
- CONDA_ENV_NAME: testenv
11-
- PYTHON_VERSION: 3.8
12-
- NUMPY_VERSION: 'min'
13-
- SCIPY_VERSION: 'min'
14-
- MATPLOTLIB_VERSION: 'min'
15-
- CYTHON_VERSION: 'min'
16-
- SCIKIT_IMAGE_VERSION: 'min'
17-
- SPHINX_VERSION: 'min'
18-
- PANDAS_VERSION: 'min'
19-
- SPHINX_GALLERY_VERSION: 'min'
20-
- NUMPYDOC_VERSION: 'min'
21-
- SPHINX_PROMPT_VERSION: 'min'
22-
- SPHINXEXT_OPENGRAPH_VERSION: 'min'
15+
- GITHUB_ARTIFACT_URL: << pipeline.parameters.GITHUB_RUN_URL >>/doc-min-dependencies.zip
2316
steps:
2417
- checkout
25-
- run: ./build_tools/circle/checkout_merge_commit.sh
26-
- restore_cache:
27-
key: v1-doc-min-deps-datasets-{{ .Branch }}
28-
- restore_cache:
29-
keys:
30-
- doc-min-deps-ccache-{{ .Branch }}
31-
- doc-min-deps-ccache
32-
- run: ./build_tools/circle/build_doc.sh
33-
- save_cache:
34-
key: doc-min-deps-ccache-{{ .Branch }}-{{ .BuildNum }}
35-
paths:
36-
- ~/.ccache
37-
- ~/.cache/pip
38-
- save_cache:
39-
key: v1-doc-min-deps-datasets-{{ .Branch }}
40-
paths:
41-
- ~/scikit_learn_data
18+
- run: bash build_tools/circle/download_documentation.sh
4219
- store_artifacts:
4320
path: doc/_build/html/stable
4421
destination: doc
45-
- store_artifacts:
46-
path: ~/log.txt
47-
destination: log.txt
4822

4923
doc:
5024
docker:
5125
- image: cimg/python:3.8.12
5226
environment:
53-
- OMP_NUM_THREADS: 2
54-
- MKL_NUM_THREADS: 2
55-
- CONDA_ENV_NAME: testenv
56-
- PYTHON_VERSION: '3.9'
57-
- NUMPY_VERSION: 'latest'
58-
- SCIPY_VERSION: 'latest'
59-
- MATPLOTLIB_VERSION: 'latest'
60-
- CYTHON_VERSION: 'latest'
61-
- SCIKIT_IMAGE_VERSION: 'latest'
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
65-
- PANDAS_VERSION: 'latest'
66-
- SPHINX_GALLERY_VERSION: 'latest'
67-
- NUMPYDOC_VERSION: 'latest'
68-
- SPHINX_PROMPT_VERSION: 'latest'
69-
- SPHINXEXT_OPENGRAPH_VERSION: 'latest'
27+
- GITHUB_ARTIFACT_URL: << pipeline.parameters.GITHUB_RUN_URL >>/doc.zip
7028
steps:
7129
- checkout
72-
- run: ./build_tools/circle/checkout_merge_commit.sh
73-
- restore_cache:
74-
key: v1-doc-datasets-{{ .Branch }}
75-
- restore_cache:
76-
keys:
77-
- doc-ccache-{{ .Branch }}
78-
- doc-ccache
79-
- run: ./build_tools/circle/build_doc.sh
80-
- save_cache:
81-
key: doc-ccache-{{ .Branch }}-{{ .BuildNum }}
82-
paths:
83-
- ~/.ccache
84-
- ~/.cache/pip
85-
- save_cache:
86-
key: v1-doc-datasets-{{ .Branch }}
87-
paths:
88-
- ~/scikit_learn_data
30+
- run: bash build_tools/circle/download_documentation.sh
8931
- store_artifacts:
9032
path: doc/_build/html/stable
9133
destination: doc
92-
- store_artifacts:
93-
path: ~/log.txt
94-
destination: log.txt
95-
# Persists generated documentation so that it can be attached and deployed
96-
# in the 'deploy' step.
34+
# Persists the generated documentation, so that it
35+
# can be attached and deployed in the "deploy" job
9736
- persist_to_workspace:
9837
root: doc/_build/html
9938
paths: .
10039

101-
lint:
102-
docker:
103-
- image: cimg/python:3.8.12
104-
steps:
105-
- checkout
106-
- run: ./build_tools/circle/checkout_merge_commit.sh
107-
- run:
108-
name: dependencies
109-
command: pip install flake8
110-
- run:
111-
name: linting
112-
command: ./build_tools/circle/linting.sh
113-
11440
linux-arm64:
11541
machine:
11642
image: ubuntu-2004:202101-01
@@ -151,18 +77,23 @@ jobs:
15177
15278
workflows:
15379
version: 2
80+
15481
build-doc-and-deploy:
82+
when:
83+
not:
84+
equal: [ "none", << pipeline.parameters.GITHUB_RUN_URL >> ]
85+
# The jobs should run only when triggered by the workflow
15586
jobs:
156-
- lint
157-
- doc:
158-
requires:
159-
- lint
160-
- doc-min-dependencies:
161-
requires:
162-
- lint
87+
- doc-min-dependencies
88+
- doc
16389
- deploy:
16490
requires:
16591
- doc
92+
16693
linux-arm64:
94+
when:
95+
equal: [ "none", << pipeline.parameters.GITHUB_RUN_URL >> ]
96+
# Prevent double execution of this job: on push
97+
# by default and when triggered by the workflow
16798
jobs:
16899
- linux-arm64

.github/workflows/build-docs.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Workflow to build the documentation
2+
name: Documentation builder
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
# Release branches
9+
- "[0-9]+.[0-9]+.X"
10+
pull_request:
11+
branches:
12+
- main
13+
- "[0-9]+.[0-9]+.X"
14+
15+
jobs:
16+
# Build the documentation against the minimum version of the dependencies
17+
doc-min-dependencies:
18+
# This prevents this workflow from running on a fork.
19+
# To test this workflow on a fork, uncomment the following line.
20+
if: github.repository == 'scikit-learn/scikit-learn'
21+
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout scikit-learn
25+
uses: actions/checkout@v2
26+
with:
27+
# needed by build_doc.sh to compute the list of changed doc files:
28+
fetch-depth: 0
29+
ref: ${{ github.event.pull_request.head.sha }}
30+
31+
- name: Setup Python
32+
uses: actions/setup-python@v2
33+
34+
- name: Build documentation
35+
run: bash build_tools/github/build_doc.sh
36+
env:
37+
OMP_NUM_THREADS: 2
38+
MKL_NUM_THREADS: 2
39+
CONDA_ENV_NAME: testenv
40+
LOCK_FILE: build_tools/github/doc_min_dependencies_linux-64_conda.lock
41+
42+
- name: Upload documentation
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: doc-min-dependencies
46+
path: doc/_build/html/stable
47+
48+
# Build the documentation against the latest version of the dependencies
49+
doc:
50+
# This prevents this workflow from running on a fork.
51+
# To test this workflow on a fork, uncomment the following line.
52+
if: github.repository == 'scikit-learn/scikit-learn'
53+
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout scikit-learn
57+
uses: actions/checkout@v2
58+
with:
59+
# needed by build_doc.sh to compute the list of changed doc files:
60+
fetch-depth: 0
61+
ref: ${{ github.event.pull_request.head.sha }}
62+
63+
- name: Setup Python
64+
uses: actions/setup-python@v2
65+
66+
- name: Build documentation
67+
run: bash build_tools/github/build_doc.sh
68+
env:
69+
OMP_NUM_THREADS: 2
70+
MKL_NUM_THREADS: 2
71+
CONDA_ENV_NAME: testenv
72+
LOCK_FILE: build_tools/github/doc_linux-64_conda.lock
73+
74+
- name: Upload documentation
75+
uses: actions/upload-artifact@v2
76+
with:
77+
name: doc
78+
path: doc/_build/html/stable
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Workflow to trigger the jobs that will host the documentation
2+
name: Documentation push trigger
3+
on:
4+
workflow_run:
5+
# Run the workflow after the separate "Documentation builder" workflow completes
6+
workflows: [Documentation builder]
7+
types:
8+
- completed
9+
10+
jobs:
11+
push:
12+
runs-on: ubuntu-latest
13+
# Run the job only if the "Documentation builder" workflow succeeded
14+
# Prevents this workflow from running on a fork.
15+
# To test this workflow on a fork remove the `github.repository == scikit-learn/scikit-learn` condition
16+
if: github.repository == 'scikit-learn/scikit-learn' && github.event.workflow_run.conclusion == 'success'
17+
steps:
18+
- name: Checkout scikit-learn
19+
uses: actions/checkout@v2
20+
21+
- name: Trigger hosting jobs
22+
run: bash build_tools/github/trigger_hosting.sh
23+
env:
24+
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
25+
EVENT: ${{ github.event.workflow_run.event }}
26+
RUN_ID: ${{ github.event.workflow_run.id }}
27+
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
28+
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
29+
REPO_NAME: ${{ github.event.workflow_run.head_repository.full_name }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*.pyc
1+
*.pyc*
22
*.so
33
*.pyd
44
*~
@@ -85,3 +85,15 @@ sklearn/utils/_seq_dataset.pxd
8585
sklearn/utils/_weight_vector.pyx
8686
sklearn/utils/_weight_vector.pxd
8787
sklearn/linear_model/_sag_fast.pyx
88+
sklearn/metrics/_dist_metrics.pyx
89+
sklearn/metrics/_dist_metrics.pxd
90+
sklearn/metrics/_pairwise_distances_reduction/_argkmin.pxd
91+
sklearn/metrics/_pairwise_distances_reduction/_argkmin.pyx
92+
sklearn/metrics/_pairwise_distances_reduction/_base.pxd
93+
sklearn/metrics/_pairwise_distances_reduction/_base.pyx
94+
sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pxd
95+
sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pyx
96+
sklearn/metrics/_pairwise_distances_reduction/_gemm_term_computer.pxd
97+
sklearn/metrics/_pairwise_distances_reduction/_gemm_term_computer.pyx
98+
sklearn/metrics/_pairwise_distances_reduction/_radius_neighborhood.pxd
99+
sklearn/metrics/_pairwise_distances_reduction/_radius_neighborhood.pyx

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
3+
rev: v4.3.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
@@ -9,13 +9,13 @@ repos:
99
rev: 22.3.0
1010
hooks:
1111
- id: black
12-
- repo: https://gitlab.com/pycqa/flake8
13-
rev: 3.9.2
12+
- repo: https://github.com/pycqa/flake8
13+
rev: 4.0.1
1414
hooks:
1515
- id: flake8
1616
types: [file, python]
1717
- repo: https://github.com/pre-commit/mirrors-mypy
18-
rev: v0.782
18+
rev: v0.961
1919
hooks:
2020
- id: mypy
2121
files: sklearn/

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,3 @@ doc-noplot: inplace
6363
code-analysis:
6464
flake8 sklearn | grep -v __init__ | grep -v external
6565
pylint -E -i y sklearn/ -d E1103,E0611,E1101
66-
67-
flake8-diff:
68-
git diff upstream/main -u -- "*.py" | flake8 --diff

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
.. |JoblibMinVersion| replace:: 1.0.0
3939
.. |ThreadpoolctlMinVersion| replace:: 2.0.0
4040
.. |MatplotlibMinVersion| replace:: 3.1.2
41-
.. |Scikit-ImageMinVersion| replace:: 0.14.5
41+
.. |Scikit-ImageMinVersion| replace:: 0.16.2
4242
.. |PandasMinVersion| replace:: 1.0.5
4343
.. |SeabornMinVersion| replace:: 0.9.0
4444
.. |PytestMinVersion| replace:: 5.0.1
@@ -144,7 +144,7 @@ directory (you will need to have ``pytest`` >= |PyTestMinVersion| installed)::
144144

145145
pytest sklearn
146146

147-
See the web page https://scikit-learn.org/dev/developers/advanced_installation.html#testing
147+
See the web page https://scikit-learn.org/dev/developers/contributing.html#testing-and-improving-test-coverage
148148
for more information.
149149

150150
Random number generation can be controlled during testing by setting
@@ -184,6 +184,7 @@ Communication
184184

185185
- Mailing list: https://mail.python.org/mailman/listinfo/scikit-learn
186186
- Gitter: https://gitter.im/scikit-learn/scikit-learn
187+
- Logos & Branding: https://github.com/scikit-learn/scikit-learn/tree/main/doc/logos
187188
- Blog: https://blog.scikit-learn.org
188189
- Calendar: https://blog.scikit-learn.org/calendar/
189190
- Twitter: https://twitter.com/scikit_learn

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
versionSpec: '3.9'
3535
- bash: |
3636
# Include pytest compatibility with mypy
37-
pip install pytest flake8 mypy==0.782 black==22.3.0
37+
pip install pytest flake8 mypy==0.961 black==22.3.0
3838
displayName: Install linters
3939
- bash: |
4040
black --check --diff .
4141
displayName: Run black
4242
- bash: |
43-
./build_tools/circle/linting.sh
43+
./build_tools/azure/linting.sh
4444
displayName: Run linting
4545
- bash: |
4646
mypy sklearn/

0 commit comments

Comments
 (0)