← back to Japan Enrich
chore: lint (clean) + refactor (MIN_IMAGE_BYTES const), v0.4.0 (session close — all-vendor CDN independence)
5a103b45da82de4fb29e4e92d45d3db6e344430b · 2026-07-01 14:49:36 -0700 · Steve Abrams
Files touched
M VERSIONM enrich_sangetsu.py
Diff
commit 5a103b45da82de4fb29e4e92d45d3db6e344430b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 1 14:49:36 2026 -0700
chore: lint (clean) + refactor (MIN_IMAGE_BYTES const), v0.4.0 (session close — all-vendor CDN independence)
---
VERSION | 2 +-
enrich_sangetsu.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 0d91a54..1d0ba9e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.3.0
+0.4.0
diff --git a/enrich_sangetsu.py b/enrich_sangetsu.py
index 6fc24ef..2036b9f 100644
--- a/enrich_sangetsu.py
+++ b/enrich_sangetsu.py
@@ -17,6 +17,7 @@ from enrich import hex_palette, dominant_family, vision_tags, norm_sku
IMG_DIR = "images/sangetsu"
STAGING = "staging/sangetsu-staging.jsonl"
OUT = "out/sangetsu-enriched.jsonl"
+MIN_IMAGE_BYTES = 200 # reject empty/error responses (HTML 404s are ~150 B)
os.makedirs(IMG_DIR, exist_ok=True)
# Vision (style/material via qwen2.5vl) is the SLOW leg (~90s+/pattern on this box).
@@ -30,7 +31,7 @@ def fetch(sku, url):
try:
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
data = urllib.request.urlopen(req, timeout=40).read()
- if len(data) < 200: return None
+ if len(data) < MIN_IMAGE_BYTES: return None
with open(dst, "wb") as f: f.write(data)
return dst
except Exception:
← a4e6220 lilycolor: fix 4 rows with truncated width '00cm' -> '100cm'
·
back to Japan Enrich
·
lilycolor title_en synthesizer + per-item cleanup pass (draf 2a647d2 →