Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MAINT Use towncrier for changelog management #30046

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6481ac5
Basic config + a few fragments
lesteve Oct 10, 2024
ed8d0b1
Add all sklearn submodules
lesteve Oct 10, 2024
4fe7e8d
Fix PR number
lesteve Oct 10, 2024
bf87d5e
Fix PR formatting
lesteve Oct 10, 2024
78c079e
Use correct categories
lesteve Oct 10, 2024
a5ab7fc
wip on adding top-level sections
lesteve Oct 10, 2024
de44dfa
Rename folder
lesteve Oct 11, 2024
a8de579
Prefix modules with sklearn.
lesteve Oct 11, 2024
ece7e51
Add fragments to many-modules
lesteve Oct 11, 2024
b10dab7
Fix fragment names
lesteve Oct 11, 2024
ac10338
notes-towncrier is not supposed to be added for now
lesteve Oct 11, 2024
e96b97d
Fix template for custom top-level section
lesteve Oct 11, 2024
a646152
Fix pyproject section names and remove sklearn/experimental and sklea…
lesteve Oct 11, 2024
2b71c65
Add file modules like sklearn.base
lesteve Oct 11, 2024
35d1b53
Implement tag addition based on fragment type
lesteve Oct 11, 2024
d484931
Fix category ordering
lesteve Oct 11, 2024
1125286
Add README.rst which explain fragments basics
lesteve Oct 11, 2024
58f6baf
Remove :pr: from fragments
lesteve Oct 11, 2024
f2a4e25
Tweak README
lesteve Oct 11, 2024
6324684
Fix category ordering and add sklearn.ensemble as a better test
lesteve Oct 11, 2024
4d45fbb
Remove redundant info in ensemble fragments
lesteve Oct 11, 2024
2b451d3
Avoid warnings about documents not included in any toctree
lesteve Oct 11, 2024
06886c4
Remove some unneeded folders
lesteve Oct 11, 2024
13fece0
Make code shorter in template
lesteve Oct 11, 2024
a555e22
Fix and more explicit about custom-top-level section
lesteve Oct 11, 2024
ed03130
Clearer code and comment
lesteve Oct 11, 2024
a737cf7
Remove fragments
lesteve Oct 14, 2024
f6528d3
Better name
lesteve Oct 14, 2024
02b0afc
Use default
lesteve Oct 14, 2024
380ca9d
Tweak changelog instructions and use markdown
lesteve Oct 16, 2024
c0d203b
Add some leading content for Array API and Metada Routing sections
lesteve Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
47 changes: 47 additions & 0 deletions 47 doc/whats_new/upcoming_changes/README.md
Original file line number Diff line number Diff line change
@@ -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 `<PULL REQUEST>.<TYPE>.rst`, where
`<PULL REQUEST>` is a pull request number, and `<TYPE>` 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 <adam2392>`.
```

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.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
43 changes: 43 additions & 0 deletions 43 doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% 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 %}
{% 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 <https://data-apis.org/array-api/latest/>`_ compliant inputs.

See :ref:`array_api` for more details.

{% endif %}
{% if section == 'Metadata routing' %}
Refer to the :ref:`Metadata Routing User Guide <metadata_routing>` 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 %}
{% set content = content_per_category[category] %}
{% for text, issue_links in content.items() %}
{% set tag = definitions[category]['name'] %}
{# 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(', ') }}

{% endfor %}
{% endfor %}
{% endfor %}
216 changes: 216 additions & 0 deletions 216 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,219 @@ 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_changes"
issue_format = ":pr:`{issue}`"
template = "doc/whats_new/upcoming_changes/towncrier_template.rst.jinja2"
title_format = "Version {version} ({project_date})"
all_bullets = false

[[tool.towncrier.type]]
directory = "major-feature"
name = "|MajorFeature|"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "|Feature|"
showcontent = true

[[tool.towncrier.type]]
directory = "efficiency"
name = "|Efficiency|"
showcontent = true

[[tool.towncrier.type]]
directory = "enhancement"
name = "|Enhancement|"
showcontent = true

[[tool.towncrier.type]]
directory = "fix"
name = "|Fix|"
showcontent = true

[[tool.towncrier.type]]
directory = "api"
name = "|API|"
showcontent = true

[[tool.towncrier.type]]
directory = "other"
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 = "custom-top-level"
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"

[[tool.towncrier.section]]
name = ":mod:`sklearn.compose`"
path = "sklearn.compose"

[[tool.towncrier.section]]
name = ":mod:`sklearn.covariance`"
path = "sklearn.covariance"

[[tool.towncrier.section]]
name = ":mod:`sklearn.cross_decomposition`"
path = "sklearn.cross_decomposition"

[[tool.towncrier.section]]
name = ":mod:`sklearn.datasets`"
path = "sklearn.datasets"

[[tool.towncrier.section]]
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"

[[tool.towncrier.section]]
name = ":mod:`sklearn.feature_selection`"
path = "sklearn.feature_selection"

[[tool.towncrier.section]]
name = ":mod:`sklearn.gaussian_process`"
path = "sklearn.gaussian_process"

[[tool.towncrier.section]]
name = ":mod:`sklearn.impute`"
path = "sklearn.impute"

[[tool.towncrier.section]]
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"

[[tool.towncrier.section]]
name = ":mod:`sklearn.manifold`"
path = "sklearn.manifold"

[[tool.towncrier.section]]
name = ":mod:`sklearn.metrics`"
path = "sklearn.metrics"

[[tool.towncrier.section]]
name = ":mod:`sklearn.mixture`"
path = "sklearn.mixture"

[[tool.towncrier.section]]
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"

[[tool.towncrier.section]]
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"

[[tool.towncrier.section]]
name = ":mod:`sklearn.svm`"
path = "sklearn.svm"

[[tool.towncrier.section]]
name = ":mod:`sklearn.tree`"
path = "sklearn.tree"

[[tool.towncrier.section]]
name = ":mod:`sklearn.utils`"
path = "sklearn.utils"
Morty Proxy This is a proxified and sanitized view of the page, visit original site.