Skip to content

Exclude docs/, tests/, etc. from wheel#480

Merged
talonchandler merged 3 commits intomainfrom
exclude-binaries
Sep 8, 2025
Merged

Exclude docs/, tests/, etc. from wheel#480
talonchandler merged 3 commits intomainfrom
exclude-binaries

Conversation

@talonchandler
Copy link
Collaborator

Fixes #456.

Excluding docs/examples/deprecated reduces the wheel size from ~65MB to ~7MB.

The next largest contributors are documentation images.

Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why the wheel is massive is because of the following setting:

waveorder/pyproject.toml

Lines 118 to 119 in 2b81af0

[tool.setuptools.packages.find]
where = ["."]

packages.find.where = ["."] tells setuptools that the package is the entire root directory of the repo; /docs, /tests, readme.png and everything else included.

You can set packages.find.where to "waveorder" and this reduces the wheel size to $142$ KB as the build system will only package at the Python source code itself in the wheel (along with the stray yaml files).

Alongside that we can remove the MANIFEST.in.

In addition we can remove include-package-data = true as it's true by default.

@talonchandler talonchandler changed the title Exclude docs/examples/deprecated from wheel Exclude docs/, tests/, etc. from wheel Sep 8, 2025
@talonchandler
Copy link
Collaborator Author

Thanks @srivarra! Much cleaner.

Sidenote: my minor concern was that I needed to distribute the images for everything to appear cleanly on the PyPI page, but I think we've changed everything to hard links hosted on github so I think this is much better.

@srivarra
Copy link
Contributor

srivarra commented Sep 8, 2025

Sidenote: my minor concern was that I needed to distribute the images for everything to appear cleanly on the PyPI page, but I think we've changed everything to hard links hosted on github so I think this is much better.

Ahh, gotcha that makes sense.

Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.13%. Comparing base (abee74e) to head (b76a61f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
+ Coverage   37.97%   46.13%   +8.15%     
==========================================
  Files          49       50       +1     
  Lines        9770    10342     +572     
==========================================
+ Hits         3710     4771    +1061     
+ Misses       6060     5571     -489     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@talonchandler talonchandler merged commit 0fd2ab9 into main Sep 8, 2025
24 of 31 checks passed
@talonchandler talonchandler deleted the exclude-binaries branch September 8, 2025 23:14
@talonchandler talonchandler mentioned this pull request Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why is the wheel so large?

2 participants