Skip to content

pyproject: ship the whole dotbot package so data files reach the wheel - #282

Merged
geonnave merged 2 commits into
DotBots:developfrom
geonnave:calibration-tcss-packaging
Aug 13, 2026
Merged

pyproject: ship the whole dotbot package so data files reach the wheel#282
geonnave merged 2 commits into
DotBots:developfrom
geonnave:calibration-tcss-packaging

Conversation

@geonnave

Copy link
Copy Markdown
Contributor

Reported from a bench session following the cabled LH2 calibration guide:
dotbot run lh2-calibration crashes on a plain pip install pydotbot, and
the workaround was to copy app.tcss out of the repo into
site-packages/dotbot/calibration/ by hand.

The cause is the build allowlist, which enumerated file types:

include = ["dotbot/frontend/*", "dotbot/*.toml", "*.py"]

CalibrationApp sets CSS_PATH = "app.tcss", and nothing in that list
matches .tcss, so the published wheel contains no stylesheet at all. The
same gap dropped every dotbot/examples/ asset - the scene .toml files,
the PNGs and SVGs - so the labyrinth, charging-station and naming-game
examples are also incomplete for anyone installing from PyPI.

Rather than append .tcss to the list and wait for the next data file to
hit the same trap, this ships the package itself. The leading slash is
load-bearing: hatchling patterns are gitignore-style, so a bare dotbot/
also matches nested directories of that name and pulls in a local
doc/_build tree.

twine check validates metadata, not archive contents, so it never had a
chance of catching this. The new utils/check_wheel_contents.py runs right
after it in CI and asserts the wheel carries the data files the code opens
by path; extend REQUIRED when another one is added.

Not addressed here: .gitignore ignores *.xml, so the naming-game
models/*.xml are force-added in git and hatchling still excludes them from
the wheel. That example stays incomplete pending a separate fix.

Validated by building the wheel and inspecting the archive - app.tcss and
the example assets are present, nothing previously shipped was dropped, and
the check fails as intended when the old include list is restored. Full unit
suite passes (414 tests).

The include list named file types, so dotbot/calibration/app.tcss never
reached the wheel and `dotbot run lh2-calibration` crashed for anyone who
installed from PyPI; the examples' scene assets were missing too. The
leading slash is load-bearing: hatchling patterns are gitignore-style, so
a bare `dotbot/` also matches nested directories of that name and sweeps
in a local doc/_build tree.

AI-assisted: Claude Opus 5
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.50%. Comparing base (0df33ae) to head (50a2a30).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #282      +/-   ##
===========================================
- Coverage    83.50%   83.50%   -0.01%     
===========================================
  Files          121      121              
  Lines        11237    11266      +29     
  Branches       570      569       -1     
===========================================
+ Hits          9384     9408      +24     
- Misses        1850     1854       +4     
- Partials         3        4       +1     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@geonnave

Copy link
Copy Markdown
Contributor Author

Will merge once @nermine11 confirms it works

@geonnave
geonnave merged commit da9ba91 into DotBots:develop Aug 13, 2026
14 checks passed
@geonnave
geonnave deleted the calibration-tcss-packaging branch August 13, 2026 13:22
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.

1 participant