8000 Merge remote-tracking branch 'upstream/master' into Proposition-for-B… · scikit-learn/scikit-learn@a7337d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit a7337d2

Browse files
author
Shao Yang Hong
committed
Merge remote-tracking branch 'upstream/master' into Proposition-for-BernoulliNB-and-MultinomialNB-when-alpha-is-close-or-equal-0
# Conflicts: # doc/whats_new/v0.24.rst # sklearn/naive_bayes.py
2 parents 5782e6f + f77fb72 commit a7337d2

File tree

613 files changed

+34742
-13697
lines changed

Some content is hidden

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

613 files changed

+34742
-13697
lines changed

.circleci/config.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ jobs:
77
environment:
88
- OMP_NUM_THREADS: 2
99
- MKL_NUM_THREADS: 2
10-
- MINICONDA_PATH: ~/miniconda
1110
- CONDA_ENV_NAME: testenv
1211
- PYTHON_VERSION: 3.6
13-
- NUMPY_VERSION: 1.13.3
14-
- SCIPY_VERSION: 0.19.1
15-
- MATPLOTLIB_VERSION: 2.1.1
16-
# on conda, this is the latest for python 3.5
17-
# The following places need to be in sync with regard to Cython version:
18-
# - .circleci config file
19-
# - sklearn/_build_utils/__init__.py
20-
# - advanced installation guide
21-
- CYTHON_VERSION: 0.28.5
22-
- SCIKIT_IMAGE_VERSION: 0.13
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'
2319
steps:
2420
- checkout
2521
- run: ./build_tools/circle/checkout_merge_commit.sh
@@ -52,9 +48,15 @@ jobs:
5248
environment:
5349
- OMP_NUM_THREADS: 2
5450
- MKL_NUM_THREADS: 2
55-
- MINICONDA_PATH: ~/miniconda
5651
- CONDA_ENV_NAME: testenv
5752
- PYTHON_VERSION: 3
53+
- NUMPY_VERSION: 'latest'
54+
- SCIPY_VERSION: 'latest'
55+
- MATPLOTLIB_VERSION: 'latest'
56+
- CYTHON_VERSION: 'latest'
57+
- SCIKIT_IMAGE_VERSION: 'latest'
58+
- SPHINX_VERSION: 'min'
59+
- PANDAS_VERSION: 'latest'
5860
steps:
5961
- checkout
6062
- run: ./build_tools/circle/checkout_merge_commit.sh

.codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ coverage:
1717
target: auto
1818
threshold: 1%
1919

20+
codecov:
21+
notify:
22+
# Prevent coverage status to upload multiple times for parallel and long
23+
# running CI pipelines. This configuration is particularly useful on PRs
24+
# to avoid confusion. Note that this value is set to the number of Azure
25+
# Pipeline jobs uploading coverage reports.
26+
after_n_builds: 6
27+
2028
ignore:
2129
- "sklearn/externals"
2230
- "sklearn/_build_utils"

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: ['https://numfocus.org/donate-to-scikit-learn']

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
blank_issues_enabled: false
2+
contact_links:
3+
- name: Stack overflow
4+
url: https://stackoverflow.com/questions/tagged/scikit-learn
5+
about: Please ask and answer usage questions on stackoverflow
6+
- name: Mailing list
7+
url: https://mail.python.org/mailman/listinfo/scikit-learn
8+
about: General discussions and announcements on the mailing list
9+
- name: Gitter
10+
url: https://gitter.im/scikit-learn/scikit-learn
11+
about: Users and developers can sometimes be found on the gitter channel

.github/ISSUE_TEMPLATE/usage_question.md

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

.github/labeler-module.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
module:cluster:
2+
- sklearn/cluster/**/*
3+
4+
module:common:
5+
- sklearn/common/**/*
6+
7+
module:compose:
8+
- sklearn/compose/**/*
9+
10+
module:covariance:
11+
- sklearn/covariance/**/*
12+
13+
module:cross_decomposition:
14+
- sklearn/cross_decomposition/**/*
15+
16+
module:datasets:
17+
- sklearn/datasets/**/*
18+
19+
module:decomposition:
20+
- sklearn/decomposition/**/*
21+
22+
module:ensemble:
23+
- sklearn/ensemble/**/*
24+
25+
module:feature_extraction:
26+
- sklearn/feature_extraction/**/*
27+
28+
module:feature_selection:
29+
- sklearn/feature_selection/**/*
30+
31+
module:gaussian_process:
32+
- sklearn/gaussian_process/**/*
33+
34+
module:impute:
35+
- sklearn/impute/**/*
36+
37+
module:inspection:
38+
- sklearn/inspection/**/*
39+
40+
module:linear_model:
41+
- sklearn/linear_model/**/*
42+
43+
module:manifold:
44+
- sklearn/manifold/**/*
45+
46+
module:metrics:
47+
- sklearn/metrics/**/*
48+
49+
module:mixture:
50+
- sklearn/mixture/**/*
51+
52+
module:model_selection:
53+
- sklearn/model_selection/**/*
54+
55+
module:naive_bayes:
56+
- sklearn/naive_bayes.py
57+
58+
module:neighbors:
59+
- sklearn/neighbors/**/*
60+
61+
module:neural_network:
62+
- sklearn/neural_network/**/*
63+
64+
module:pipeline:
65+
- sklearn/pipeline.py
66+
67+
module:preprocessing:
68+
- sklearn/preprocessing/**/*
69+
70+
module:semi_supervised:
71+
- sklearn/semi_supervised/**/*
72+
73+
module:svm:
74+
- sklearn/svm/**/*
75+
76+
module:tree:
77+
- sklearn/tree/**/*
78+
79+
module:utils:
80+
- sklearn/utils/**/*

