matplotlib / matplotlib/matplotlib
Tests in Distribution Files
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
This may be a stupid question, but I don't see the reason why this is the case.
I was running the following (essentially checking out matplotlib in a venv)
```bash
uv init example
cd example
uv add matplotlib
```
This created a new repo with a virtual environment.
When I was checking out `example/.venv/lib/python3.13/site-packages/matplotlib` I found the `tests` directory with a bunch of `pytest` files.
Basically, [these files](https://github.com/matplotlib/matplotlib/tree/main/lib/matplotlib/tests) seem to be distributed.
I then ran `du -h` and found out that the tests alone amass to just about `2MB`.
This seems to be a lot of wasted disk space.
Therefore, my questions.
- Are these tests actually used in the distributed package?
- Would it make sense to exclude them from the distribution, if they are not used by any user anyway?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting lib/matplotlib/tests and the packaging configuration that produces the matplotlib distribution installed through uv. Check whether the distributed tests are required by any supported workflow and measure the resulting package contents. Done means the issue has a documented answer and, if appropriate, an agreed packaging change with validation that the installed package still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100