diff --git a/.binder/runtime.txt b/.binder/runtime.txt index 8fdd90711cf30..d2aca3a7e1014 100644 --- a/.binder/runtime.txt +++ b/.binder/runtime.txt @@ -1 +1 @@ -python-3.9 +python-3.12 diff --git a/.circleci/config.yml b/.circleci/config.yml index bd4914056fe10..aa696d06d66ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 jobs: lint: docker: - - image: cimg/python:3.10.16 + - image: cimg/python:3.11 steps: - checkout - run: @@ -57,6 +57,7 @@ jobs: doc: docker: - image: cimg/base:current-22.04 + resource_class: medium+ environment: - MKL_NUM_THREADS: 2 - OPENBLAS_NUM_THREADS: 2 diff --git a/.codecov.yml b/.codecov.yml index f4ecd6e7d8fee..8a51b47ec75d2 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -19,11 +19,9 @@ coverage: codecov: notify: - # Prevent coverage status to upload multiple times for parallel and long - # running CI pipelines. This configuration is particularly useful on PRs - # to avoid confusion. Note that this value is set to the number of Azure - # Pipeline jobs uploading coverage reports. - after_n_builds: 6 + # Prevent codecov from calculating the coverage results before all expected uploads + # are in. This value is set to the total number of jobs uploading coverage reports. + after_n_builds: 7 ignore: - "sklearn/externals" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000..7c01ec320d920 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + // More info about Features: https://containers.dev/features + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "features": {}, + + "onCreateCommand": ".devcontainer/setup.sh", + "postCreateCommand": "", + + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-toolsai.jupyter" + ], + "settings": {} + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 0000000000000..1ddf0a3bd9ff1 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +"${SHELL}" <(curl -Ls micro.mamba.pm/install.sh) < /dev/null +# .bashrc has been updated by the mamba install one-liner above. +# 'source $HOME/.bashrc' sets up micromamba for later use +source $HOME/.bashrc + +micromamba env create -f build_tools/circle/doc_environment.yml -n sklearn-dev --yes +# Install additional packages: +# - ipykernel: to be able to use the VS Code Jupyter integration +# - pre-commit: avoid linting issues +micromamba install pre-commit ipykernel -n sklearn-dev --yes +# install pre-commit hooks +micromamba activate sklearn-dev +pre-commit install + +# Auto-activate sklearn-dev in terminal +echo "micromamba activate sklearn-dev" >> $HOME/.bashrc diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 77fb878ee8fe7..b9fd2bd6a1ae0 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -46,3 +46,9 @@ ff78e258ccf11068e2b3a433c51517ae56234f88 # PR 31226: Enforce ruff/pygrep-hooks rules b98dc797c480b1b9495f918e201d45ee07f29feb + +# PR 31817: Consistently use relative imports +4abf564cb4ac58d61fbbe83552c28f764284a69d + +# PR 31847 Switch to absolute imports enforced by ruff +1fe659545c70d9f805c1c4097dd2fce9a6285a12 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index bc8e5b5ff70d1..5ee5ad58b1889 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -10,9 +10,11 @@ body: addressed by searching through [the past issues](https://github.com/scikit-learn/scikit-learn/issues). - type: textarea attributes: - label: Describe the bug + label: Describe the bug and give evidence about its user-facing impact description: > - A clear and concise description of what the bug is. + A clear and concise description of what the bug is and **how it affects you as a scikit-learn user**. Please give a few details about the context of the discovery, why you care about getting it fixed. Please do not create issues for problems you don't actually care about. + + The scikit-learn issue tracker is swamped by reports and pull-requests. Stating the expected user impact is critical to help maintainers and other contributors focus time and effort to review meaningful contributions. validations: required: true - type: textarea @@ -36,13 +38,15 @@ body: model = lda_model.fit(lda_features) ``` + If possible, craft a reproducer that only uses the public scikit-learn API or justify why you had to use some private API to trigger the problem. This helps us assess the user-facing impact of the bug. + If the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com. - In short, **we are going to copy-paste your code** to run it and we expect to get the same result as you. + In short, **we need to be able to quickly copy-paste your code** to run it without modification and we expect to get the same result as you. We acknowledge that crafting a [minimal reproducible code example](https://scikit-learn.org/dev/developers/minimal_reproducer.html) requires some effort on your side but it really helps the maintainers quickly reproduce the problem and analyze its cause without any ambiguity. Ambiguous bug reports tend to be slower to fix because they will require more effort and back and forth discussion between the maintainers and the reporter to pin-point the precise conditions necessary to reproduce the problem. placeholder: | - ``` + ```python Sample code to reproduce the problem ``` validations: @@ -89,6 +93,14 @@ body: ``` validations: required: true +- type: textarea + attributes: + label: Interest in fixing the bug + description: > + If your issue is triaged by project maintainers as a bug that can be reproduced, would you be interested in working on a PR to resolve it? + And if you already have an idea, please explain your analysis of the root cause of the bug and a strategy for a possible fix, but please do not open a PR as long as the issue has not been triaged. + validations: + required: true - type: markdown attributes: value: > diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 51a2cdd94920d..e21c8a619ca70 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -6,7 +6,7 @@ body: - type: markdown attributes: value: > - #### If you want to propose a new algorithm, please refer first to the [scikit-learn inclusion criterion](https://scikit-learn.org/stable/faq.html#what-are-the-inclusion-criteria-for-new-algorithms). + #### If you want to propose a new algorithm, please refer first to the [scikit-learn inclusion criterion](https://scikit-learn.org/dev/faq.html#what-are-the-inclusion-criteria-for-new-algorithms). - type: textarea attributes: label: Describe the workflow you want to enable diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f59f9bc2fbcd7..86dce2e796499 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,16 @@ #### Reference Issues/PRs @@ -15,17 +25,27 @@ is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests #### What does this implement/fix? Explain your changes. +#### AI usage disclosure + +I used AI assistance for: +- [ ] Code generation (e.g., when writing an implementation or fixing a bug) +- [ ] Test/benchmark generation +- [ ] Documentation (including examples) +- [ ] Research and understanding + + #### Any other comments?