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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 9 additions & 6 deletions tests/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading