Skip to content

Declare subpackages instead of shipping the source tree as package data - #216

Open
vahid-ahmadi wants to merge 2 commits into
mainfrom
fix/211-packaging
Open

vahid-ahmadi wants to merge 2 commits into
mainfrom
fix/211-packaging

Conversation

@vahid-ahmadi

@vahid-ahmadi vahid-ahmadi commented Sep 16, 2026

Copy link
Copy Markdown

Fixes #211.

Setuptools now discovers microimpute and its subpackages explicitly. Removing the recursive package-data glob prevents bytecode and stray working files from entering distributions. The wheel ships the py.typed marker, and package metadata includes the four authors listed in the paper and citation, classifiers and project links.

Artifact validation built a source distribution and then a wheel from that distribution. Both contain all 27 Python modules and py.typed, while excluding 27 compiled bytecode files and injected CSV/JSON files. Six package imports resolved to the built artifact away from the source checkout; an independent OLS numerical check and two smoke tests passed.

Five Markdown examples also pass the repository formatter. Their Python syntax trees and surrounding prose are unchanged. The separate license decision remains tracked in #197.

Final commit: f34a3f03a54ba7d3d94ac3d7869748ed890f04c8. All eight checks passed. Python 3.14 CI passed 353 tests with 2 skipped, including all 13 real R/StatMatch Matching tests; the pipeline example passed. Python 3.12 smoke tests, documentation, lint, changelog and deployment checks also passed. The two skipped modules require optional MDN dependencies. Coverage XML was generated; the existing Codecov upload step reported its nonblocking protected-branch token error.

The exact final heads of #214, #215, #216 and #217 also merge cleanly together. Their combined suite passed 350 tests with 3 optional skips, and the combined source distribution, wheel, import and numerical smoke checks passed. Merge these before #219, then rebase #219 while retaining its broader correctness fixes.

packages = ["microimpute"] with package-data "**/*" meant the
subpackages reached the wheel only as package data, swept in by a glob
that also collected whatever else was in the working tree. A wheel built
from a tree with compiled bytecode present carried 27 __pycache__
entries and around 500 KB of build-host bytecode, so wheel contents were
a function of the builder's working directory rather than the source.

setuptools.packages.find declares them properly. Verified: with 54 .pyc
files present in the tree, the built wheel now contains none, and every
subpackage imports from the installed wheel.

Also adds py.typed, so the annotations become visible to downstream
consumers; the two missing authors, which left the paper's corresponding
author out of the PyPI metadata; and classifiers and project URLs, with
no repository link previously on the PyPI page.

The absent LICENSE file is #197 and is not addressed here.

Fixes #211
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
microimpute-dashboard Ready Ready Preview Sep 17, 2026 10:28am UTC

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.

Wheel ships subpackages as package data, sweeping in stale __pycache__ and working-tree junk

2 participants