From 6481ac5173cd64a6c0a575b8757264b9ae0268fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 10 Oct 2024 15:42:41 +0200 Subject: [PATCH 01/31] Basic config + a few fragments --- .../upcoming_release/29634.other.rst | 8 +++ .../linear_model/29105.api.rst | 3 ++ .../linear_model/29419.bugfix.rst | 3 ++ .../linear_model/29442.bugfix.rst | 4 ++ doc/whats_new/upcoming_release/template.rst | 30 +++++++++++ .../upcoming_release/tree/27966.feature.rst | 5 ++ pyproject.toml | 50 +++++++++++++++++++ 7 files changed, 103 insertions(+) create mode 100644 doc/whats_new/upcoming_release/29634.other.rst create mode 100644 doc/whats_new/upcoming_release/linear_model/29105.api.rst create mode 100644 doc/whats_new/upcoming_release/linear_model/29419.bugfix.rst create mode 100644 doc/whats_new/upcoming_release/linear_model/29442.bugfix.rst create mode 100644 doc/whats_new/upcoming_release/template.rst create mode 100644 doc/whats_new/upcoming_release/tree/27966.feature.rst diff --git a/doc/whats_new/upcoming_release/29634.other.rst b/doc/whats_new/upcoming_release/29634.other.rst new file mode 100644 index 0000000000000..343aaa1cf5e0e --- /dev/null +++ b/doc/whats_new/upcoming_release/29634.other.rst @@ -0,0 +1,8 @@ +Dropping support for building with setuptools +--------------------------------------------- + +From scikit-learn 1.6 onwards, support for building with setuptools has been +removed. Meson is the only supported way to build scikit-learn, see +:ref:`Building from source ` for more details. + +:pr:`29400` by :user:`Loïc Estève ` diff --git a/doc/whats_new/upcoming_release/linear_model/29105.api.rst b/doc/whats_new/upcoming_release/linear_model/29105.api.rst new file mode 100644 index 0000000000000..430156e055173 --- /dev/null +++ b/doc/whats_new/upcoming_release/linear_model/29105.api.rst @@ -0,0 +1,3 @@ +- |API| Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter + has no effect. `copy_X` will be removed in 1.8. + :pr:`29105` by :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_release/linear_model/29419.bugfix.rst b/doc/whats_new/upcoming_release/linear_model/29419.bugfix.rst new file mode 100644 index 0000000000000..29f4555027061 --- /dev/null +++ b/doc/whats_new/upcoming_release/linear_model/29419.bugfix.rst @@ -0,0 +1,3 @@ +- |Fix| :class:`linear_model.LogisticRegressionCV` corrects sample weight handling + for the calculation of test scores. + :pr:`29419` by :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_release/linear_model/29442.bugfix.rst b/doc/whats_new/upcoming_release/linear_model/29442.bugfix.rst new file mode 100644 index 0000000000000..0526d48b7fc3c --- /dev/null +++ b/doc/whats_new/upcoming_release/linear_model/29442.bugfix.rst @@ -0,0 +1,4 @@ +- |Fix| :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now + take sample weights into accounts to define the search grid for the internally tuned + `alpha` hyper-parameter. :pr:`29442` by :user:`John Hopfensperger and + :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_release/template.rst b/doc/whats_new/upcoming_release/template.rst new file mode 100644 index 0000000000000..8ce95db61efec --- /dev/null +++ b/doc/whats_new/upcoming_release/template.rst @@ -0,0 +1,30 @@ +{% if render_title %} +{% if versiondata.name %} +{{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }}) +{{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}} +{% else %} +{{ versiondata.version }} ({{ versiondata.date }}) +{{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} +{% endif %} +{% endif %} + +{% set underline = underlines[0] %} + +{% for section, content_per_category in sections.items() %} +{% if content_per_category %} +{{ section }} +{{ underline * section|length }} +{% endif %} + +{% for category, content in content_per_category.items() %} +{% for text, issue_links in content.items() %} +{# TODO for later we can generate tags like |Fix|, |API|, etc ... but need to special case top-level section +|{{ definitions[category]['name'] }}| {{ text }} {{ issue_links|join(', ') }} +#} +{# TODO I don't really understand how you can have multiple issue_links but this is a list so need join +#} +{{ text }} {{ issue_links|join(', ') }} + +{% endfor %} +{% endfor %} +{% endfor %} diff --git a/doc/whats_new/upcoming_release/tree/27966.feature.rst b/doc/whats_new/upcoming_release/tree/27966.feature.rst new file mode 100644 index 0000000000000..02c48b1601d9c --- /dev/null +++ b/doc/whats_new/upcoming_release/tree/27966.feature.rst @@ -0,0 +1,5 @@ +- |Feature| :class:`tree.ExtraTreeClassifier` and :class:`tree.ExtraTreeRegressor` now + support missing-values in the data matrix ``X``. Missing-values are handled by + randomly moving all of the samples to the left, or right child node as the tree is + traversed. + :pr:`27966` by :user:`Adam Li `. diff --git a/pyproject.toml b/pyproject.toml index 2d3c7d881c0c2..fc43fff89f05b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -252,3 +252,53 @@ package = "sklearn" # name of your package "Documentation" = [ "spin.cmds.meson.docs" ] + +[tool.towncrier] + package = "sklearn" + filename = "doc/whats_new/notes-towncrier.rst" + directory = "doc/whats_new/upcoming_release" + underlines = "=-^" # TODO adjust maybe + template = "doc/whats_new/upcoming_release/template.rst" + title_format = "Version {version} ({project_date})" + all_bullets = false + + [[tool.towncrier.type]] + directory = "feature" + name = "New Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "api" + name = "API Changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Bug Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "perf" + name = "Performance Improvements" + showcontent = true + + [[tool.towncrier.type]] + directory = "other" + name = "Other Changes and Additions" + showcontent = true + + [[tool.towncrier.section]] + name = "" + path = "" + + [[tool.towncrier.section]] + name = "sklearn.linear_model" + path = "linear_model" + + [[tool.towncrier.section]] + name = "sklearn.tree" + path = "tree" + + [[tool.towncrier.section]] + name = "sklearn.utils" + path = "utils" From ed8d0b1e057cfda09faf3ab5e1f39718e119181e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 10 Oct 2024 17:38:48 +0200 Subject: [PATCH 02/31] Add all sklearn submodules --- doc/whats_new/notes-towncrier.rst | 40 +++++++ doc/whats_new/upcoming_release/.gitkeep | 0 .../upcoming_release/cluster/.gitkeep | 0 .../upcoming_release/compose/.gitkeep | 0 .../upcoming_release/covariance/.gitkeep | 0 .../cross_decomposition/.gitkeep | 0 .../upcoming_release/datasets/.gitkeep | 0 .../upcoming_release/decomposition/.gitkeep | 0 .../upcoming_release/ensemble/.gitkeep | 0 .../upcoming_release/experimental/.gitkeep | 0 .../upcoming_release/externals/.gitkeep | 0 .../feature_extraction/.gitkeep | 0 .../feature_selection/.gitkeep | 0 .../gaussian_process/.gitkeep | 0 .../upcoming_release/impute/.gitkeep | 0 .../upcoming_release/inspection/.gitkeep | 0 .../upcoming_release/linear_model/.gitkeep | 0 .../upcoming_release/manifold/.gitkeep | 0 .../upcoming_release/metrics/.gitkeep | 0 .../upcoming_release/mixture/.gitkeep | 0 .../upcoming_release/model_selection/.gitkeep | 0 .../upcoming_release/neighbors/.gitkeep | 0 .../upcoming_release/neural_network/.gitkeep | 0 .../upcoming_release/preprocessing/.gitkeep | 0 .../upcoming_release/semi_supervised/.gitkeep | 0 doc/whats_new/upcoming_release/svm/.gitkeep | 0 doc/whats_new/upcoming_release/template.rst | 1 - doc/whats_new/upcoming_release/tree/.gitkeep | 0 doc/whats_new/upcoming_release/utils/.gitkeep | 0 pyproject.toml | 102 +++++++++++++++++- 30 files changed, 139 insertions(+), 4 deletions(-) create mode 100644 doc/whats_new/notes-towncrier.rst create mode 100644 doc/whats_new/upcoming_release/.gitkeep create mode 100644 doc/whats_new/upcoming_release/cluster/.gitkeep create mode 100644 doc/whats_new/upcoming_release/compose/.gitkeep create mode 100644 doc/whats_new/upcoming_release/covariance/.gitkeep create mode 100644 doc/whats_new/upcoming_release/cross_decomposition/.gitkeep create mode 100644 doc/whats_new/upcoming_release/datasets/.gitkeep create mode 100644 doc/whats_new/upcoming_release/decomposition/.gitkeep create mode 100644 doc/whats_new/upcoming_release/ensemble/.gitkeep create mode 100644 doc/whats_new/upcoming_release/experimental/.gitkeep create mode 100644 doc/whats_new/upcoming_release/externals/.gitkeep create mode 100644 doc/whats_new/upcoming_release/feature_extraction/.gitkeep create mode 100644 doc/whats_new/upcoming_release/feature_selection/.gitkeep create mode 100644 doc/whats_new/upcoming_release/gaussian_process/.gitkeep create mode 100644 doc/whats_new/upcoming_release/impute/.gitkeep create mode 100644 doc/whats_new/upcoming_release/inspection/.gitkeep create mode 100644 doc/whats_new/upcoming_release/linear_model/.gitkeep create mode 100644 doc/whats_new/upcoming_release/manifold/.gitkeep create mode 100644 doc/whats_new/upcoming_release/metrics/.gitkeep create mode 100644 doc/whats_new/upcoming_release/mixture/.gitkeep create mode 100644 doc/whats_new/upcoming_release/model_selection/.gitkeep create mode 100644 doc/whats_new/upcoming_release/neighbors/.gitkeep create mode 100644 doc/whats_new/upcoming_release/neural_network/.gitkeep create mode 100644 doc/whats_new/upcoming_release/preprocessing/.gitkeep create mode 100644 doc/whats_new/upcoming_release/semi_supervised/.gitkeep create mode 100644 doc/whats_new/upcoming_release/svm/.gitkeep create mode 100644 doc/whats_new/upcoming_release/tree/.gitkeep create mode 100644 doc/whats_new/upcoming_release/utils/.gitkeep diff --git a/doc/whats_new/notes-towncrier.rst b/doc/whats_new/notes-towncrier.rst new file mode 100644 index 0000000000000..5071d817681c5 --- /dev/null +++ b/doc/whats_new/notes-towncrier.rst @@ -0,0 +1,40 @@ +Version 1.6 (2024-10-10) +======================== + + + + + +Dropping support for building with setuptools +--------------------------------------------- + +From scikit-learn 1.6 onwards, support for building with setuptools has been +removed. Meson is the only supported way to build scikit-learn, see +:ref:`Building from source ` for more details. + +:pr:`29400` by :user:`Loïc Estève ` #29634 + +sklearn.linear_model +-------------------- + +- |Fix| :class:`linear_model.LogisticRegressionCV` corrects sample weight handling + for the calculation of test scores. + :pr:`29419` by :user:`Shruti Nath `. #29419 + +- |Fix| :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now + take sample weights into accounts to define the search grid for the internally tuned + `alpha` hyper-parameter. :pr:`29442` by :user:`John Hopfensperger and + :user:`Shruti Nath `. #29442 + +- |API| Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter + has no effect. `copy_X` will be removed in 1.8. + :pr:`29105` by :user:`Adam Li `. #29105 + +sklearn.tree +------------ + +- |Feature| :class:`tree.ExtraTreeClassifier` and :class:`tree.ExtraTreeRegressor` now + support missing-values in the data matrix ``X``. Missing-values are handled by + randomly moving all of the samples to the left, or right child node as the tree is + traversed. + :pr:`27966` by :user:`Adam Li `. #27966 diff --git a/doc/whats_new/upcoming_release/.gitkeep b/doc/whats_new/upcoming_release/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/cluster/.gitkeep b/doc/whats_new/upcoming_release/cluster/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/compose/.gitkeep b/doc/whats_new/upcoming_release/compose/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/covariance/.gitkeep b/doc/whats_new/upcoming_release/covariance/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/cross_decomposition/.gitkeep b/doc/whats_new/upcoming_release/cross_decomposition/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/datasets/.gitkeep b/doc/whats_new/upcoming_release/datasets/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/decomposition/.gitkeep b/doc/whats_new/upcoming_release/decomposition/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/ensemble/.gitkeep b/doc/whats_new/upcoming_release/ensemble/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/experimental/.gitkeep b/doc/whats_new/upcoming_release/experimental/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/externals/.gitkeep b/doc/whats_new/upcoming_release/externals/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/feature_extraction/.gitkeep b/doc/whats_new/upcoming_release/feature_extraction/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/feature_selection/.gitkeep b/doc/whats_new/upcoming_release/feature_selection/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/gaussian_process/.gitkeep b/doc/whats_new/upcoming_release/gaussian_process/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/impute/.gitkeep b/doc/whats_new/upcoming_release/impute/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/inspection/.gitkeep b/doc/whats_new/upcoming_release/inspection/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/linear_model/.gitkeep b/doc/whats_new/upcoming_release/linear_model/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/manifold/.gitkeep b/doc/whats_new/upcoming_release/manifold/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/metrics/.gitkeep b/doc/whats_new/upcoming_release/metrics/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/mixture/.gitkeep b/doc/whats_new/upcoming_release/mixture/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/model_selection/.gitkeep b/doc/whats_new/upcoming_release/model_selection/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/neighbors/.gitkeep b/doc/whats_new/upcoming_release/neighbors/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/neural_network/.gitkeep b/doc/whats_new/upcoming_release/neural_network/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/preprocessing/.gitkeep b/doc/whats_new/upcoming_release/preprocessing/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/semi_supervised/.gitkeep b/doc/whats_new/upcoming_release/semi_supervised/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/svm/.gitkeep b/doc/whats_new/upcoming_release/svm/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/template.rst b/doc/whats_new/upcoming_release/template.rst index 8ce95db61efec..682ed145d0dd8 100644 --- a/doc/whats_new/upcoming_release/template.rst +++ b/doc/whats_new/upcoming_release/template.rst @@ -15,7 +15,6 @@ {{ section }} {{ underline * section|length }} {% endif %} - {% for category, content in content_per_category.items() %} {% for text, issue_links in content.items() %} {# TODO for later we can generate tags like |Fix|, |API|, etc ... but need to special case top-level section diff --git a/doc/whats_new/upcoming_release/tree/.gitkeep b/doc/whats_new/upcoming_release/tree/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/utils/.gitkeep b/doc/whats_new/upcoming_release/utils/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/pyproject.toml b/pyproject.toml index fc43fff89f05b..0b139bfa4197f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -292,13 +292,109 @@ package = "sklearn" # name of your package path = "" [[tool.towncrier.section]] - name = "sklearn.linear_model" + name = ":mod:`sklearn/cluster`" + path = "cluster" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/compose`" + path = "compose" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/covariance`" + path = "covariance" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/cross_decomposition`" + path = "cross_decomposition" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/datasets`" + path = "datasets" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/decomposition`" + path = "decomposition" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/ensemble`" + path = "ensemble" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/experimental`" + path = "experimental" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/externals`" + path = "externals" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/feature_extraction`" + path = "feature_extraction" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/feature_selection`" + path = "feature_selection" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/gaussian_process`" + path = "gaussian_process" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/impute`" + path = "impute" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/inspection`" + path = "inspection" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/linear_model`" path = "linear_model" [[tool.towncrier.section]] - name = "sklearn.tree" + name = ":mod:`sklearn/manifold`" + path = "manifold" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/metrics`" + path = "metrics" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/mixture`" + path = "mixture" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/model_selection`" + path = "model_selection" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/neighbors`" + path = "neighbors" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/neural_network`" + path = "neural_network" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/preprocessing`" + path = "preprocessing" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/semi_supervised`" + path = "semi_supervised" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/svm`" + path = "svm" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/tests`" + path = "tests" + + [[tool.towncrier.section]] + name = ":mod:`sklearn/tree`" path = "tree" [[tool.towncrier.section]] - name = "sklearn.utils" + name = ":mod:`sklearn/utils`" path = "utils" From 4fe7e8d058a733e6e9d718854d4add402db1c91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 10 Oct 2024 17:49:10 +0200 Subject: [PATCH 03/31] Fix PR number --- .../upcoming_release/{29634.other.rst => 29400.other.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/whats_new/upcoming_release/{29634.other.rst => 29400.other.rst} (100%) diff --git a/doc/whats_new/upcoming_release/29634.other.rst b/doc/whats_new/upcoming_release/29400.other.rst similarity index 100% rename from doc/whats_new/upcoming_release/29634.other.rst rename to doc/whats_new/upcoming_release/29400.other.rst From bf87d5e82beca60ff1fe8ee14d61acd21c19fdcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 10 Oct 2024 17:49:23 +0200 Subject: [PATCH 04/31] Fix PR formatting --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 0b139bfa4197f..6b2ad1c54638e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -258,6 +258,7 @@ package = "sklearn" # name of your package filename = "doc/whats_new/notes-towncrier.rst" directory = "doc/whats_new/upcoming_release" underlines = "=-^" # TODO adjust maybe + issue_format = ":pr:`{issue}`" template = "doc/whats_new/upcoming_release/template.rst" title_format = "Version {version} ({project_date})" all_bullets = false From 78c079e35a8d6c3d1ec405cdd89cb87027b3a8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 10 Oct 2024 18:23:42 +0200 Subject: [PATCH 05/31] Use correct categories --- doc/whats_new/upcoming_release/template.rst | 2 -- pyproject.toml | 26 ++++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/doc/whats_new/upcoming_release/template.rst b/doc/whats_new/upcoming_release/template.rst index 682ed145d0dd8..28262f98a7412 100644 --- a/doc/whats_new/upcoming_release/template.rst +++ b/doc/whats_new/upcoming_release/template.rst @@ -7,9 +7,7 @@ {{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} {% endif %} {% endif %} - {% set underline = underlines[0] %} - {% for section, content_per_category in sections.items() %} {% if content_per_category %} {{ section }} diff --git a/pyproject.toml b/pyproject.toml index 6b2ad1c54638e..a215941947a56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -263,29 +263,39 @@ package = "sklearn" # name of your package title_format = "Version {version} ({project_date})" all_bullets = false + [[tool.towncrier.type]] + directory = "major-feature" + name = "" + showcontent = true + [[tool.towncrier.type]] directory = "feature" - name = "New Features" + name = "" showcontent = true [[tool.towncrier.type]] - directory = "api" - name = "API Changes" + directory = "efficiency" + name = "" showcontent = true [[tool.towncrier.type]] - directory = "bugfix" - name = "Bug Fixes" + directory = "enhancement" + name = "" showcontent = true [[tool.towncrier.type]] - directory = "perf" - name = "Performance Improvements" + directory = "api" + name = "" + showcontent = true + + [[tool.towncrier.type]] + directory = "fix" + name = "" showcontent = true [[tool.towncrier.type]] directory = "other" - name = "Other Changes and Additions" + name = "" showcontent = true [[tool.towncrier.section]] From a5ab7fcd94047f83de93db603c8cba1f72f333c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 10 Oct 2024 18:48:50 +0200 Subject: [PATCH 06/31] wip on adding top-level sections --- .../upcoming_release/array-api/.gitkeep | 0 .../upcoming_release/changed-models/.gitkeep | 0 .../custom-top-level/.gitkeep | 0 .../{ => custom-top-level}/29400.other.rst | 0 .../upcoming_release/many-modules/.gitkeep | 0 .../metadata-routing/.gitkeep | 0 .../upcoming_release/security/.gitkeep | 0 doc/whats_new/upcoming_release/template.rst | 1 + pyproject.toml | 22 ++++++++++++++++++- 9 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 doc/whats_new/upcoming_release/array-api/.gitkeep create mode 100644 doc/whats_new/upcoming_release/changed-models/.gitkeep create mode 100644 doc/whats_new/upcoming_release/custom-top-level/.gitkeep rename doc/whats_new/upcoming_release/{ => custom-top-level}/29400.other.rst (100%) create mode 100644 doc/whats_new/upcoming_release/many-modules/.gitkeep create mode 100644 doc/whats_new/upcoming_release/metadata-routing/.gitkeep create mode 100644 doc/whats_new/upcoming_release/security/.gitkeep diff --git a/doc/whats_new/upcoming_release/array-api/.gitkeep b/doc/whats_new/upcoming_release/array-api/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/changed-models/.gitkeep b/doc/whats_new/upcoming_release/changed-models/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/custom-top-level/.gitkeep b/doc/whats_new/upcoming_release/custom-top-level/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/29400.other.rst b/doc/whats_new/upcoming_release/custom-top-level/29400.other.rst similarity index 100% rename from doc/whats_new/upcoming_release/29400.other.rst rename to doc/whats_new/upcoming_release/custom-top-level/29400.other.rst diff --git a/doc/whats_new/upcoming_release/many-modules/.gitkeep b/doc/whats_new/upcoming_release/many-modules/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/metadata-routing/.gitkeep b/doc/whats_new/upcoming_release/metadata-routing/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/security/.gitkeep b/doc/whats_new/upcoming_release/security/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_release/template.rst b/doc/whats_new/upcoming_release/template.rst index 28262f98a7412..1e2e79b602ecb 100644 --- a/doc/whats_new/upcoming_release/template.rst +++ b/doc/whats_new/upcoming_release/template.rst @@ -7,6 +7,7 @@ {{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} {% endif %} {% endif %} + {% set underline = underlines[0] %} {% for section, content_per_category in sections.items() %} {% if content_per_category %} diff --git a/pyproject.toml b/pyproject.toml index a215941947a56..097c701039e1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -298,9 +298,29 @@ package = "sklearn" # name of your package name = "" showcontent = true + [[tool.towncrier.section]] + name = "Security" + path = "security" + + [[tool.towncrier.section]] + name = "Changed models" + path = "changed-models" + + [[tool.towncrier.section]] + name = "Changes impacting many modules" + path = "many-modules" + + [[tool.towncrier.section]] + name = "Support for Array API" + path = "array-api" + + [[tool.towncrier.section]] + name = "Metadata routing" + path = "metadata-routing" + [[tool.towncrier.section]] name = "" - path = "" + path = "custom-top-level" [[tool.towncrier.section]] name = ":mod:`sklearn/cluster`" From de44dfa014dc9507f02424ef4e334b57d8abf98f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 09:18:16 +0200 Subject: [PATCH 07/31] Rename folder --- doc/whats_new/{upcoming_release => upcoming_changes}/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/array-api/.gitkeep | 0 .../changed-models/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/cluster/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/compose/.gitkeep | 0 .../covariance/.gitkeep | 0 .../cross_decomposition/.gitkeep | 0 .../custom-top-level/.gitkeep | 0 .../custom-top-level/29400.other.rst | 0 .../{upcoming_release => upcoming_changes}/datasets/.gitkeep | 0 .../decomposition/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/ensemble/.gitkeep | 0 .../experimental/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/externals/.gitkeep | 0 .../feature_extraction/.gitkeep | 0 .../feature_selection/.gitkeep | 0 .../gaussian_process/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/impute/.gitkeep | 0 .../inspection/.gitkeep | 0 .../linear_model/.gitkeep | 0 .../linear_model/29105.api.rst | 0 .../linear_model/29419.bugfix.rst | 0 .../linear_model/29442.bugfix.rst | 0 .../{upcoming_release => upcoming_changes}/manifold/.gitkeep | 0 .../many-modules/.gitkeep | 0 .../metadata-routing/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/metrics/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/mixture/.gitkeep | 0 .../model_selection/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/neighbors/.gitkeep | 0 .../neural_network/.gitkeep | 0 .../preprocessing/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/security/.gitkeep | 0 .../semi_supervised/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/svm/.gitkeep | 0 .../{upcoming_release => upcoming_changes}/template.rst | 0 .../{upcoming_release => upcoming_changes}/tree/.gitkeep | 0 .../tree/27966.feature.rst | 0 .../{upcoming_release => upcoming_changes}/utils/.gitkeep | 0 pyproject.toml | 4 ++-- 40 files changed, 2 insertions(+), 2 deletions(-) rename doc/whats_new/{upcoming_release => upcoming_changes}/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/array-api/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/changed-models/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/cluster/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/compose/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/covariance/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/cross_decomposition/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/custom-top-level/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/custom-top-level/29400.other.rst (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/datasets/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/decomposition/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/ensemble/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/experimental/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/externals/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/feature_extraction/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/feature_selection/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/gaussian_process/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/impute/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/inspection/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/linear_model/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/linear_model/29105.api.rst (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/linear_model/29419.bugfix.rst (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/linear_model/29442.bugfix.rst (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/manifold/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/many-modules/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/metadata-routing/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/metrics/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/mixture/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/model_selection/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/neighbors/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/neural_network/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/preprocessing/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/security/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/semi_supervised/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/svm/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/template.rst (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/tree/.gitkeep (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/tree/27966.feature.rst (100%) rename doc/whats_new/{upcoming_release => upcoming_changes}/utils/.gitkeep (100%) diff --git a/doc/whats_new/upcoming_release/.gitkeep b/doc/whats_new/upcoming_changes/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/.gitkeep rename to doc/whats_new/upcoming_changes/.gitkeep diff --git a/doc/whats_new/upcoming_release/array-api/.gitkeep b/doc/whats_new/upcoming_changes/array-api/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/array-api/.gitkeep rename to doc/whats_new/upcoming_changes/array-api/.gitkeep diff --git a/doc/whats_new/upcoming_release/changed-models/.gitkeep b/doc/whats_new/upcoming_changes/changed-models/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/changed-models/.gitkeep rename to doc/whats_new/upcoming_changes/changed-models/.gitkeep diff --git a/doc/whats_new/upcoming_release/cluster/.gitkeep b/doc/whats_new/upcoming_changes/cluster/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/cluster/.gitkeep rename to doc/whats_new/upcoming_changes/cluster/.gitkeep diff --git a/doc/whats_new/upcoming_release/compose/.gitkeep b/doc/whats_new/upcoming_changes/compose/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/compose/.gitkeep rename to doc/whats_new/upcoming_changes/compose/.gitkeep diff --git a/doc/whats_new/upcoming_release/covariance/.gitkeep b/doc/whats_new/upcoming_changes/covariance/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/covariance/.gitkeep rename to doc/whats_new/upcoming_changes/covariance/.gitkeep diff --git a/doc/whats_new/upcoming_release/cross_decomposition/.gitkeep b/doc/whats_new/upcoming_changes/cross_decomposition/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/cross_decomposition/.gitkeep rename to doc/whats_new/upcoming_changes/cross_decomposition/.gitkeep diff --git a/doc/whats_new/upcoming_release/custom-top-level/.gitkeep b/doc/whats_new/upcoming_changes/custom-top-level/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/custom-top-level/.gitkeep rename to doc/whats_new/upcoming_changes/custom-top-level/.gitkeep diff --git a/doc/whats_new/upcoming_release/custom-top-level/29400.other.rst b/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst similarity index 100% rename from doc/whats_new/upcoming_release/custom-top-level/29400.other.rst rename to doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst diff --git a/doc/whats_new/upcoming_release/datasets/.gitkeep b/doc/whats_new/upcoming_changes/datasets/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/datasets/.gitkeep rename to doc/whats_new/upcoming_changes/datasets/.gitkeep diff --git a/doc/whats_new/upcoming_release/decomposition/.gitkeep b/doc/whats_new/upcoming_changes/decomposition/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/decomposition/.gitkeep rename to doc/whats_new/upcoming_changes/decomposition/.gitkeep diff --git a/doc/whats_new/upcoming_release/ensemble/.gitkeep b/doc/whats_new/upcoming_changes/ensemble/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/ensemble/.gitkeep rename to doc/whats_new/upcoming_changes/ensemble/.gitkeep diff --git a/doc/whats_new/upcoming_release/experimental/.gitkeep b/doc/whats_new/upcoming_changes/experimental/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/experimental/.gitkeep rename to doc/whats_new/upcoming_changes/experimental/.gitkeep diff --git a/doc/whats_new/upcoming_release/externals/.gitkeep b/doc/whats_new/upcoming_changes/externals/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/externals/.gitkeep rename to doc/whats_new/upcoming_changes/externals/.gitkeep diff --git a/doc/whats_new/upcoming_release/feature_extraction/.gitkeep b/doc/whats_new/upcoming_changes/feature_extraction/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/feature_extraction/.gitkeep rename to doc/whats_new/upcoming_changes/feature_extraction/.gitkeep diff --git a/doc/whats_new/upcoming_release/feature_selection/.gitkeep b/doc/whats_new/upcoming_changes/feature_selection/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/feature_selection/.gitkeep rename to doc/whats_new/upcoming_changes/feature_selection/.gitkeep diff --git a/doc/whats_new/upcoming_release/gaussian_process/.gitkeep b/doc/whats_new/upcoming_changes/gaussian_process/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/gaussian_process/.gitkeep rename to doc/whats_new/upcoming_changes/gaussian_process/.gitkeep diff --git a/doc/whats_new/upcoming_release/impute/.gitkeep b/doc/whats_new/upcoming_changes/impute/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/impute/.gitkeep rename to doc/whats_new/upcoming_changes/impute/.gitkeep diff --git a/doc/whats_new/upcoming_release/inspection/.gitkeep b/doc/whats_new/upcoming_changes/inspection/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/inspection/.gitkeep rename to doc/whats_new/upcoming_changes/inspection/.gitkeep diff --git a/doc/whats_new/upcoming_release/linear_model/.gitkeep b/doc/whats_new/upcoming_changes/linear_model/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/linear_model/.gitkeep rename to doc/whats_new/upcoming_changes/linear_model/.gitkeep diff --git a/doc/whats_new/upcoming_release/linear_model/29105.api.rst b/doc/whats_new/upcoming_changes/linear_model/29105.api.rst similarity index 100% rename from doc/whats_new/upcoming_release/linear_model/29105.api.rst rename to doc/whats_new/upcoming_changes/linear_model/29105.api.rst diff --git a/doc/whats_new/upcoming_release/linear_model/29419.bugfix.rst b/doc/whats_new/upcoming_changes/linear_model/29419.bugfix.rst similarity index 100% rename from doc/whats_new/upcoming_release/linear_model/29419.bugfix.rst rename to doc/whats_new/upcoming_changes/linear_model/29419.bugfix.rst diff --git a/doc/whats_new/upcoming_release/linear_model/29442.bugfix.rst b/doc/whats_new/upcoming_changes/linear_model/29442.bugfix.rst similarity index 100% rename from doc/whats_new/upcoming_release/linear_model/29442.bugfix.rst rename to doc/whats_new/upcoming_changes/linear_model/29442.bugfix.rst diff --git a/doc/whats_new/upcoming_release/manifold/.gitkeep b/doc/whats_new/upcoming_changes/manifold/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/manifold/.gitkeep rename to doc/whats_new/upcoming_changes/manifold/.gitkeep diff --git a/doc/whats_new/upcoming_release/many-modules/.gitkeep b/doc/whats_new/upcoming_changes/many-modules/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/many-modules/.gitkeep rename to doc/whats_new/upcoming_changes/many-modules/.gitkeep diff --git a/doc/whats_new/upcoming_release/metadata-routing/.gitkeep b/doc/whats_new/upcoming_changes/metadata-routing/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/metadata-routing/.gitkeep rename to doc/whats_new/upcoming_changes/metadata-routing/.gitkeep diff --git a/doc/whats_new/upcoming_release/metrics/.gitkeep b/doc/whats_new/upcoming_changes/metrics/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/metrics/.gitkeep rename to doc/whats_new/upcoming_changes/metrics/.gitkeep diff --git a/doc/whats_new/upcoming_release/mixture/.gitkeep b/doc/whats_new/upcoming_changes/mixture/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/mixture/.gitkeep rename to doc/whats_new/upcoming_changes/mixture/.gitkeep diff --git a/doc/whats_new/upcoming_release/model_selection/.gitkeep b/doc/whats_new/upcoming_changes/model_selection/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/model_selection/.gitkeep rename to doc/whats_new/upcoming_changes/model_selection/.gitkeep diff --git a/doc/whats_new/upcoming_release/neighbors/.gitkeep b/doc/whats_new/upcoming_changes/neighbors/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/neighbors/.gitkeep rename to doc/whats_new/upcoming_changes/neighbors/.gitkeep diff --git a/doc/whats_new/upcoming_release/neural_network/.gitkeep b/doc/whats_new/upcoming_changes/neural_network/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/neural_network/.gitkeep rename to doc/whats_new/upcoming_changes/neural_network/.gitkeep diff --git a/doc/whats_new/upcoming_release/preprocessing/.gitkeep b/doc/whats_new/upcoming_changes/preprocessing/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/preprocessing/.gitkeep rename to doc/whats_new/upcoming_changes/preprocessing/.gitkeep diff --git a/doc/whats_new/upcoming_release/security/.gitkeep b/doc/whats_new/upcoming_changes/security/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/security/.gitkeep rename to doc/whats_new/upcoming_changes/security/.gitkeep diff --git a/doc/whats_new/upcoming_release/semi_supervised/.gitkeep b/doc/whats_new/upcoming_changes/semi_supervised/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/semi_supervised/.gitkeep rename to doc/whats_new/upcoming_changes/semi_supervised/.gitkeep diff --git a/doc/whats_new/upcoming_release/svm/.gitkeep b/doc/whats_new/upcoming_changes/svm/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/svm/.gitkeep rename to doc/whats_new/upcoming_changes/svm/.gitkeep diff --git a/doc/whats_new/upcoming_release/template.rst b/doc/whats_new/upcoming_changes/template.rst similarity index 100% rename from doc/whats_new/upcoming_release/template.rst rename to doc/whats_new/upcoming_changes/template.rst diff --git a/doc/whats_new/upcoming_release/tree/.gitkeep b/doc/whats_new/upcoming_changes/tree/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/tree/.gitkeep rename to doc/whats_new/upcoming_changes/tree/.gitkeep diff --git a/doc/whats_new/upcoming_release/tree/27966.feature.rst b/doc/whats_new/upcoming_changes/tree/27966.feature.rst similarity index 100% rename from doc/whats_new/upcoming_release/tree/27966.feature.rst rename to doc/whats_new/upcoming_changes/tree/27966.feature.rst diff --git a/doc/whats_new/upcoming_release/utils/.gitkeep b/doc/whats_new/upcoming_changes/utils/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_release/utils/.gitkeep rename to doc/whats_new/upcoming_changes/utils/.gitkeep diff --git a/pyproject.toml b/pyproject.toml index 097c701039e1c..b8a0288e9cc2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -256,10 +256,10 @@ package = "sklearn" # name of your package [tool.towncrier] package = "sklearn" filename = "doc/whats_new/notes-towncrier.rst" - directory = "doc/whats_new/upcoming_release" + directory = "doc/whats_new/upcoming_changes" underlines = "=-^" # TODO adjust maybe issue_format = ":pr:`{issue}`" - template = "doc/whats_new/upcoming_release/template.rst" + template = "doc/whats_new/upcoming_changes/template.rst" title_format = "Version {version} ({project_date})" all_bullets = false From a8de579a84f1b66ed09759af45d5745160600f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 09:24:05 +0200 Subject: [PATCH 08/31] Prefix modules with sklearn. --- .../{cluster => sklearn.cluster}/.gitkeep | 0 .../{compose => sklearn.compose}/.gitkeep | 0 .../.gitkeep | 0 .../.gitkeep | 0 .../{datasets => sklearn.datasets}/.gitkeep | 0 .../.gitkeep | 0 .../{ensemble => sklearn.ensemble}/.gitkeep | 0 .../.gitkeep | 0 .../{externals => sklearn.externals}/.gitkeep | 0 .../.gitkeep | 0 .../.gitkeep | 0 .../.gitkeep | 0 .../{impute => sklearn.impute}/.gitkeep | 0 .../.gitkeep | 0 .../.gitkeep | 0 .../29105.api.rst | 0 .../29419.bugfix.rst | 0 .../29442.bugfix.rst | 0 .../{manifold => sklearn.manifold}/.gitkeep | 0 .../{metrics => sklearn.metrics}/.gitkeep | 0 .../{mixture => sklearn.mixture}/.gitkeep | 0 .../.gitkeep | 0 .../{neighbors => sklearn.neighbors}/.gitkeep | 0 .../.gitkeep | 0 .../.gitkeep | 0 .../.gitkeep | 0 .../{svm => sklearn.svm}/.gitkeep | 0 .../{tree => sklearn.tree}/.gitkeep | 0 .../{tree => sklearn.tree}/27966.feature.rst | 0 .../{utils => sklearn.utils}/.gitkeep | 0 pyproject.toml | 56 +++++++++---------- 31 files changed, 26 insertions(+), 30 deletions(-) rename doc/whats_new/upcoming_changes/{cluster => sklearn.cluster}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{compose => sklearn.compose}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{covariance => sklearn.covariance}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{cross_decomposition => sklearn.cross_decomposition}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{datasets => sklearn.datasets}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{decomposition => sklearn.decomposition}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{ensemble => sklearn.ensemble}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{experimental => sklearn.experimental}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{externals => sklearn.externals}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{feature_extraction => sklearn.feature_extraction}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{feature_selection => sklearn.feature_selection}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{gaussian_process => sklearn.gaussian_process}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{impute => sklearn.impute}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{inspection => sklearn.inspection}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{linear_model => sklearn.linear_model}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{linear_model => sklearn.linear_model}/29105.api.rst (100%) rename doc/whats_new/upcoming_changes/{linear_model => sklearn.linear_model}/29419.bugfix.rst (100%) rename doc/whats_new/upcoming_changes/{linear_model => sklearn.linear_model}/29442.bugfix.rst (100%) rename doc/whats_new/upcoming_changes/{manifold => sklearn.manifold}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{metrics => sklearn.metrics}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{mixture => sklearn.mixture}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{model_selection => sklearn.model_selection}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{neighbors => sklearn.neighbors}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{neural_network => sklearn.neural_network}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{preprocessing => sklearn.preprocessing}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{semi_supervised => sklearn.semi_supervised}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{svm => sklearn.svm}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{tree => sklearn.tree}/.gitkeep (100%) rename doc/whats_new/upcoming_changes/{tree => sklearn.tree}/27966.feature.rst (100%) rename doc/whats_new/upcoming_changes/{utils => sklearn.utils}/.gitkeep (100%) diff --git a/doc/whats_new/upcoming_changes/cluster/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.cluster/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/cluster/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.cluster/.gitkeep diff --git a/doc/whats_new/upcoming_changes/compose/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.compose/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/compose/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.compose/.gitkeep diff --git a/doc/whats_new/upcoming_changes/covariance/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.covariance/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/covariance/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.covariance/.gitkeep diff --git a/doc/whats_new/upcoming_changes/cross_decomposition/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.cross_decomposition/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/cross_decomposition/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.cross_decomposition/.gitkeep diff --git a/doc/whats_new/upcoming_changes/datasets/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.datasets/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/datasets/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.datasets/.gitkeep diff --git a/doc/whats_new/upcoming_changes/decomposition/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.decomposition/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/decomposition/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.decomposition/.gitkeep diff --git a/doc/whats_new/upcoming_changes/ensemble/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.ensemble/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/ensemble/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.ensemble/.gitkeep diff --git a/doc/whats_new/upcoming_changes/experimental/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.experimental/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/experimental/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.experimental/.gitkeep diff --git a/doc/whats_new/upcoming_changes/externals/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.externals/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/externals/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.externals/.gitkeep diff --git a/doc/whats_new/upcoming_changes/feature_extraction/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.feature_extraction/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/feature_extraction/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.feature_extraction/.gitkeep diff --git a/doc/whats_new/upcoming_changes/feature_selection/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.feature_selection/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/feature_selection/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.feature_selection/.gitkeep diff --git a/doc/whats_new/upcoming_changes/gaussian_process/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.gaussian_process/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/gaussian_process/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.gaussian_process/.gitkeep diff --git a/doc/whats_new/upcoming_changes/impute/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.impute/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/impute/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.impute/.gitkeep diff --git a/doc/whats_new/upcoming_changes/inspection/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.inspection/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/inspection/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.inspection/.gitkeep diff --git a/doc/whats_new/upcoming_changes/linear_model/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.linear_model/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/linear_model/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.linear_model/.gitkeep diff --git a/doc/whats_new/upcoming_changes/linear_model/29105.api.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst similarity index 100% rename from doc/whats_new/upcoming_changes/linear_model/29105.api.rst rename to doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst diff --git a/doc/whats_new/upcoming_changes/linear_model/29419.bugfix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.bugfix.rst similarity index 100% rename from doc/whats_new/upcoming_changes/linear_model/29419.bugfix.rst rename to doc/whats_new/upcoming_changes/sklearn.linear_model/29419.bugfix.rst diff --git a/doc/whats_new/upcoming_changes/linear_model/29442.bugfix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.bugfix.rst similarity index 100% rename from doc/whats_new/upcoming_changes/linear_model/29442.bugfix.rst rename to doc/whats_new/upcoming_changes/sklearn.linear_model/29442.bugfix.rst diff --git a/doc/whats_new/upcoming_changes/manifold/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.manifold/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/manifold/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.manifold/.gitkeep diff --git a/doc/whats_new/upcoming_changes/metrics/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.metrics/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/metrics/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.metrics/.gitkeep diff --git a/doc/whats_new/upcoming_changes/mixture/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.mixture/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/mixture/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.mixture/.gitkeep diff --git a/doc/whats_new/upcoming_changes/model_selection/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.model_selection/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/model_selection/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.model_selection/.gitkeep diff --git a/doc/whats_new/upcoming_changes/neighbors/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.neighbors/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/neighbors/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.neighbors/.gitkeep diff --git a/doc/whats_new/upcoming_changes/neural_network/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.neural_network/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/neural_network/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.neural_network/.gitkeep diff --git a/doc/whats_new/upcoming_changes/preprocessing/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.preprocessing/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/preprocessing/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.preprocessing/.gitkeep diff --git a/doc/whats_new/upcoming_changes/semi_supervised/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.semi_supervised/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/semi_supervised/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.semi_supervised/.gitkeep diff --git a/doc/whats_new/upcoming_changes/svm/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.svm/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/svm/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.svm/.gitkeep diff --git a/doc/whats_new/upcoming_changes/tree/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.tree/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/tree/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.tree/.gitkeep diff --git a/doc/whats_new/upcoming_changes/tree/27966.feature.rst b/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst similarity index 100% rename from doc/whats_new/upcoming_changes/tree/27966.feature.rst rename to doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst diff --git a/doc/whats_new/upcoming_changes/utils/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.utils/.gitkeep similarity index 100% rename from doc/whats_new/upcoming_changes/utils/.gitkeep rename to doc/whats_new/upcoming_changes/sklearn.utils/.gitkeep diff --git a/pyproject.toml b/pyproject.toml index b8a0288e9cc2f..abd0e10402f62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -324,108 +324,104 @@ package = "sklearn" # name of your package [[tool.towncrier.section]] name = ":mod:`sklearn/cluster`" - path = "cluster" + path = "sklearn.cluster" [[tool.towncrier.section]] name = ":mod:`sklearn/compose`" - path = "compose" + path = "sklearn.compose" [[tool.towncrier.section]] name = ":mod:`sklearn/covariance`" - path = "covariance" + path = "sklearn.covariance" [[tool.towncrier.section]] name = ":mod:`sklearn/cross_decomposition`" - path = "cross_decomposition" + path = "sklearn.cross_decomposition" [[tool.towncrier.section]] name = ":mod:`sklearn/datasets`" - path = "datasets" + path = "sklearn.datasets" [[tool.towncrier.section]] name = ":mod:`sklearn/decomposition`" - path = "decomposition" + path = "sklearn.decomposition" [[tool.towncrier.section]] name = ":mod:`sklearn/ensemble`" - path = "ensemble" + path = "sklearn.ensemble" [[tool.towncrier.section]] name = ":mod:`sklearn/experimental`" - path = "experimental" + path = "sklearn.experimental" [[tool.towncrier.section]] name = ":mod:`sklearn/externals`" - path = "externals" + path = "sklearn.externals" [[tool.towncrier.section]] name = ":mod:`sklearn/feature_extraction`" - path = "feature_extraction" + path = "sklearn.feature_extraction" [[tool.towncrier.section]] name = ":mod:`sklearn/feature_selection`" - path = "feature_selection" + path = "sklearn.feature_selection" [[tool.towncrier.section]] name = ":mod:`sklearn/gaussian_process`" - path = "gaussian_process" + path = "sklearn.gaussian_process" [[tool.towncrier.section]] name = ":mod:`sklearn/impute`" - path = "impute" + path = "sklearn.impute" [[tool.towncrier.section]] name = ":mod:`sklearn/inspection`" - path = "inspection" + path = "sklearn.inspection" [[tool.towncrier.section]] name = ":mod:`sklearn/linear_model`" - path = "linear_model" + path = "sklearn.linear_model" [[tool.towncrier.section]] name = ":mod:`sklearn/manifold`" - path = "manifold" + path = "sklearn.manifold" [[tool.towncrier.section]] name = ":mod:`sklearn/metrics`" - path = "metrics" + path = "sklearn.metrics" [[tool.towncrier.section]] name = ":mod:`sklearn/mixture`" - path = "mixture" + path = "sklearn.mixture" [[tool.towncrier.section]] name = ":mod:`sklearn/model_selection`" - path = "model_selection" + path = "sklearn.model_selection" [[tool.towncrier.section]] name = ":mod:`sklearn/neighbors`" - path = "neighbors" + path = "sklearn.neighbors" [[tool.towncrier.section]] name = ":mod:`sklearn/neural_network`" - path = "neural_network" + path = "sklearn.neural_network" [[tool.towncrier.section]] name = ":mod:`sklearn/preprocessing`" - path = "preprocessing" + path = "sklearn.preprocessing" [[tool.towncrier.section]] name = ":mod:`sklearn/semi_supervised`" - path = "semi_supervised" + path = "sklearn.semi_supervised" [[tool.towncrier.section]] name = ":mod:`sklearn/svm`" - path = "svm" - - [[tool.towncrier.section]] - name = ":mod:`sklearn/tests`" - path = "tests" + path = "sklearn.svm" [[tool.towncrier.section]] name = ":mod:`sklearn/tree`" - path = "tree" + path = "sklearn.tree" [[tool.towncrier.section]] name = ":mod:`sklearn/utils`" - path = "utils" + path = "sklearn.utils" From ece7e517cedd3188da70f97b3b272527f66ab159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 09:25:41 +0200 Subject: [PATCH 09/31] Add fragments to many-modules --- doc/whats_new/upcoming_changes/many-modules/29696.other.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/whats_new/upcoming_changes/many-modules/29696.other.rst diff --git a/doc/whats_new/upcoming_changes/many-modules/29696.other.rst b/doc/whats_new/upcoming_changes/many-modules/29696.other.rst new file mode 100644 index 0000000000000..68dac6a513191 --- /dev/null +++ b/doc/whats_new/upcoming_changes/many-modules/29696.other.rst @@ -0,0 +1,5 @@ +- |API| :func:`utils.validation.validate_data` is introduced and replaces previously + private `base.BaseEstimator._validate_data` method. This is intended for third party + estimator developers, who should use this function in most cases instead of + :func:`utils.validation.check_array` and :func:`utils.validation.check_X_y`. + :pr:`29696` by `Adrin Jalali`_. From b10dab7aad4deaada6371fe6dcc8ba469dbe636f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 10:17:08 +0200 Subject: [PATCH 10/31] Fix fragment names --- .../sklearn.linear_model/{29419.bugfix.rst => 29419.fix.rst} | 0 .../sklearn.linear_model/{29442.bugfix.rst => 29442.fix.rst} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename doc/whats_new/upcoming_changes/sklearn.linear_model/{29419.bugfix.rst => 29419.fix.rst} (100%) rename doc/whats_new/upcoming_changes/sklearn.linear_model/{29442.bugfix.rst => 29442.fix.rst} (100%) diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.bugfix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst similarity index 100% rename from doc/whats_new/upcoming_changes/sklearn.linear_model/29419.bugfix.rst rename to doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.bugfix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst similarity index 100% rename from doc/whats_new/upcoming_changes/sklearn.linear_model/29442.bugfix.rst rename to doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst From ac1033833773d483bc7e706f9832d0f02bd94cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 10:17:55 +0200 Subject: [PATCH 11/31] notes-towncrier is not supposed to be added for now --- doc/whats_new/notes-towncrier.rst | 40 ------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 doc/whats_new/notes-towncrier.rst diff --git a/doc/whats_new/notes-towncrier.rst b/doc/whats_new/notes-towncrier.rst deleted file mode 100644 index 5071d817681c5..0000000000000 --- a/doc/whats_new/notes-towncrier.rst +++ /dev/null @@ -1,40 +0,0 @@ -Version 1.6 (2024-10-10) -======================== - - - - - -Dropping support for building with setuptools ---------------------------------------------- - -From scikit-learn 1.6 onwards, support for building with setuptools has been -removed. Meson is the only supported way to build scikit-learn, see -:ref:`Building from source ` for more details. - -:pr:`29400` by :user:`Loïc Estève ` #29634 - -sklearn.linear_model --------------------- - -- |Fix| :class:`linear_model.LogisticRegressionCV` corrects sample weight handling - for the calculation of test scores. - :pr:`29419` by :user:`Shruti Nath `. #29419 - -- |Fix| :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now - take sample weights into accounts to define the search grid for the internally tuned - `alpha` hyper-parameter. :pr:`29442` by :user:`John Hopfensperger and - :user:`Shruti Nath `. #29442 - -- |API| Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter - has no effect. `copy_X` will be removed in 1.8. - :pr:`29105` by :user:`Adam Li `. #29105 - -sklearn.tree ------------- - -- |Feature| :class:`tree.ExtraTreeClassifier` and :class:`tree.ExtraTreeRegressor` now - support missing-values in the data matrix ``X``. Missing-values are handled by - randomly moving all of the samples to the left, or right child node as the tree is - traversed. - :pr:`27966` by :user:`Adam Li `. #27966 From e96b97dad5ca5d127c035789f4982824eb2e21fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 10:18:31 +0200 Subject: [PATCH 12/31] Fix template for custom top-level section --- doc/whats_new/upcoming_changes/template.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/template.rst index 1e2e79b602ecb..2e7ea107b4c79 100644 --- a/doc/whats_new/upcoming_changes/template.rst +++ b/doc/whats_new/upcoming_changes/template.rst @@ -10,7 +10,7 @@ {% set underline = underlines[0] %} {% for section, content_per_category in sections.items() %} -{% if content_per_category %} +{% if content_per_category and section %} {{ section }} {{ underline * section|length }} {% endif %} From a64615219622ace038f0cd474ae1524064226fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 10:19:48 +0200 Subject: [PATCH 13/31] Fix pyproject section names and remove sklearn/experimental and sklearn/externals --- pyproject.toml | 56 ++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index abd0e10402f62..c34979dde8c0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -323,105 +323,97 @@ package = "sklearn" # name of your package path = "custom-top-level" [[tool.towncrier.section]] - name = ":mod:`sklearn/cluster`" + name = ":mod:`sklearn.cluster`" path = "sklearn.cluster" [[tool.towncrier.section]] - name = ":mod:`sklearn/compose`" + name = ":mod:`sklearn.compose`" path = "sklearn.compose" [[tool.towncrier.section]] - name = ":mod:`sklearn/covariance`" + name = ":mod:`sklearn.covariance`" path = "sklearn.covariance" [[tool.towncrier.section]] - name = ":mod:`sklearn/cross_decomposition`" + name = ":mod:`sklearn.cross_decomposition`" path = "sklearn.cross_decomposition" [[tool.towncrier.section]] - name = ":mod:`sklearn/datasets`" + name = ":mod:`sklearn.datasets`" path = "sklearn.datasets" [[tool.towncrier.section]] - name = ":mod:`sklearn/decomposition`" + name = ":mod:`sklearn.decomposition`" path = "sklearn.decomposition" [[tool.towncrier.section]] - name = ":mod:`sklearn/ensemble`" + name = ":mod:`sklearn.ensemble`" path = "sklearn.ensemble" [[tool.towncrier.section]] - name = ":mod:`sklearn/experimental`" - path = "sklearn.experimental" - - [[tool.towncrier.section]] - name = ":mod:`sklearn/externals`" - path = "sklearn.externals" - - [[tool.towncrier.section]] - name = ":mod:`sklearn/feature_extraction`" + name = ":mod:`sklearn.feature_extraction`" path = "sklearn.feature_extraction" [[tool.towncrier.section]] - name = ":mod:`sklearn/feature_selection`" + name = ":mod:`sklearn.feature_selection`" path = "sklearn.feature_selection" [[tool.towncrier.section]] - name = ":mod:`sklearn/gaussian_process`" + name = ":mod:`sklearn.gaussian_process`" path = "sklearn.gaussian_process" [[tool.towncrier.section]] - name = ":mod:`sklearn/impute`" + name = ":mod:`sklearn.impute`" path = "sklearn.impute" [[tool.towncrier.section]] - name = ":mod:`sklearn/inspection`" + name = ":mod:`sklearn.inspection`" path = "sklearn.inspection" [[tool.towncrier.section]] - name = ":mod:`sklearn/linear_model`" + name = ":mod:`sklearn.linear_model`" path = "sklearn.linear_model" [[tool.towncrier.section]] - name = ":mod:`sklearn/manifold`" + name = ":mod:`sklearn.manifold`" path = "sklearn.manifold" [[tool.towncrier.section]] - name = ":mod:`sklearn/metrics`" + name = ":mod:`sklearn.metrics`" path = "sklearn.metrics" [[tool.towncrier.section]] - name = ":mod:`sklearn/mixture`" + name = ":mod:`sklearn.mixture`" path = "sklearn.mixture" [[tool.towncrier.section]] - name = ":mod:`sklearn/model_selection`" + name = ":mod:`sklearn.model_selection`" path = "sklearn.model_selection" [[tool.towncrier.section]] - name = ":mod:`sklearn/neighbors`" + name = ":mod:`sklearn.neighbors`" path = "sklearn.neighbors" [[tool.towncrier.section]] - name = ":mod:`sklearn/neural_network`" + name = ":mod:`sklearn.neural_network`" path = "sklearn.neural_network" [[tool.towncrier.section]] - name = ":mod:`sklearn/preprocessing`" + name = ":mod:`sklearn.preprocessing`" path = "sklearn.preprocessing" [[tool.towncrier.section]] - name = ":mod:`sklearn/semi_supervised`" + name = ":mod:`sklearn.semi_supervised`" path = "sklearn.semi_supervised" [[tool.towncrier.section]] - name = ":mod:`sklearn/svm`" + name = ":mod:`sklearn.svm`" path = "sklearn.svm" [[tool.towncrier.section]] - name = ":mod:`sklearn/tree`" + name = ":mod:`sklearn.tree`" path = "sklearn.tree" [[tool.towncrier.section]] - name = ":mod:`sklearn/utils`" + name = ":mod:`sklearn.utils`" path = "sklearn.utils" From 2b71c65a204d5ce8951423faf1ec4705a5e9b588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 10:39:52 +0200 Subject: [PATCH 14/31] Add file modules like sklearn.base --- .../upcoming_changes/sklearn.base/.gitkeep | 0 .../sklearn.calibration/.gitkeep | 0 .../sklearn.discriminant_analysis/.gitkeep | 0 .../upcoming_changes/sklearn.dummy/.gitkeep | 0 .../sklearn.exceptions/.gitkeep | 0 .../sklearn.isotonic/.gitkeep | 0 .../sklearn.kernel_approximation/.gitkeep | 0 .../sklearn.kernel_ridge/.gitkeep | 0 .../sklearn.multiclass/.gitkeep | 0 .../sklearn.multioutput/.gitkeep | 0 .../sklearn.naive_bayes/.gitkeep | 0 .../sklearn.pipeline/.gitkeep | 0 .../sklearn.random_projection/.gitkeep | 0 pyproject.toml | 52 +++++++++++++++++++ 14 files changed, 52 insertions(+) create mode 100644 doc/whats_new/upcoming_changes/sklearn.base/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.calibration/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.discriminant_analysis/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.dummy/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.exceptions/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.isotonic/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.kernel_approximation/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.kernel_ridge/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.multiclass/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.multioutput/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.naive_bayes/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.pipeline/.gitkeep create mode 100644 doc/whats_new/upcoming_changes/sklearn.random_projection/.gitkeep diff --git a/doc/whats_new/upcoming_changes/sklearn.base/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.base/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.calibration/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.calibration/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.discriminant_analysis/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.discriminant_analysis/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.dummy/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.dummy/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.exceptions/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.exceptions/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.isotonic/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.isotonic/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.kernel_approximation/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.kernel_approximation/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.kernel_ridge/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.kernel_ridge/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.multiclass/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.multiclass/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.multioutput/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.multioutput/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.naive_bayes/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.naive_bayes/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.pipeline/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.pipeline/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/doc/whats_new/upcoming_changes/sklearn.random_projection/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.random_projection/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/pyproject.toml b/pyproject.toml index c34979dde8c0f..5a48578811dd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -322,6 +322,14 @@ package = "sklearn" # name of your package name = "" path = "custom-top-level" + [[tool.towncrier.section]] + name = ":mod:`sklearn.base`" + path = "sklearn.base" + + [[tool.towncrier.section]] + name = ":mod:`sklearn.calibration`" + path = "sklearn.calibration" + [[tool.towncrier.section]] name = ":mod:`sklearn.cluster`" path = "sklearn.cluster" @@ -346,10 +354,22 @@ package = "sklearn" # name of your package name = ":mod:`sklearn.decomposition`" path = "sklearn.decomposition" + [[tool.towncrier.section]] + name = ":mod:`sklearn.discriminant_analysis`" + path = "sklearn.discriminant_analysis" + + [[tool.towncrier.section]] + name = ":mod:`sklearn.dummy`" + path = "sklearn.dummy" + [[tool.towncrier.section]] name = ":mod:`sklearn.ensemble`" path = "sklearn.ensemble" + [[tool.towncrier.section]] + name = ":mod:`sklearn.exceptions`" + path = "sklearn.exceptions" + [[tool.towncrier.section]] name = ":mod:`sklearn.feature_extraction`" path = "sklearn.feature_extraction" @@ -370,6 +390,18 @@ package = "sklearn" # name of your package name = ":mod:`sklearn.inspection`" path = "sklearn.inspection" + [[tool.towncrier.section]] + name = ":mod:`sklearn.isotonic`" + path = "sklearn.isotonic" + + [[tool.towncrier.section]] + name = ":mod:`sklearn.kernel_approximation`" + path = "sklearn.kernel_approximation" + + [[tool.towncrier.section]] + name = ":mod:`sklearn.kernel_ridge`" + path = "sklearn.kernel_ridge" + [[tool.towncrier.section]] name = ":mod:`sklearn.linear_model`" path = "sklearn.linear_model" @@ -390,6 +422,18 @@ package = "sklearn" # name of your package name = ":mod:`sklearn.model_selection`" path = "sklearn.model_selection" + [[tool.towncrier.section]] + name = ":mod:`sklearn.multiclass`" + path = "sklearn.multiclass" + + [[tool.towncrier.section]] + name = ":mod:`sklearn.multioutput`" + path = "sklearn.multioutput" + + [[tool.towncrier.section]] + name = ":mod:`sklearn.naive_bayes`" + path = "sklearn.naive_bayes" + [[tool.towncrier.section]] name = ":mod:`sklearn.neighbors`" path = "sklearn.neighbors" @@ -398,10 +442,18 @@ package = "sklearn" # name of your package name = ":mod:`sklearn.neural_network`" path = "sklearn.neural_network" + [[tool.towncrier.section]] + name = ":mod:`sklearn.pipeline`" + path = "sklearn.pipeline" + [[tool.towncrier.section]] name = ":mod:`sklearn.preprocessing`" path = "sklearn.preprocessing" + [[tool.towncrier.section]] + name = ":mod:`sklearn.random_projection`" + path = "sklearn.random_projection" + [[tool.towncrier.section]] name = ":mod:`sklearn.semi_supervised`" path = "sklearn.semi_supervised" From 35d1b53007668ebca8ea9e71eae252a478e26058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 10:54:43 +0200 Subject: [PATCH 15/31] Implement tag addition based on fragment type --- .../many-modules/{29696.other.rst => 29696.api.rst} | 2 +- .../sklearn.linear_model/29105.api.rst | 2 +- .../sklearn.linear_model/29419.fix.rst | 2 +- .../sklearn.linear_model/29442.fix.rst | 2 +- .../upcoming_changes/sklearn.tree/27966.feature.rst | 2 +- doc/whats_new/upcoming_changes/template.rst | 11 +++++------ pyproject.toml | 12 ++++++------ 7 files changed, 16 insertions(+), 17 deletions(-) rename doc/whats_new/upcoming_changes/many-modules/{29696.other.rst => 29696.api.rst} (76%) diff --git a/doc/whats_new/upcoming_changes/many-modules/29696.other.rst b/doc/whats_new/upcoming_changes/many-modules/29696.api.rst similarity index 76% rename from doc/whats_new/upcoming_changes/many-modules/29696.other.rst rename to doc/whats_new/upcoming_changes/many-modules/29696.api.rst index 68dac6a513191..f021e6733e9c1 100644 --- a/doc/whats_new/upcoming_changes/many-modules/29696.other.rst +++ b/doc/whats_new/upcoming_changes/many-modules/29696.api.rst @@ -1,4 +1,4 @@ -- |API| :func:`utils.validation.validate_data` is introduced and replaces previously +- :func:`utils.validation.validate_data` is introduced and replaces previously private `base.BaseEstimator._validate_data` method. This is intended for third party estimator developers, who should use this function in most cases instead of :func:`utils.validation.check_array` and :func:`utils.validation.check_X_y`. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst index 430156e055173..9aadc167c99d0 100644 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst +++ b/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst @@ -1,3 +1,3 @@ -- |API| Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter +- Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter has no effect. `copy_X` will be removed in 1.8. :pr:`29105` by :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst index 29f4555027061..512ce797c17ab 100644 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst +++ b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst @@ -1,3 +1,3 @@ -- |Fix| :class:`linear_model.LogisticRegressionCV` corrects sample weight handling +- :class:`linear_model.LogisticRegressionCV` corrects sample weight handling for the calculation of test scores. :pr:`29419` by :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst index 0526d48b7fc3c..eccd13c47e657 100644 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst +++ b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst @@ -1,4 +1,4 @@ -- |Fix| :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now +- :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now take sample weights into accounts to define the search grid for the internally tuned `alpha` hyper-parameter. :pr:`29442` by :user:`John Hopfensperger and :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst b/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst index 02c48b1601d9c..fc72d40be6e5b 100644 --- a/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst +++ b/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst @@ -1,4 +1,4 @@ -- |Feature| :class:`tree.ExtraTreeClassifier` and :class:`tree.ExtraTreeRegressor` now +- :class:`tree.ExtraTreeClassifier` and :class:`tree.ExtraTreeRegressor` now support missing-values in the data matrix ``X``. Missing-values are handled by randomly moving all of the samples to the left, or right child node as the tree is traversed. diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/template.rst index 2e7ea107b4c79..a1e30a33f1d5c 100644 --- a/doc/whats_new/upcoming_changes/template.rst +++ b/doc/whats_new/upcoming_changes/template.rst @@ -16,12 +16,11 @@ {% endif %} {% for category, content in content_per_category.items() %} {% for text, issue_links in content.items() %} -{# TODO for later we can generate tags like |Fix|, |API|, etc ... but need to special case top-level section -|{{ definitions[category]['name'] }}| {{ text }} {{ issue_links|join(', ') }} -#} -{# TODO I don't really understand how you can have multiple issue_links but this is a list so need join -#} -{{ text }} {{ issue_links|join(', ') }} +{% set tag = definitions[category]['name'] %} +{# TODO a bit hacky replace first space with tag like |Fix|, is there a cleaner way? #} +{% set text_with_tag = text if category == 'other' else text.replace(' ', ' ' + tag + ' ', 1) %} +{# TODO I don't really understand how you can have multiple issue_links but this is a list so need to join #} +{{ text_with_tag }} {{ issue_links|join(', ') }} {% endfor %} {% endfor %} diff --git a/pyproject.toml b/pyproject.toml index 5a48578811dd5..96549d3c5e1f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,32 +265,32 @@ package = "sklearn" # name of your package [[tool.towncrier.type]] directory = "major-feature" - name = "" + name = "|MajorFeature|" showcontent = true [[tool.towncrier.type]] directory = "feature" - name = "" + name = "|Feature|" showcontent = true [[tool.towncrier.type]] directory = "efficiency" - name = "" + name = "|Efficiency|" showcontent = true [[tool.towncrier.type]] directory = "enhancement" - name = "" + name = "|Enhancement|" showcontent = true [[tool.towncrier.type]] directory = "api" - name = "" + name = "|API|" showcontent = true [[tool.towncrier.type]] directory = "fix" - name = "" + name = "|Fix|" showcontent = true [[tool.towncrier.type]] From d484931d03eddc8f065a00b2b057196663055d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 11:15:42 +0200 Subject: [PATCH 16/31] Fix category ordering --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96549d3c5e1f3..7fedd1f8b4902 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -284,13 +284,13 @@ package = "sklearn" # name of your package showcontent = true [[tool.towncrier.type]] - directory = "api" - name = "|API|" + directory = "fix" + name = "|Fix|" showcontent = true [[tool.towncrier.type]] - directory = "fix" - name = "|Fix|" + directory = "api" + name = "|API|" showcontent = true [[tool.towncrier.type]] From 1125286bad76815c41892077a372b19fedbc4fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 11:54:20 +0200 Subject: [PATCH 17/31] Add README.rst which explain fragments basics --- doc/whats_new/upcoming_changes/README.rst | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 doc/whats_new/upcoming_changes/README.rst diff --git a/doc/whats_new/upcoming_changes/README.rst b/doc/whats_new/upcoming_changes/README.rst new file mode 100644 index 0000000000000..4ca63a14a607f --- /dev/null +++ b/doc/whats_new/upcoming_changes/README.rst @@ -0,0 +1,44 @@ +:orphan: + +Changelog +========= + +This directory contains "news fragments" which are short files that contain a +small **ReST**-formatted text that will be added to the next what's new page. + +Each file should be named like ``..rst``, where +```` is a pull request number, and ```` is one of (see +`https://github.com/scikit-learn/scikit-learn/blob/main/doc/whats_new/changelog_legend.inc`_ +for more details about their meaning): + +* ``major-feature`` +* ``feature`` +* ``efficiency`` +* ``fix`` +* ``api`` + +If the change concerns a sub-package, the file should go in the sub-directory +relative to this sub-package, for example ``sklearn.linear_model`` or +``sklearn.tree``. In the vast majority of cases, your fragment should be +formatted as a bullet point. + +So for example: ``28268.feature.rst`` would be added to the +``sklearn.ensemble`` folder and would have the content:: + + - :class:`ensemble.ExtraTreesClassifier` and + :class:`ensemble.ExtraTreesRegressor` now supports missing values in the + data matrix `X`. Missing-values are handled by randomly moving all of the + samples to the left, or right child node as the tree is traversed. + :user:`Adam Li ` + +If you are unsure what pull request type to use, don't hesitate to ask in your +PR. + +You can install ``towncrier`` and run ``towncrier --draft --version 1.6`` +if you want to get a preview of how your change will look in the final release +notes. + +There are a few other folders like ``changed-models`` ("Changes affecting many models" section), ``security`` +("Security" section), etc ... + +Type ``other`` is mostly meant to be used in the ``custom-top-level`` section. From 58f6bafa57e6f14989dfdac67e1604b2141200e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 11:55:12 +0200 Subject: [PATCH 18/31] Remove :pr: from fragments --- doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst | 2 +- doc/whats_new/upcoming_changes/many-modules/29696.api.rst | 2 +- .../upcoming_changes/sklearn.linear_model/29105.api.rst | 2 +- .../upcoming_changes/sklearn.linear_model/29419.fix.rst | 2 +- .../upcoming_changes/sklearn.linear_model/29442.fix.rst | 2 +- doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst b/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst index 343aaa1cf5e0e..776ae47cf3e25 100644 --- a/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst +++ b/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst @@ -5,4 +5,4 @@ From scikit-learn 1.6 onwards, support for building with setuptools has been removed. Meson is the only supported way to build scikit-learn, see :ref:`Building from source ` for more details. -:pr:`29400` by :user:`Loïc Estève ` +:user:`Loïc Estève ` diff --git a/doc/whats_new/upcoming_changes/many-modules/29696.api.rst b/doc/whats_new/upcoming_changes/many-modules/29696.api.rst index f021e6733e9c1..45f249257ebc8 100644 --- a/doc/whats_new/upcoming_changes/many-modules/29696.api.rst +++ b/doc/whats_new/upcoming_changes/many-modules/29696.api.rst @@ -2,4 +2,4 @@ private `base.BaseEstimator._validate_data` method. This is intended for third party estimator developers, who should use this function in most cases instead of :func:`utils.validation.check_array` and :func:`utils.validation.check_X_y`. - :pr:`29696` by `Adrin Jalali`_. + `Adrin Jalali`_. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst index 9aadc167c99d0..18721773f696e 100644 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst +++ b/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst @@ -1,3 +1,3 @@ - Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter has no effect. `copy_X` will be removed in 1.8. - :pr:`29105` by :user:`Adam Li `. + :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst index 512ce797c17ab..15b3204aa22a0 100644 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst +++ b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst @@ -1,3 +1,3 @@ - :class:`linear_model.LogisticRegressionCV` corrects sample weight handling for the calculation of test scores. - :pr:`29419` by :user:`Shruti Nath `. + :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst index eccd13c47e657..b6f2b9f2c5021 100644 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst +++ b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst @@ -1,4 +1,4 @@ - :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now take sample weights into accounts to define the search grid for the internally tuned - `alpha` hyper-parameter. :pr:`29442` by :user:`John Hopfensperger and + `alpha` hyper-parameter. :user:`John Hopfensperger and :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst b/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst index fc72d40be6e5b..a7cf5b371e052 100644 --- a/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst +++ b/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst @@ -2,4 +2,4 @@ support missing-values in the data matrix ``X``. Missing-values are handled by randomly moving all of the samples to the left, or right child node as the tree is traversed. - :pr:`27966` by :user:`Adam Li `. + :user:`Adam Li `. From f2a4e259609647dd8045be8c2c0fc585345c7031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 12:00:04 +0200 Subject: [PATCH 19/31] Tweak README --- doc/whats_new/upcoming_changes/README.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/whats_new/upcoming_changes/README.rst b/doc/whats_new/upcoming_changes/README.rst index 4ca63a14a607f..5504aa46ce0dc 100644 --- a/doc/whats_new/upcoming_changes/README.rst +++ b/doc/whats_new/upcoming_changes/README.rst @@ -7,16 +7,19 @@ This directory contains "news fragments" which are short files that contain a small **ReST**-formatted text that will be added to the next what's new page. Each file should be named like ``..rst``, where -```` is a pull request number, and ```` is one of (see -`https://github.com/scikit-learn/scikit-learn/blob/main/doc/whats_new/changelog_legend.inc`_ -for more details about their meaning): +```` is a pull request number, and ```` is one of: * ``major-feature`` * ``feature`` * ``efficiency`` +* ``enhancement`` * ``fix`` * ``api`` +See `this +`_ +for more details about the meaning of each type. + If the change concerns a sub-package, the file should go in the sub-directory relative to this sub-package, for example ``sklearn.linear_model`` or ``sklearn.tree``. In the vast majority of cases, your fragment should be From 632468441f1c427631792393be43ee60ee32b927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 13:11:18 +0200 Subject: [PATCH 20/31] Fix category ordering and add sklearn.ensemble as a better test --- .../sklearn.ensemble/28064.efficiency.rst | 5 +++++ .../sklearn.ensemble/28179.enhancement.rst | 5 +++++ .../upcoming_changes/sklearn.ensemble/28268.feature.rst | 5 +++++ .../sklearn.ensemble/28622.efficiency.rst | 5 +++++ .../upcoming_changes/sklearn.ensemble/29997.api.rst | 3 +++ doc/whats_new/upcoming_changes/template.rst | 9 ++++++++- 6 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst create mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst create mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst create mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst create mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst new file mode 100644 index 0000000000000..63d23f7f731fb --- /dev/null +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst @@ -0,0 +1,5 @@ +- |Efficiency| Small runtime improvement of fitting + :class:`ensemble.HistGradientBoostingClassifier` and + :class:`ensemble.HistGradientBoostingRegressor` by parallelizing the initial search + for bin thresholds. + by :user:`Christian Lorentzen `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst new file mode 100644 index 0000000000000..acc85ab8fa9c2 --- /dev/null +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst @@ -0,0 +1,5 @@ +- |Enhancement| The verbosity of :class:`ensemble.HistGradientBoostingClassifier` + and :class:`ensemble.HistGradientBoostingRegressor` got a more granular control. Now, + `verbose = 1` prints only summary messages, `verbose >= 2` prints the full + information as before. + :pr:`28179` by :user:`Christian Lorentzen `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst new file mode 100644 index 0000000000000..5fdfb5c320119 --- /dev/null +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst @@ -0,0 +1,5 @@ +- |Feature| :class:`ensemble.ExtraTreesClassifier` and + :class:`ensemble.ExtraTreesRegressor` now support missing-values in the data matrix + `X`. Missing-values are handled by randomly moving all of the samples to the left, or + right child node as the tree is traversed. + :pr:`28268` by :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst new file mode 100644 index 0000000000000..2f3ee00148211 --- /dev/null +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst @@ -0,0 +1,5 @@ +- |Efficiency| :class:`ensemble.IsolationForest` now runs parallel jobs + during :term:`predict` offering a speedup of up to 2-4x on sample sizes + larger than 2000 using `joblib`. + :pr:`28622` by :user:`Adam Li ` and + :user:`Sérgio Pereira `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst new file mode 100644 index 0000000000000..0b1ec39643965 --- /dev/null +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst @@ -0,0 +1,3 @@ +- |API| The parameter `algorithm` of :class:`ensemble.AdaBoostClassifier` is deprecated + and will be removed in 1.8. + :pr:`29997` by :user:`Jérémie du Boisberranger `. diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/template.rst index a1e30a33f1d5c..eb77a92695a78 100644 --- a/doc/whats_new/upcoming_changes/template.rst +++ b/doc/whats_new/upcoming_changes/template.rst @@ -14,7 +14,14 @@ {{ section }} {{ underline * section|length }} {% endif %} -{% for category, content in content_per_category.items() %} +{# content_per_category does not respect the category order in definitions so need reordering ... #} +{% set ordered_content_per_category = dict() %} +{% for cat in definitions %} +{% if cat in content_per_category %} +{% set _ = ordered_content_per_category.update({cat: content_per_category[cat]}) %} +{% endif %} +{% endfor %} +{% for category, content in ordered_content_per_category.items() %} {% for text, issue_links in content.items() %} {% set tag = definitions[category]['name'] %} {# TODO a bit hacky replace first space with tag like |Fix|, is there a cleaner way? #} From 4d45fbbfac05c8a8381edfc5f374bd9a9ab3e77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 15:41:37 +0200 Subject: [PATCH 21/31] Remove redundant info in ensemble fragments --- .../upcoming_changes/sklearn.ensemble/28064.efficiency.rst | 2 +- .../upcoming_changes/sklearn.ensemble/28179.enhancement.rst | 4 ++-- .../upcoming_changes/sklearn.ensemble/28268.feature.rst | 4 ++-- .../upcoming_changes/sklearn.ensemble/28622.efficiency.rst | 4 ++-- doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst index 63d23f7f731fb..6ccb4bc8779ab 100644 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst @@ -1,4 +1,4 @@ -- |Efficiency| Small runtime improvement of fitting +- Small runtime improvement of fitting :class:`ensemble.HistGradientBoostingClassifier` and :class:`ensemble.HistGradientBoostingRegressor` by parallelizing the initial search for bin thresholds. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst index acc85ab8fa9c2..663307c2921fb 100644 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst @@ -1,5 +1,5 @@ -- |Enhancement| The verbosity of :class:`ensemble.HistGradientBoostingClassifier` +- The verbosity of :class:`ensemble.HistGradientBoostingClassifier` and :class:`ensemble.HistGradientBoostingRegressor` got a more granular control. Now, `verbose = 1` prints only summary messages, `verbose >= 2` prints the full information as before. - :pr:`28179` by :user:`Christian Lorentzen `. + :user:`Christian Lorentzen `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst index 5fdfb5c320119..ef9379e8fe279 100644 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst @@ -1,5 +1,5 @@ -- |Feature| :class:`ensemble.ExtraTreesClassifier` and +- :class:`ensemble.ExtraTreesClassifier` and :class:`ensemble.ExtraTreesRegressor` now support missing-values in the data matrix `X`. Missing-values are handled by randomly moving all of the samples to the left, or right child node as the tree is traversed. - :pr:`28268` by :user:`Adam Li `. + :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst index 2f3ee00148211..ada7475584232 100644 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst @@ -1,5 +1,5 @@ -- |Efficiency| :class:`ensemble.IsolationForest` now runs parallel jobs +- :class:`ensemble.IsolationForest` now runs parallel jobs during :term:`predict` offering a speedup of up to 2-4x on sample sizes larger than 2000 using `joblib`. - :pr:`28622` by :user:`Adam Li ` and + :user:`Adam Li ` and :user:`Sérgio Pereira `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst index 0b1ec39643965..a2a9a7e3f1d80 100644 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst +++ b/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst @@ -1,3 +1,3 @@ -- |API| The parameter `algorithm` of :class:`ensemble.AdaBoostClassifier` is deprecated +- The parameter `algorithm` of :class:`ensemble.AdaBoostClassifier` is deprecated and will be removed in 1.8. - :pr:`29997` by :user:`Jérémie du Boisberranger `. + :user:`Jérémie du Boisberranger `. From 2b451d3ebc402135642dd01ef385a4208aee2d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 16:37:10 +0200 Subject: [PATCH 22/31] Avoid warnings about documents not included in any toctree --- doc/conf.py | 1 + doc/whats_new/upcoming_changes/README.rst | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 61df593f3fe8f..481c9809a5bcd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -179,6 +179,7 @@ "templates", "includes", "**/sg_execution_times.rst", + "whats_new/upcoming_changes", ] # The reST default role (used for this markup: `text`) to use for all diff --git a/doc/whats_new/upcoming_changes/README.rst b/doc/whats_new/upcoming_changes/README.rst index 5504aa46ce0dc..67d437209e277 100644 --- a/doc/whats_new/upcoming_changes/README.rst +++ b/doc/whats_new/upcoming_changes/README.rst @@ -1,5 +1,3 @@ -:orphan: - Changelog ========= @@ -28,10 +26,10 @@ formatted as a bullet point. So for example: ``28268.feature.rst`` would be added to the ``sklearn.ensemble`` folder and would have the content:: - - :class:`ensemble.ExtraTreesClassifier` and - :class:`ensemble.ExtraTreesRegressor` now supports missing values in the - data matrix `X`. Missing-values are handled by randomly moving all of the - samples to the left, or right child node as the tree is traversed. + - :class:`ensemble.ExtraTreesClassifier` and :class:`ensemble.ExtraTreesRegressor` + now supports missing values in the data matrix `X`. Missing-values are + handled by randomly moving all of the samples to the left, or right child + node as the tree is traversed. :user:`Adam Li ` If you are unsure what pull request type to use, don't hesitate to ask in your From 06886c4554f19161136322b8d6985e31f33c406d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 17:18:00 +0200 Subject: [PATCH 23/31] Remove some unneeded folders --- doc/whats_new/upcoming_changes/sklearn.experimental/.gitkeep | 0 doc/whats_new/upcoming_changes/sklearn.externals/.gitkeep | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/whats_new/upcoming_changes/sklearn.experimental/.gitkeep delete mode 100644 doc/whats_new/upcoming_changes/sklearn.externals/.gitkeep diff --git a/doc/whats_new/upcoming_changes/sklearn.experimental/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.experimental/.gitkeep deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/doc/whats_new/upcoming_changes/sklearn.externals/.gitkeep b/doc/whats_new/upcoming_changes/sklearn.externals/.gitkeep deleted file mode 100644 index e69de29bb2d1d..0000000000000 From 13fece0bccced7ad7520d936e60bef9e129f21fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 19:49:38 +0200 Subject: [PATCH 24/31] Make code shorter in template --- doc/whats_new/upcoming_changes/template.rst | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/template.rst index eb77a92695a78..aac83f5c269ee 100644 --- a/doc/whats_new/upcoming_changes/template.rst +++ b/doc/whats_new/upcoming_changes/template.rst @@ -9,24 +9,17 @@ {% endif %} {% set underline = underlines[0] %} -{% for section, content_per_category in sections.items() %} -{% if content_per_category and section %} +{% for section, content_per_category in sections.items() if content_per_category and section %} {{ section }} {{ underline * section|length }} -{% endif %} -{# content_per_category does not respect the category order in definitions so need reordering ... #} -{% set ordered_content_per_category = dict() %} -{% for cat in definitions %} -{% if cat in content_per_category %} -{% set _ = ordered_content_per_category.update({cat: content_per_category[cat]}) %} -{% endif %} -{% endfor %} -{% for category, content in ordered_content_per_category.items() %} +{# We loop over definitions because, contrary to content_per_category, it follow the category order as defined in pyproject.toml #} +{% for category in definitions if category in content_per_category %} +{% set content = content_per_category[category] %} {% for text, issue_links in content.items() %} {% set tag = definitions[category]['name'] %} {# TODO a bit hacky replace first space with tag like |Fix|, is there a cleaner way? #} {% set text_with_tag = text if category == 'other' else text.replace(' ', ' ' + tag + ' ', 1) %} -{# TODO I don't really understand how you can have multiple issue_links but this is a list so need to join #} +{# issue_links is a list so need to join. For our purposes, issue_links is always of length 1 #} {{ text_with_tag }} {{ issue_links|join(', ') }} {% endfor %} From a555e220f4f863c4e9f635a6a88b2d350b96693c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 19:54:11 +0200 Subject: [PATCH 25/31] Fix and more explicit about custom-top-level section --- doc/whats_new/upcoming_changes/template.rst | 4 +++- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/template.rst index aac83f5c269ee..fe3c0f949303f 100644 --- a/doc/whats_new/upcoming_changes/template.rst +++ b/doc/whats_new/upcoming_changes/template.rst @@ -9,9 +9,11 @@ {% endif %} {% set underline = underlines[0] %} -{% for section, content_per_category in sections.items() if content_per_category and section %} +{% for section, content_per_category in sections.items() if content_per_category %} +{% if section != 'custom-top-level' %} {{ section }} {{ underline * section|length }} +{% endif %} {# We loop over definitions because, contrary to content_per_category, it follow the category order as defined in pyproject.toml #} {% for category in definitions if category in content_per_category %} {% set content = content_per_category[category] %} diff --git a/pyproject.toml b/pyproject.toml index 7fedd1f8b4902..448fc7786df9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -319,7 +319,7 @@ package = "sklearn" # name of your package path = "metadata-routing" [[tool.towncrier.section]] - name = "" + name = "custom-top-level" path = "custom-top-level" [[tool.towncrier.section]] From ed031300a1a73949e86ceb5d8bd8b52c8ab5a273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 11 Oct 2024 20:04:22 +0200 Subject: [PATCH 26/31] Clearer code and comment --- doc/whats_new/upcoming_changes/template.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/template.rst index fe3c0f949303f..26e4d3e443be4 100644 --- a/doc/whats_new/upcoming_changes/template.rst +++ b/doc/whats_new/upcoming_changes/template.rst @@ -19,8 +19,8 @@ {% set content = content_per_category[category] %} {% for text, issue_links in content.items() %} {% set tag = definitions[category]['name'] %} -{# TODO a bit hacky replace first space with tag like |Fix|, is there a cleaner way? #} -{% set text_with_tag = text if category == 'other' else text.replace(' ', ' ' + tag + ' ', 1) %} +{# If category != 'other' add tag like |Fix| or |Feature|. This assumes the text is formatted as a bullet point #} +{% set text_with_tag = text if category == 'other' else '{0} {1}{2}'.format(text[0], tag, text[1:]) %} {# issue_links is a list so need to join. For our purposes, issue_links is always of length 1 #} {{ text_with_tag }} {{ issue_links|join(', ') }} From a737cf7cc2b4090208817307e50f8df55dfd542d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 14 Oct 2024 16:08:06 +0200 Subject: [PATCH 27/31] Remove fragments --- .../upcoming_changes/custom-top-level/29400.other.rst | 8 -------- doc/whats_new/upcoming_changes/many-modules/29696.api.rst | 5 ----- .../sklearn.ensemble/28064.efficiency.rst | 5 ----- .../sklearn.ensemble/28179.enhancement.rst | 5 ----- .../upcoming_changes/sklearn.ensemble/28268.feature.rst | 5 ----- .../sklearn.ensemble/28622.efficiency.rst | 5 ----- .../upcoming_changes/sklearn.ensemble/29997.api.rst | 3 --- .../upcoming_changes/sklearn.linear_model/29105.api.rst | 3 --- .../upcoming_changes/sklearn.linear_model/29419.fix.rst | 3 --- .../upcoming_changes/sklearn.linear_model/29442.fix.rst | 4 ---- .../upcoming_changes/sklearn.tree/27966.feature.rst | 5 ----- 11 files changed, 51 deletions(-) delete mode 100644 doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst delete mode 100644 doc/whats_new/upcoming_changes/many-modules/29696.api.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst delete mode 100644 doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst diff --git a/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst b/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst deleted file mode 100644 index 776ae47cf3e25..0000000000000 --- a/doc/whats_new/upcoming_changes/custom-top-level/29400.other.rst +++ /dev/null @@ -1,8 +0,0 @@ -Dropping support for building with setuptools ---------------------------------------------- - -From scikit-learn 1.6 onwards, support for building with setuptools has been -removed. Meson is the only supported way to build scikit-learn, see -:ref:`Building from source ` for more details. - -:user:`Loïc Estève ` diff --git a/doc/whats_new/upcoming_changes/many-modules/29696.api.rst b/doc/whats_new/upcoming_changes/many-modules/29696.api.rst deleted file mode 100644 index 45f249257ebc8..0000000000000 --- a/doc/whats_new/upcoming_changes/many-modules/29696.api.rst +++ /dev/null @@ -1,5 +0,0 @@ -- :func:`utils.validation.validate_data` is introduced and replaces previously - private `base.BaseEstimator._validate_data` method. This is intended for third party - estimator developers, who should use this function in most cases instead of - :func:`utils.validation.check_array` and :func:`utils.validation.check_X_y`. - `Adrin Jalali`_. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst deleted file mode 100644 index 6ccb4bc8779ab..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28064.efficiency.rst +++ /dev/null @@ -1,5 +0,0 @@ -- Small runtime improvement of fitting - :class:`ensemble.HistGradientBoostingClassifier` and - :class:`ensemble.HistGradientBoostingRegressor` by parallelizing the initial search - for bin thresholds. - by :user:`Christian Lorentzen `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst deleted file mode 100644 index 663307c2921fb..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28179.enhancement.rst +++ /dev/null @@ -1,5 +0,0 @@ -- The verbosity of :class:`ensemble.HistGradientBoostingClassifier` - and :class:`ensemble.HistGradientBoostingRegressor` got a more granular control. Now, - `verbose = 1` prints only summary messages, `verbose >= 2` prints the full - information as before. - :user:`Christian Lorentzen `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst deleted file mode 100644 index ef9379e8fe279..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28268.feature.rst +++ /dev/null @@ -1,5 +0,0 @@ -- :class:`ensemble.ExtraTreesClassifier` and - :class:`ensemble.ExtraTreesRegressor` now support missing-values in the data matrix - `X`. Missing-values are handled by randomly moving all of the samples to the left, or - right child node as the tree is traversed. - :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst deleted file mode 100644 index ada7475584232..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/28622.efficiency.rst +++ /dev/null @@ -1,5 +0,0 @@ -- :class:`ensemble.IsolationForest` now runs parallel jobs - during :term:`predict` offering a speedup of up to 2-4x on sample sizes - larger than 2000 using `joblib`. - :user:`Adam Li ` and - :user:`Sérgio Pereira `. diff --git a/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst b/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst deleted file mode 100644 index a2a9a7e3f1d80..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.ensemble/29997.api.rst +++ /dev/null @@ -1,3 +0,0 @@ -- The parameter `algorithm` of :class:`ensemble.AdaBoostClassifier` is deprecated - and will be removed in 1.8. - :user:`Jérémie du Boisberranger `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst deleted file mode 100644 index 18721773f696e..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29105.api.rst +++ /dev/null @@ -1,3 +0,0 @@ -- Deprecates `copy_X` in :class:`linear_model.TheilSenRegressor` as the parameter - has no effect. `copy_X` will be removed in 1.8. - :user:`Adam Li `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst deleted file mode 100644 index 15b3204aa22a0..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29419.fix.rst +++ /dev/null @@ -1,3 +0,0 @@ -- :class:`linear_model.LogisticRegressionCV` corrects sample weight handling - for the calculation of test scores. - :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst b/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst deleted file mode 100644 index b6f2b9f2c5021..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.linear_model/29442.fix.rst +++ /dev/null @@ -1,4 +0,0 @@ -- :class:`linear_model.LassoCV` and :class:`linear_model.ElasticNetCV` now - take sample weights into accounts to define the search grid for the internally tuned - `alpha` hyper-parameter. :user:`John Hopfensperger and - :user:`Shruti Nath `. diff --git a/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst b/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst deleted file mode 100644 index a7cf5b371e052..0000000000000 --- a/doc/whats_new/upcoming_changes/sklearn.tree/27966.feature.rst +++ /dev/null @@ -1,5 +0,0 @@ -- :class:`tree.ExtraTreeClassifier` and :class:`tree.ExtraTreeRegressor` now - support missing-values in the data matrix ``X``. Missing-values are handled by - randomly moving all of the samples to the left, or right child node as the tree is - traversed. - :user:`Adam Li `. From f6528d38835ee8c624fab97b8da7ba394a11bf84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 14 Oct 2024 16:19:58 +0200 Subject: [PATCH 28/31] Better name --- .../{template.rst => towncrier_template.rst.jinja2} | 0 pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename doc/whats_new/upcoming_changes/{template.rst => towncrier_template.rst.jinja2} (100%) diff --git a/doc/whats_new/upcoming_changes/template.rst b/doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2 similarity index 100% rename from doc/whats_new/upcoming_changes/template.rst rename to doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2 diff --git a/pyproject.toml b/pyproject.toml index 448fc7786df9c..d7404231e4cc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -259,7 +259,7 @@ package = "sklearn" # name of your package directory = "doc/whats_new/upcoming_changes" underlines = "=-^" # TODO adjust maybe issue_format = ":pr:`{issue}`" - template = "doc/whats_new/upcoming_changes/template.rst" + template = "doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2" title_format = "Version {version} ({project_date})" all_bullets = false From 02b0afc021eaf9374e3dcdbc1218ad8a051d68ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 14 Oct 2024 16:23:31 +0200 Subject: [PATCH 29/31] Use default --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d7404231e4cc2..625f8c925a76f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,6 @@ package = "sklearn" # name of your package package = "sklearn" filename = "doc/whats_new/notes-towncrier.rst" directory = "doc/whats_new/upcoming_changes" - underlines = "=-^" # TODO adjust maybe issue_format = ":pr:`{issue}`" template = "doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2" title_format = "Version {version} ({project_date})" From 380ca9d3ced62496130ad76192f0bab8e120500e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Wed, 16 Oct 2024 14:21:40 +0200 Subject: [PATCH 30/31] Tweak changelog instructions and use markdown --- doc/whats_new/upcoming_changes/README.md | 47 +++++++++++++++++++++++ doc/whats_new/upcoming_changes/README.rst | 45 ---------------------- 2 files changed, 47 insertions(+), 45 deletions(-) create mode 100644 doc/whats_new/upcoming_changes/README.md delete mode 100644 doc/whats_new/upcoming_changes/README.rst diff --git a/doc/whats_new/upcoming_changes/README.md b/doc/whats_new/upcoming_changes/README.md new file mode 100644 index 0000000000000..75be62432c351 --- /dev/null +++ b/doc/whats_new/upcoming_changes/README.md @@ -0,0 +1,47 @@ +# Changelog instructions + +This directory (`doc/whats_new/upcoming_changes`) contains "news fragments" +which are short files that contain a small **ReST**-formatted text that will be +added to the next release changelog. + +Each file should be named like `..rst`, where +`` is a pull request number, and `` is one of: + +* `major-feature` +* `feature` +* `efficiency` +* `enhancement` +* `fix` +* `api` + +See [this](https://github.com/scikit-learn/scikit-learn/blob/main/doc/whats_new/changelog_legend.inc) +for more details about the meaning of each type. + +This file needs to be added to the right folder like `sklearn.linear_model` or +`sklearn.tree` depending on which part of scikit-learn your PR changes. There +are also a few folders for some topics like `array-api`, `metadata-routing` or `security`. + +In almost all cases, your fragment should be formatted as a bullet point. + +For example, `28268.feature.rst` would be added to the `sklearn.ensemble` +folder with the following content:: + +```rst +- :class:`ensemble.ExtraTreesClassifier` and :class:`ensemble.ExtraTreesRegressor` + now supports missing values in the data matrix `X`. Missing-values are + handled by randomly moving all of the samples to the left, or right child + node as the tree is traversed. + By :user:`Adam Li `. +``` + +If you are unsure how to name the news fragment or which folder to use, don't +hesitate to ask in your pull request! + +You can install `towncrier` and run `towncrier create` to help you +create a news fragment. You can also run `towncrier --draft --version 1.6` if +you want to get a preview of how your change will look in the final release +notes. + +Note: the `custom-top-level` folder is for changes for which there is no good +folder and are somewhat one-off topics. Type `other` is mostly meant to be used +in the `custom-top-level` section. diff --git a/doc/whats_new/upcoming_changes/README.rst b/doc/whats_new/upcoming_changes/README.rst deleted file mode 100644 index 67d437209e277..0000000000000 --- a/doc/whats_new/upcoming_changes/README.rst +++ /dev/null @@ -1,45 +0,0 @@ -Changelog -========= - -This directory contains "news fragments" which are short files that contain a -small **ReST**-formatted text that will be added to the next what's new page. - -Each file should be named like ``..rst``, where -```` is a pull request number, and ```` is one of: - -* ``major-feature`` -* ``feature`` -* ``efficiency`` -* ``enhancement`` -* ``fix`` -* ``api`` - -See `this -`_ -for more details about the meaning of each type. - -If the change concerns a sub-package, the file should go in the sub-directory -relative to this sub-package, for example ``sklearn.linear_model`` or -``sklearn.tree``. In the vast majority of cases, your fragment should be -formatted as a bullet point. - -So for example: ``28268.feature.rst`` would be added to the -``sklearn.ensemble`` folder and would have the content:: - - - :class:`ensemble.ExtraTreesClassifier` and :class:`ensemble.ExtraTreesRegressor` - now supports missing values in the data matrix `X`. Missing-values are - handled by randomly moving all of the samples to the left, or right child - node as the tree is traversed. - :user:`Adam Li ` - -If you are unsure what pull request type to use, don't hesitate to ask in your -PR. - -You can install ``towncrier`` and run ``towncrier --draft --version 1.6`` -if you want to get a preview of how your change will look in the final release -notes. - -There are a few other folders like ``changed-models`` ("Changes affecting many models" section), ``security`` -("Security" section), etc ... - -Type ``other`` is mostly meant to be used in the ``custom-top-level`` section. From c0d203b99f528ec7366ec49d8065076f2f505a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Wed, 16 Oct 2024 14:54:19 +0200 Subject: [PATCH 31/31] Add some leading content for Array API and Metada Routing sections --- .../upcoming_changes/towncrier_template.rst.jinja2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2 b/doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2 index 26e4d3e443be4..b03c978fba83f 100644 --- a/doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2 +++ b/doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2 @@ -13,6 +13,20 @@ {% if section != 'custom-top-level' %} {{ section }} {{ underline * section|length }} + +{% endif %} +{# section-specific description #} +{% if section == 'Support for Array API' %} +Additional estimators and functions have been updated to include support for all +`Array API `_ compliant inputs. + +See :ref:`array_api` for more details. + +{% endif %} +{% if section == 'Metadata routing' %} +Refer to the :ref:`Metadata Routing User Guide ` for +more details. + {% endif %} {# We loop over definitions because, contrary to content_per_category, it follow the category order as defined in pyproject.toml #} {% for category in definitions if category in content_per_category %}