fix: survive the screen library's sys.exit, copy all modules into the image, fit -10 degree readouts

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
rickzkmandClaude Sonnet 5.5 committed 2026-10-22 13:38:37 +02:00
1 parent ae8c17d8d5
commit 09f78d1a63
8 files changed
+78 -8

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import fnmatch
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def copied_sources():
sources = []
for line in (ROOT / "Dockerfile").read_text().splitlines():
match = re.match(r"^COPY\s+(.+)\s+\S+$", line.strip())
if match:
sources += match.group(1).split()
return sources
def test_dockerfile_copies_every_top_level_module():
"""A new view module must reach the image without anyone editing the Dockerfile."""
sources = copied_sources()
missing = [p.name for p in ROOT.glob("*.py") if not any(fnmatch.fnmatch(p.name, s) for s in sources)]
assert missing == []
def test_dockerignore_keeps_dev_files_out_of_the_image_but_not_assets():
ignored = (ROOT / ".dockerignore").read_text().split()
for name in (".venv", ".git", "tests", "docs", ".superpowers"):
assert name in ignored
assert "assets" not in ignored