← back to Fischbacher Onboard
chore: lint, refactor, v1.0.0 (session close)
c22ea4b70e1b4dcea9b642af76dadc2ed8282694 · 2026-07-22 10:37:03 -0700 · Steve Abrams
Files touched
A VERSIONA __pycache__/fetch_stage.cpython-314.pycA __pycache__/push_draft.cpython-314.pycM fetch_stage.pyM push_draft.py
Diff
commit c22ea4b70e1b4dcea9b642af76dadc2ed8282694
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 22 10:37:03 2026 -0700
chore: lint, refactor, v1.0.0 (session close)
---
VERSION | 1 +
__pycache__/fetch_stage.cpython-314.pyc | Bin 0 -> 8352 bytes
__pycache__/push_draft.cpython-314.pyc | Bin 0 -> 8757 bytes
fetch_stage.py | 6 ++----
push_draft.py | 2 +-
5 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..3eefcb9
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.0.0
diff --git a/__pycache__/fetch_stage.cpython-314.pyc b/__pycache__/fetch_stage.cpython-314.pyc
new file mode 100644
index 0000000..7a97129
Binary files /dev/null and b/__pycache__/fetch_stage.cpython-314.pyc differ
diff --git a/__pycache__/push_draft.cpython-314.pyc b/__pycache__/push_draft.cpython-314.pyc
new file mode 100644
index 0000000..bade48a
Binary files /dev/null and b/__pycache__/push_draft.cpython-314.pyc differ
diff --git a/fetch_stage.py b/fetch_stage.py
index af7d7df..55b4eb7 100644
--- a/fetch_stage.py
+++ b/fetch_stage.py
@@ -4,7 +4,7 @@ Pulls the CF fabric line + Wall Coverings from fischbacher1819.com's open GraphQ
endpoint, classifies wallcovering-vs-fabric, and stages into dw_unified.fischbacher_catalog.
SCRAPE + STAGE ONLY — no Shopify push.
"""
-import json, time, urllib.request, subprocess, sys
+import csv, io, json, time, urllib.request, subprocess, sys
GQL = "https://fischbacher1819.com/graphql"
UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36"
@@ -100,15 +100,13 @@ CREATE TABLE IF NOT EXISTS fischbacher_catalog (
);
"""
def psql(sql, inp=None):
- return subprocess.run(["psql", "host=/tmp dbname=dw_unified", "-v", "ON_ERROR_STOP=1", "-c", sql] if inp is None
- else ["psql", "host=/tmp dbname=dw_unified", "-v", "ON_ERROR_STOP=1", "-c", sql],
+ return subprocess.run(["psql", "host=/tmp dbname=dw_unified", "-v", "ON_ERROR_STOP=1", "-c", sql],
input=inp, capture_output=True, text=True)
r = psql(ddl)
if r.returncode: print("DDL ERROR:", r.stderr, file=sys.stderr); sys.exit(1)
# Build a \copy via COPY FROM STDIN as CSV
-import csv, io
buf = io.StringIO()
w = csv.writer(buf)
for row in rows:
diff --git a/push_draft.py b/push_draft.py
index 734b402..afc420d 100644
--- a/push_draft.py
+++ b/push_draft.py
@@ -26,7 +26,7 @@ def api(method, path, body=None):
time.sleep(2 + attempt*2); continue
print(f" HTTP {e.code} {method} {path}: {e.read()[:200]}", file=sys.stderr)
raise
- except Exception as ex:
+ except Exception:
if attempt < 5: time.sleep(1+attempt); continue
raise
raise RuntimeError("retries exhausted")
← 45262da Push all 202 Fischbacher patterns as DRAFT to live store (0
·
back to Fischbacher Onboard
·
auto-save: 2026-07-22T11:43:42 (1 files) — enrich_palette.py eb71455 →