Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/social-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/studio-comparison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/studio-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 34 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
<meta property="og:title" content="IoT FixtureKit | Home Assistant and IoT fixture testing">
<meta property="og:description" content="Local Python CLI for synthetic diagnostics fixtures, explicit JSON projection, HAR checks and regression tests.">
<meta property="og:url" content="https://flyzdev.github.io/fixturekit/">
<meta property="og:image" content="https://flyzdev.github.io/fixturekit/assets/social-preview.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="FixtureKit: audit fixtures, replay failures, test recovery. Open source Python toolkit.">
<meta name="twitter:card" content="summary_large_image">
<script type="application/ld+json">{"@context": "https://schema.org", "@type": "SoftwareApplication", "name": "IoT FixtureKit", "applicationCategory": "DeveloperApplication", "operatingSystem": "Windows, macOS, Linux", "softwareVersion": "0.1.0a10", "url": "https://flyzdev.github.io/fixturekit/", "downloadUrl": "https://pypi.org/project/iot-fixturekit/0.1.0a10/", "license": "https://www.apache.org/licenses/LICENSE-2.0", "description": "Local-first Python CLI for explicit fixture projection, scoped HAR checks and heuristic IoT fixture audits."}</script>
<style>
:root{color-scheme:light dark;--accent:#16756b;--muted:#64748b;--line:#b8c4c4;--panel:#eef5f4}
*{box-sizing:border-box}body{margin:0;font:16px/1.65 system-ui,sans-serif;color:#172c2c;background:#fafcfb}
main,footer{max-width:850px;margin:auto;padding:32px 24px}header{padding:30px 0 20px;border-bottom:1px solid var(--line)}
main,footer{max-width:1100px;margin:auto;padding:32px 24px}header{padding:30px 0 20px;border-bottom:1px solid var(--line)}
h1{font-size:clamp(32px,6vw,48px);line-height:1.1;margin:12px 0 16px}h2{font-size:23px;margin:32px 0 10px}p{margin:10px 0}
.kicker{font-size:13px;letter-spacing:.09em;text-transform:uppercase;color:var(--accent);font-weight:700}
a{color:var(--accent);text-underline-offset:3px}a:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
Expand All @@ -26,14 +31,22 @@
@media(prefers-color-scheme:dark){:root{--accent:#8adacf;--muted:#a9b9bb;--line:#405556;--panel:#213334}body{background:#142223;color:#e6efee}}
pre:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(forced-colors:active){a:focus-visible,pre:focus-visible{outline-color:Highlight}.primary{border:2px solid LinkText;color:LinkText;background:Canvas;text-decoration:underline}}

.hero-layout{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:28px}.hero-layout h1{font-size:clamp(36px,5vw,54px)}
.hero-copy>p{font-size:18px}.hero-preview{margin:0;min-width:0}.hero-preview img,.visual img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:12px}.hero-preview figcaption,.visual figcaption{font-size:13px;color:var(--muted);margin-top:8px}
.release-strip{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.release-strip span{border:1px solid var(--line);border-radius:6px;padding:4px 9px;font-size:13px;font-weight:650}
.visual-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}.visual{margin:0;min-width:0}.visual a{display:block}.visual figcaption a{display:inline}.timeline{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0;padding:0;list-style:none}.timeline li{border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--panel);min-width:0}.timeline strong,.timeline span{display:block}.timeline strong{font-size:clamp(15px,2vw,21px);line-height:1.3;overflow-wrap:anywhere}.timeline span{font-size:13px;color:var(--muted)}.timeline .fault{border-top:4px solid #b45309}.timeline .ok{border-top:4px solid var(--accent)}.sample-output{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sample-output pre{margin:0}.section-lead{max-width:75ch}.callout{padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.callout h2{margin-top:0}
@media(max-width:760px){.hero-layout,.visual-grid,.sample-output{grid-template-columns:1fr}.timeline{grid-template-columns:repeat(2,minmax(0,1fr))}main,footer{padding:22px 16px}.hero-layout{gap:18px}.hero-copy>p{font-size:16px}}
</style>
</head>
<body><main>
<header>
<div class="kicker">Open source · Apache 2.0 · Experimental alpha</div>
<h1>Make IoT fixtures easier to review.</h1>
<p>IoT FixtureKit helps integration developers turn Tuya diagnostics into local fixture candidates and add heuristic fixture and HTTP archive checks to existing test workflows. Core runs locally, without device credentials, a cloud account or telemetry.</p>
<div class="links"><a class="primary" href="https://github.com/FlyzDev/fixturekit/blob/main/QUICKSTART.md">Start with a five-minute trial</a><a href="https://github.com/FlyzDev/fixturekit/releases/tag/v0.1.0a10">Download alpha 10</a><a href="https://pypi.org/project/iot-fixturekit/0.1.0a10/">PyPI package</a><a href="https://github.com/FlyzDev/fixturekit">Source code</a><a href="https://github.com/FlyzDev/fixturekit/blob/main/PILOT.md">Try a maintainer pilot</a></div>
<header class="hero-layout">
<div class="hero-copy"><div class="kicker">Open source · Apache 2.0 · Experimental alpha</div>
<h1>Test IoT integrations without waiting for devices.</h1>
<p>Build reviewed fixtures, audit selected sensitive fields, and replay synthetic failures and recovery in your existing Python tests. Local-first, without a cloud account or physical hardware.</p>
<div class="links"><a class="primary" href="https://github.com/FlyzDev/fixturekit/blob/main/QUICKSTART.md">Try the quickstart</a><a href="https://github.com/FlyzDev/fixturekit">View source</a><a href="https://github.com/FlyzDev/fixturekit/blob/main/PILOT.md">Give feedback</a></div>
<div class="release-strip"><span>Core Alpha 10 · PyPI</span><span>Scenario Preview P2 · Python 3.12</span></div>
</div><figure class="hero-preview"><a href="studio-demo/"><img src="assets/studio-dashboard.png" width="1280" height="1000" alt="Actual FixtureKit Studio dashboard displaying four recorded synthetic test runs and their summary metrics."></a><figcaption>Actual recorded Studio dashboard, first-party synthetic results. <a href="studio-demo/">Explore the interactive report</a>.</figcaption></figure>
</header>
<section aria-labelledby="choose-workflow"><h2 id="choose-workflow">Choose your first workflow</h2>
<div class="workflow-grid">
Expand All @@ -47,7 +60,7 @@ <h1>Make IoT fixtures easier to review.</h1>
</div>
<p>Start with one workflow. Core and the current starter ZIPs require no Home Assistant installation.</p></section>
<section><h2>Install the published package</h2>
<p>Python 3.9+. Use a virtual environment. Available on PyPI.</p>
<p>Python 3.9+. Use a virtual environment. <a href="https://pypi.org/project/iot-fixturekit/0.1.0a10/">PyPI package</a> · <a href="https://github.com/FlyzDev/fixturekit/releases/tag/v0.1.0a10">Alpha 10 release</a>.</p>
<pre tabindex="0" role="region" aria-label="Package installation command">python -m pip install iot-fixturekit==0.1.0a10</pre>
<p><a href="https://github.com/FlyzDev/fixturekit/blob/main/QUICKSTART.md">Five-minute quickstart and synthetic examples</a></p></section>
<section><h2>Use in a test workflow</h2>
Expand All @@ -61,11 +74,21 @@ <h1>Make IoT fixtures easier to review.</h1>
<p><a href="downloads/fixturekit-studio-offline-p1.zip">Download Studio Offline P1 (ZIP)</a> · <a href="downloads/fixturekit-studio-offline-p1.zip.sha256">SHA-256 checksum</a>. Python 3.9+, no repository checkout or optional dependencies. Live execution still requires the trusted source checkout.</p>
<p><a href="downloads/fixturekit-studio-offline-p1.pyz">Download single-file Studio (Python ZipApp)</a> · <a href="downloads/fixturekit-studio-offline-p1.pyz.sha256">SHA-256 checksum</a>. Run with Python 3.9+ without extracting. Verify the executable archive before running.</p>
<p><a href="downloads/fixturekit-studio-desktop-p2.pyz">Download Studio Desktop P2 (Python ZipApp)</a> · <a href="downloads/fixturekit-studio-desktop-p2.pyz.sha256">SHA-256 checksum</a>. Verify the archive, then run with Python 3.9+ and the desktop command (Tk and a graphical session required). Offline CLI is available without Tk.</p>
<div class="visual-grid"><figure class="visual"><a href="studio-demo/"><img loading="lazy" src="assets/studio-dashboard.png" width="1280" height="1000" alt="Recorded Studio dashboard with synthetic report cards and summary checks."></a><figcaption>Recorded results from first-party CI.</figcaption></figure><figure class="visual"><a href="studio-attention-demo/comparison.html"><img loading="lazy" src="assets/studio-comparison.png" width="1280" height="1000" alt="Studio comparison report showing passing and authored failure examples side by side."></a><figcaption>Actual comparison viewer, with an intentionally authored failure demonstration.</figcaption></figure></div>
<p>Studio remains experimental and separate from the published alpha wheel. Recorded and authored demonstrations are not independent endorsement.</p></section>
<section><h2>Build synthetic device regression scenarios</h2>
<section id="scenario-preview"><h2>Build synthetic device regression scenarios</h2>
<p>P2 fixes loss of applied unsaved steps on close. <a href="downloads/fixturekit-scenario-preview-p1.zip">Historical P1</a> (<a href="downloads/fixturekit-scenario-preview-p1.zip.sha256">SHA-256</a>) remains available for pinned consumers; save before closing P1.</p>
<p>Scenario Preview P2 combines a structured Tk editor, deterministic virtual time, offline replay and counts-only regression results. Choose climate or switch, define independent responses and expectations, and test without Home Assistant or physical devices.</p>
<p><a href="downloads/fixturekit-scenario-preview-p2.zip">Download Scenario Preview P2 (ZIP)</a> · <a href="downloads/fixturekit-scenario-preview-p2.zip.sha256">SHA-256 checksum</a> · <a href="https://github.com/FlyzDev/fixturekit/blob/main/examples/scenario/PORTABLE.md">Setup and limitations</a></p>
<h3>Follow one real bundled synthetic timeline</h3><p class="section-lead">The P2 climate example runs a 31-second virtual timeline with a 30-second outage and recovery without sleeping. The following timeline describes the actual bundled manifest, not a live device.</p>
<ol class="timeline" aria-label="Synthetic climate timeline"><li class="ok"><span>0 ms · HTTP 200</span><strong>19°C</strong><span>Available</span></li><li class="fault"><span>1,000 ms · HTTP 503</span><strong>Unavailable</strong><span>Outage begins</span></li><li class="fault"><span>30,000 ms · HTTP 503</span><strong>Unavailable</strong><span>Outage continues</span></li><li class="ok"><span>31,000 ms · HTTP 200</span><strong>23°C</strong><span>Recovered</span></li></ol>
<div class="sample-output"><pre tabindex="0" role="region" aria-label="Passing example output">Original expectation: 23°C
status: pass
observations: 4
virtual_elapsed_ms: 31000</pre><pre tabindex="0" role="region" aria-label="Intentional mismatch output">Change expectation to 24°C
status: fail
stage: comparison
values_changed: 1</pre></div><p>Condensed output from the P2 onboarding checks. <a href="https://github.com/FlyzDev/fixturekit/blob/main/QUICKSTART.md#try-a-virtual-time-scenario-without-cloning">Try the pass and deliberate failure</a>.</p>
<p><a class="primary" href="downloads/fixturekit-scenario-preview-p2.zip">Download Scenario Preview P2 (ZIP)</a> · <a href="downloads/fixturekit-scenario-preview-p2.zip.sha256">SHA-256 checksum</a> · <a href="https://github.com/FlyzDev/fixturekit/blob/main/examples/scenario/PORTABLE.md">Setup and limitations</a></p>
<p>Python 3.12 and package access for hash-pinned Alpha 10 dependencies are required. Tk is optional. This is an experimental source bundle, not an installer or a new PyPI release. Independent review remains open.</p></section>
<section><h2>Real integration examples</h2>
<p><a href="https://github.com/FlyzDev/cosa-ha#fixturekit-powered-regression-tests">Cosa V2</a> uses FixtureKit to project synthetic thermostat API responses into regression fixtures.
Expand All @@ -84,8 +107,8 @@ <h1>Make IoT fixtures easier to review.</h1>
<p>Try the shared response helper used in first-party Cosa and Tapo tests, with four local checks for failure recovery, strict request matching, projection and exact helper integrity. Python 3.12 and the hash-pinned Alpha 9 wheel are sufficient; no Home Assistant or real HTTP transport.</p>
<p><a href="downloads/fixturekit-response-replay-a9.zip">Download the response replay starter (ZIP)</a> · <a href="downloads/fixturekit-response-replay-a9.zip.sha256">SHA-256 checksum</a></p>
<p>Experimental test example, not a public Core API or independent adoption.</p></section>
<section><h2>Help shape a useful tool</h2>
<section class="callout"><h2>Help shape a useful tool</h2>
<p>If you already maintain IoT test fixtures, try a synthetic example and share what worked or failed: setup time, steps saved, false positives, or missing checks.</p>
<p><a href="https://github.com/FlyzDev/fixturekit/issues/1">Pilot feedback</a> · <a href="https://github.com/FlyzDev/fixturekit/blob/main/CONTRIBUTING.md">Contributing</a></p><p><a href="downloads/fixturekit-tuya-contributor-a9.zip">Tuya contributor starter</a> · <a href="downloads/fixturekit-tuya-contributor-a9.zip.sha256">SHA-256 checksum</a>. Synthetic only, Python 3.12; keep existing upstream checks and manual review.</p></section>
<p><a class="primary" href="https://github.com/FlyzDev/fixturekit/issues/1">Share pilot feedback</a> · <a href="https://github.com/FlyzDev/fixturekit/blob/main/CONTRIBUTING.md">Contributing</a></p><p><a href="downloads/fixturekit-tuya-contributor-a9.zip">Tuya contributor starter</a> · <a href="downloads/fixturekit-tuya-contributor-a9.zip.sha256">SHA-256 checksum</a>. Synthetic only, Python 3.12; keep existing upstream checks and manual review.</p></section>
<section><h2>Security boundaries</h2><p class="note">A clean audit is not a privacy guarantee. Keep existing redactors and manual review. Do not upload real diagnostics or identifiers. Independent security review is pending.</p><p><a href="https://github.com/FlyzDev/fixturekit/security/advisories/new">Report a vulnerability privately</a></p></section>
</main><footer>IoT FixtureKit · Independent experimental project; no affiliation with or endorsement by Home Assistant or upstream device libraries.</footer></body></html>
9 changes: 7 additions & 2 deletions examples/studio/test_public_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,15 @@ def test_landing_command_regions_are_explicitly_focusable(self):
page = path.read_text(encoding="utf-8")
parser = Links()
parser.feed(page)
self.assertEqual(len(parser.code_regions), 2)
expected_labels = ({"Package installation command", "Fixture audit command",
"Passing example output", "Intentional mismatch output"}
if path.parent == ROOT.parent else None)
labels = [r.get("aria-label") for r in parser.code_regions]
self.assertEqual(len(labels), 4 if expected_labels is not None else 2)
self.assertTrue(all(labels))
self.assertEqual(len(set(labels)), 2)
self.assertEqual(len(set(labels)), len(labels))
if expected_labels is not None:
self.assertEqual(set(labels), expected_labels)
self.assertTrue(all(r.get("tabindex") == "0" and
r.get("role") == "region"
for r in parser.code_regions))
Expand Down
Loading