Skip to content

Avoid bundling tests in wheels #31391

@stefan6419846

Description

@stefan6419846

Describe the bug

The wheels currently include tests and test data. These usually are of no additional value outside of the source distributions and thus just bloat the distribution and complicate reviews. For this reasons, I recommend excluding them from future wheels.

This matches the official recommendation for Python packaging as well (see https://packaging.python.org/en/latest/discussions/package-formats/#what-is-a-wheel):

Wheels are meant to contain exactly what is to be installed, and nothing more. In particular, wheels should never include tests and documentation, while sdists commonly do.

Steps/Code to Reproduce

Download the current wheels and look for sklearn/datasets/tests

Expected Results

The directory is absent.

Actual Results

The directory exists.

Versions

1.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions