Skip to content

MNT Add author/license note where missing and add the linter #29477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.1
rev: v0.5.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we bump the min version in _min_dependencies and update the lock files then ?

Otherwise I can imagine that a user has an older version and then the CI complains for errors that he doesn't see locally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR also updates _min_dependencies, should I try to recreate the lock files? I don't mind, but that happens anyway the monday after we merge?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I missed that. For the lock files, it should be fine because it's just the linter, but usually it's better to regenerate in the PR updating the dependencies so that we can see and fix any issue right away.

hooks:
- id: ruff
args: ["--fix", "--output-format=full"]
Expand Down
2 changes: 0 additions & 2 deletions benchmarks/bench_kernel_pca_solvers_time_vs_n_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
of components (this takes more time).
"""

# Authors: Sylvain MARIE, Schneider Electric

import time

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions benchmarks/bench_plot_parallel_pairwise.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import time

import matplotlib.pyplot as plt
Expand Down
3 changes: 3 additions & 0 deletions examples/applications/plot_cyclical_feature_engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Data exploration on the Bike Sharing Demand dataset
# ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions examples/applications/plot_digits_denoising.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

"""

# Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr>
# Licence: BSD 3 clause
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Load the dataset via OpenML
Expand Down
3 changes: 3 additions & 0 deletions examples/applications/plot_face_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
from time import time

Expand Down
3 changes: 3 additions & 0 deletions examples/applications/plot_time_series_lagged_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Analyzing the Bike Sharing Demand dataset
# -----------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions examples/bicluster/plot_bicluster_newsgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import operator
from collections import defaultdict
from time import time
Expand Down
1 change: 1 addition & 0 deletions examples/calibration/plot_calibration_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Dataset
# -------
Expand Down
1 change: 1 addition & 0 deletions examples/calibration/plot_compare_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# %%
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

#
# Dataset
# -------
Expand Down
4 changes: 1 addition & 3 deletions examples/classification/plot_classifier_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

"""

# Code source: Gaël Varoquaux
# Andreas Müller
# Modified for documentation by Jaques Grobler
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
Expand Down
3 changes: 3 additions & 0 deletions examples/classification/plot_lda.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
import numpy as np

Expand Down
3 changes: 3 additions & 0 deletions examples/classification/plot_lda_qda.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
deviation with QDA.
"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Data generation
# ---------------
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_affinity_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import numpy as np

from sklearn import metrics
Expand Down
1 change: 1 addition & 0 deletions examples/cluster/plot_agglomerative_dendrogram.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

"""
=========================================
Plot Hierarchical Clustering Dendrogram
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_bisect_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt

from sklearn.cluster import BisectingKMeans, KMeans
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_cluster_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import time
import warnings
from itertools import cycle, islice
Expand Down
3 changes: 1 addition & 2 deletions examples/cluster/plot_cluster_iris.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

"""

# Code source: Gaël Varoquaux
# Modified for documentation by Jaques Grobler
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_dbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Data generation
# ---------------
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_dict_face_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Load the data
# -------------
Expand Down
3 changes: 1 addition & 2 deletions examples/cluster/plot_digits_agglomeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

"""

# Code source: Gaël Varoquaux
# Modified for documentation by Jaques Grobler
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
Expand Down
4 changes: 4 additions & 0 deletions examples/cluster/plot_hdbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

We first define a couple utility functions for convenience.
"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
import matplotlib.pyplot as plt
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions examples/cluster/plot_inductive_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

"""

# Authors: Chirag Nagpal
# Christos Aridas
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt

Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_kmeans_digits.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Load the dataset
# ----------------
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_kmeans_plusplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt

from sklearn.cluster import kmeans_plusplus
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_kmeans_silhouette_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_linkage_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import time
import warnings
from itertools import cycle, islice
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_mean_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import numpy as np

from sklearn.cluster import MeanShift, estimate_bandwidth
Expand Down
3 changes: 3 additions & 0 deletions examples/cluster/plot_mini_batch_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Generate the data
# -----------------
Expand Down
5 changes: 2 additions & 3 deletions examples/compose/plot_compare_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@

"""

# Authors: Robert McGibbon
# Joel Nothman
# Guillaume Lemaitre
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Illustration of ``Pipeline`` and ``GridSearchCV``
Expand Down
3 changes: 1 addition & 2 deletions examples/compose/plot_digits_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

"""

# Code source: Gaël Varoquaux
# Modified for documentation by Jaques Grobler
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
Expand Down
3 changes: 3 additions & 0 deletions examples/covariance/plot_covariance_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
trade-off.
"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Generate sample data
# --------------------
Expand Down
3 changes: 3 additions & 0 deletions examples/covariance/plot_lw_vs_oas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
import numpy as np
from scipy.linalg import cholesky, toeplitz
Expand Down
3 changes: 3 additions & 0 deletions examples/covariance/plot_mahalanobis_distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@

""" # noqa: E501

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Generate data
# --------------
Expand Down
3 changes: 3 additions & 0 deletions examples/covariance/plot_robust_vs_empirical_covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.font_manager
import matplotlib.pyplot as plt
import numpy as np
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Dataset based latent variables model
# ------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions examples/cross_decomposition/plot_pcr_vs_pls.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# The data
# --------
Expand Down
3 changes: 1 addition & 2 deletions examples/datasets/plot_digits_last_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

"""

# Code source: Gaël Varoquaux
# Modified for documentation by Jaques Grobler
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt
Expand Down
3 changes: 1 addition & 2 deletions examples/datasets/plot_iris_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

"""

# Code source: Gaël Varoquaux
# Modified for documentation by Jaques Grobler
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
Expand Down
3 changes: 3 additions & 0 deletions examples/datasets/plot_random_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

"""

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause

import matplotlib.pyplot as plt

from sklearn.datasets import make_blobs, make_classification, make_gaussian_quantiles
Expand Down
Loading