From 50e056ba2e25b75ff9bc2c4d755f3e59a605f8fe Mon Sep 17 00:00:00 2001 From: Noam Cohen Date: Tue, 17 Nov 2026 13:33:07 +0100 Subject: [PATCH] Point the README demo at the video kept in the repository GitHub embeds a video player only for a copy uploaded through its website, and that copy is not replaced when the file in the repository changes: the README kept playing the earlier video. The demo section now shows the preview picture as a link to media/demo.mp4, which GitHub plays on the file page, so every branch shows its own video. --- README.md | 6 +++--- tests/test_repository.py | 15 +++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0f5cd3b..ff0201f 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,10 @@ Watch the GCD timing-improvement flow: OpenROAD, AI report analysis, Naja-Scope inspection, NajaEDA editing, Kepler Formal SEC, and a second OpenROAD run to compare the results. -https://github.com/user-attachments/assets/deadc1db-22f3-4c32-8f59-9bbca4aa1ccd +[![GCD flow demo: click to play](examples/backend/gcd/reference/media/demo-preview.jpg)](examples/backend/gcd/reference/media/demo.mp4) -48 seconds, no audio. [Download the MP4](https://github.com/keplertech/22b/raw/refs/heads/main/examples/backend/gcd/reference/media/demo.mp4) -if the inline player is unavailable. +Click the picture to play it: 48 seconds, no audio. [Download the MP4](https://github.com/keplertech/22b/raw/refs/heads/main/examples/backend/gcd/reference/media/demo.mp4) +if the player is unavailable. ## Start diff --git a/tests/test_repository.py b/tests/test_repository.py index 4c1b31c..4262a38 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -17,15 +17,18 @@ class RepositoryTests(unittest.TestCase): - def test_demo_uses_inline_video_attachment(self): + def test_demo_plays_the_video_kept_in_the_repository(self): + # GitHub embeds a player only for a copy uploaded through its website, and that + # copy goes stale when the video changes. The preview picture links to the file + # in the repository instead, so every branch shows its own video. readme = (ROOT / "README.md").read_text() demo = readme.split("## Demo\n", 1)[1].split("\n## ", 1)[0] - self.assertRegex( - demo, - r"(?m)^https://github\.com/user-attachments/assets/" - r"[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$", - ) + media = "examples/backend/gcd/reference/media" + self.assertRegex(demo, rf"(?m)^\[!\[[^\]]+\]\({media}/demo-preview\.jpg\)\]\({media}/demo\.mp4\)$") + self.assertNotIn("user-attachments", demo) self.assertNotIn("](examples/backend/gcd/media/demo.mp4)", demo) + with (ROOT / media / "demo-preview.jpg").open("rb") as stream: + self.assertEqual(stream.read(3), b"\xff\xd8\xff") def test_demo_has_repository_download_fallback(self): readme = (ROOT / "README.md").read_text()