.github/labeler.yml

Lines changed: 5 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,5 @@
1-
module:cluster:
2-
- sklearn/cluster/**/*
3-
4-
module:common:
5-
- sklearn/common/**/*
6-
7-
module:compose:
8-
- sklearn/compose/**/*
9-
10-
module:covariance:
11-
- sklearn/covariance/**/*
12-
13-
module:cross_decomposition:
14-
- sklearn/cross_decomposition/**/*
15-
16-
module:datasets:
17-
- sklearn/datasets/**/*
18-
19-
module:decomposition:
20-
- sklearn/decomposition/**/*
21-
22-
module:ensemble:
23-
- sklearn/ensemble/**/*
24-
25-
module:feature_extraction:
26-
- sklearn/feature_extraction/**/*
27-
28-
module:feature_selection:
29-
- sklearn/feature_selection/**/*
30-
31-
module:gaussian_process:
32-
- sklearn/gaussian_process/**/*
33-
34-
module:impute:
35-
- sklearn/impute/**/*
36-
37-
module:inspection:
38-
- sklearn/inspection/**/*
39-
40-
module:linear_model:
41-
- sklearn/linear_model/**/*
42-
43-
module:manifold:
44-
- sklearn/manifold/**/*
45-
46-
module:metrics:
47-
- sklearn/metrics/**/*
48-
49-
module:mixture:
50-
- sklearn/mixture/**/*
51-
52-
module:model_selection:
53-
- sklearn/model_selection/**/*
54-
55-
module:naive_bayes:
56-
- sklearn/naive_bayes.py
57-
58-
module:neighbors:
59-
- sklearn/neighbors/**/*
60-
61-
module:neural_network:
62-
- sklearn/neural_network/**/*
63-
64-
module:pipeline:
65-
- sklearn/pipeline.py
66-
67-
module:preprocessing:
68-
- sklearn/preprocessing/**/*
69-
70-
module:semi_supervised:
71-
- sklearn/semi_supervised/**/*
72-
73-
module:svm:
74-
- sklearn/svm/**/*
75-
76-
module:tree:
77-
- sklearn/tree/**/*
78-
79-
module:utils:
80-
- sklearn/utils/**/*
1+
labels:
2+
'Documentation':
3+
- '\bDOC\b'
4+
'Build / CI':
5+
- '\bCI\b'

.github/workflows/assign.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
jobs:
88
one:
99
runs-on: ubuntu-latest
10+
if: >-
11+
(github.event.comment.body == 'take' ||
12+
github.event.comment.body == 'Take')
13+
&& !github.event.issue.assignee
1014
steps:
11-
- if: github.event.comment.body == 'take'
12-
name:
13-
run: |
14-
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
15-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
16-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X "DELETE" https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/help%20wanted
15+
- run: |
16+
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
17+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
18+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X "DELETE" https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/help%20wanted

.github/workflows/check-manifest.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Check Manifest"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v2
13+
with:
14+
python-version: '3.8'
15+
- name: Install dependencies
16+
# scipy and cython are required to build sdist
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install check-manifest scipy cython
20+
- run: |
21+
check-manifest -v
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name: "Pull Request Labeler"
2-
on:
3-
schedule:
4-
- cron: "*/10 * * * *"
2+
on: pull_request_target
53

64
jobs:
75
triage:
86
runs-on: ubuntu-latest
97
steps:
10-
- uses: thomasjpfan/labeler@v2.4.6
8+
- uses: thomasjpfan/labeler@v2.5.0
119
continue-on-error: true
1210
if: github.repository == 'scikit-learn/scikit-learn'
1311
with:
1412
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1513
max-labels: "3"
14+
configuration-path: ".github/labeler-module.yml"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Pull Request Regex Title Labeler
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
jobs:
7+
8+
labeler:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check Labels
12+
id: labeler
13+
continue-on-error: true
14+
uses: jimschubert/labeler-action@v2
15+
with:
16+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync Pull Request
2+
on:
3+
pull_request_target:
4+
types: [labeled]
5+
6+
jobs:
7+
sync_pull_request:
8+
runs-on: ubuntu-latest
9+
if: contains(github.event.pull_request.labels.*.name, 'ci sync')
10+
steps:
11+
- name: Remove label
12+
run: |
13+
# The label is always removed so that this action can be triggered
14+
# again by adding the label even if the sync fails.
15+
16+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X "DELETE" https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels/ci%20sync
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: '0'
20+
- name: Sync with master
21+
run: |
22+
set -xe
23+
git remote add pr_remote ${{ github.event.pull_request.head.repo.html_url }}
24+
git fetch pr_remote ${{ github.event.pull_request.head.ref }}
25+
git checkout -b pr_branch pr_remote/${{ github.event.pull_request.head.ref }}
26+
git config user.name github-actions
27+
git config user.email github-actions@github.com
28+
git merge origin/master
29+
git push pr_remote HEAD:${{ github.event.pull_request.head.ref }}

.github/workflows/unassign.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Unassign
2-
#Runs when a contributor has unassigned themselves from the issue and adds 'help wanted' and 'stalled' tags
2+
#Runs when a contributor has unassigned themselves from the issue and adds 'help wanted'
33
on:
44
issues:
55
types: unassigned
@@ -9,6 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name:
12+
if: github.event.issue.state == 'open'
1213
run: |
13-
echo "Marking issue ${{ github.event.issue.number }} as stalled"
14-
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"labels": ["help wanted","Stalled"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels
14+
echo "Marking issue ${{ github.event.issue.number }} as help wanted"
15+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"labels": ["help wanted"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels

0 commit comments

Comments
 (0)
0