README: add architecture diagrams (EN/RU)

Both READMEs gain a capture-and-analysis diagram right under the screenshot:
simtrace2-pysniff and sigrok_iso7816_stream feed the GSMTAP UDP :4729
listener, SIMtrace2 hardware can be read directly over USB, PCAP/COMPRION
traces come from files, and simtrace-analyser-server decodes/stores into
SQLite and serves the web UI.  The SVGs carry title/desc and role=img, use
only inline presentation attributes (no scripts, no external refs) and render
without clipped text; the RU text matches the EN layout.

The runtime zip includes both diagrams so the embedded READMEs keep working,
and a new drift guard checks that every image a README references is present
in the archive.  RU wording: "устанавливаемое PWA" (neuter agreement).

558 Python + 80 Node tests.
This commit is contained in:
catarrh committed 2026-10-28 00:36:26 +03:00
1 parent 9a661f5ab2
commit 2b83d21e64
6 files changed
+129

No files matched your search

+2
View File
@@ -13,6 +13,8 @@ GSMTAP into this analyser.
![SIMtrace Analyser UI](frontend.png) ![SIMtrace Analyser UI](frontend.png)
![Capture and analysis: simtrace2-pysniff (SIMtrace2 hardware) and sigrok_iso7816_stream (FX2) stream GSMTAP-SIM to the UDP :4729 listener; alternatively the server reads SIMtrace2 hardware directly over USB, and PCAP/COMPRION traces are imported from files; simtrace-analyser-server decodes and stores the traffic in SQLite and serves the web UI](architecture_en.svg)
## Prerequisites ## Prerequisites
**Required** **Required**
+2
View File
@@ -13,6 +13,8 @@ SIM/UICC из UDP-потока GSMTAP (или импортирует файлы
![Интерфейс SIMtrace Analyser](frontend.png) ![Интерфейс SIMtrace Analyser](frontend.png)
![Захват и анализ: simtrace2-pysniff (оборудование SIMtrace2) и sigrok_iso7816_stream (FX2) передают GSMTAP-SIM слушателю UDP :4729; альтернативно сервер читает оборудование SIMtrace2 напрямую по USB, а PCAP/трассы COMPRION импортируются из файлов; simtrace-analyser-server декодирует и сохраняет трафик в SQLite и раздаёт веб-интерфейс](architecture_ru.svg)
## Требования ## Требования
**Обязательно** **Обязательно**
+54
View File
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="640" viewBox="0 0 960 640" role="img" aria-labelledby="diagram-title diagram-desc" font-family="'Segoe UI', 'Helvetica Neue', Arial, 'DejaVu Sans', sans-serif">
<title id="diagram-title">SIMtrace Analyser: capture and analysis</title>
<desc id="diagram-desc">simtrace2-pysniff (SIMtrace2 hardware) and sigrok_iso7816_stream (FX2 logic analyzer) stream GSMTAP-SIM to the listener on UDP :4729; alternatively the server reads SIMtrace2 hardware directly over USB, and PCAP/COMPRION traces are imported from files. simtrace-analyser-server decodes and stores the traffic in SQLite and serves the web UI.</desc>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0 0 L10 5 L0 10 Z" fill="#64748b"/>
</marker>
</defs>
<rect x="1" y="1" width="958" height="638" rx="18" fill="#ffffff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="480" y="30" text-anchor="middle" font-size="14" fill="#475569">capture → analyse</text>
<rect x="120" y="48" width="320" height="76" rx="12" fill="#eff6ff" stroke="#93c5fd" stroke-width="1.5"/>
<text x="280" y="84" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">simtrace2-pysniff</text>
<text x="280" y="108" text-anchor="middle" font-size="14" fill="#475569">SIMtrace2 hardware</text>
<rect x="520" y="48" width="320" height="76" rx="12" fill="#f5f3ff" stroke="#c4b5fd" stroke-width="1.5"/>
<text x="680" y="84" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">sigrok_iso7816_stream</text>
<text x="680" y="108" text-anchor="middle" font-size="14" fill="#475569">FX2 logic analyzer</text>
<line x1="280" y1="124" x2="480" y2="210" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="680" y1="124" x2="480" y2="210" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="40" y="210" width="270" height="72" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="175" y="242" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a">SIMtrace2 hardware</text>
<text x="175" y="264" text-anchor="middle" font-size="14" fill="#475569">direct USB</text>
<rect x="345" y="210" width="270" height="72" rx="12" fill="#fffbeb" stroke="#fcd34d" stroke-width="1.5"/>
<text x="480" y="242" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">GSMTAP UDP :4729</text>
<text x="480" y="264" text-anchor="middle" font-size="14" fill="#475569">listener</text>
<rect x="650" y="210" width="270" height="72" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="785" y="242" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a">PCAP / COMPRION import</text>
<text x="785" y="264" text-anchor="middle" font-size="14" fill="#475569">files</text>
<line x1="175" y1="282" x2="400" y2="368" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="480" y1="282" x2="480" y2="368" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="785" y1="282" x2="560" y2="368" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="270" y="368" width="420" height="84" rx="12" fill="#ecfdf5" stroke="#6ee7b7" stroke-width="1.5"/>
<text x="480" y="404" text-anchor="middle" font-size="19" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">simtrace-analyser-server</text>
<text x="480" y="430" text-anchor="middle" font-size="14" fill="#475569">decodes · stores</text>
<line x1="480" y1="452" x2="255" y2="516" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="480" y1="452" x2="705" y2="516" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="120" y="516" width="270" height="76" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="255" y="554" text-anchor="middle" font-size="18" font-weight="600" fill="#0f172a">SQLite</text>
<text x="255" y="576" text-anchor="middle" font-size="14" fill="#475569">sessions.db</text>
<rect x="570" y="516" width="270" height="76" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="705" y="554" text-anchor="middle" font-size="18" font-weight="600" fill="#0f172a">Browser (web UI)</text>
<text x="705" y="576" text-anchor="middle" font-size="14" fill="#475569">installable PWA</text>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

+54
View File
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="640" viewBox="0 0 960 640" role="img" aria-labelledby="diagram-title diagram-desc" font-family="'Segoe UI', 'Helvetica Neue', Arial, 'DejaVu Sans', sans-serif">
<title id="diagram-title">SIMtrace Analyser: захват и анализ</title>
<desc id="diagram-desc">simtrace2-pysniff (оборудование SIMtrace2) и sigrok_iso7816_stream (логический анализатор FX2) передают GSMTAP-SIM слушателю UDP :4729; альтернативно сервер читает оборудование SIMtrace2 напрямую по USB, а PCAP/трассы COMPRION импортируются из файлов. simtrace-analyser-server декодирует и сохраняет трафик в SQLite и раздаёт веб-интерфейс.</desc>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0 0 L10 5 L0 10 Z" fill="#64748b"/>
</marker>
</defs>
<rect x="1" y="1" width="958" height="638" rx="18" fill="#ffffff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="480" y="30" text-anchor="middle" font-size="14" fill="#475569">захват → анализ</text>
<rect x="120" y="48" width="320" height="76" rx="12" fill="#eff6ff" stroke="#93c5fd" stroke-width="1.5"/>
<text x="280" y="84" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">simtrace2-pysniff</text>
<text x="280" y="108" text-anchor="middle" font-size="14" fill="#475569">оборудование SIMtrace2</text>
<rect x="520" y="48" width="320" height="76" rx="12" fill="#f5f3ff" stroke="#c4b5fd" stroke-width="1.5"/>
<text x="680" y="84" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">sigrok_iso7816_stream</text>
<text x="680" y="108" text-anchor="middle" font-size="14" fill="#475569">логический анализатор FX2</text>
<line x1="280" y1="124" x2="480" y2="210" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="680" y1="124" x2="480" y2="210" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="40" y="210" width="270" height="72" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="175" y="242" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a">Оборудование SIMtrace2</text>
<text x="175" y="264" text-anchor="middle" font-size="14" fill="#475569">прямой USB</text>
<rect x="345" y="210" width="270" height="72" rx="12" fill="#fffbeb" stroke="#fcd34d" stroke-width="1.5"/>
<text x="480" y="242" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">GSMTAP UDP :4729</text>
<text x="480" y="264" text-anchor="middle" font-size="14" fill="#475569">слушатель</text>
<rect x="650" y="210" width="270" height="72" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="785" y="242" text-anchor="middle" font-size="16" font-weight="600" fill="#0f172a">Импорт PCAP / COMPRION</text>
<text x="785" y="264" text-anchor="middle" font-size="14" fill="#475569">файлы</text>
<line x1="175" y1="282" x2="400" y2="368" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="480" y1="282" x2="480" y2="368" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="785" y1="282" x2="560" y2="368" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="270" y="368" width="420" height="84" rx="12" fill="#ecfdf5" stroke="#6ee7b7" stroke-width="1.5"/>
<text x="480" y="404" text-anchor="middle" font-size="19" font-weight="600" fill="#0f172a" font-family="'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace">simtrace-analyser-server</text>
<text x="480" y="430" text-anchor="middle" font-size="14" fill="#475569">декодирует · сохраняет</text>
<line x1="480" y1="452" x2="255" y2="516" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<line x1="480" y1="452" x2="705" y2="516" stroke="#64748b" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="120" y="516" width="270" height="76" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="255" y="554" text-anchor="middle" font-size="18" font-weight="600" fill="#0f172a">SQLite</text>
<text x="255" y="576" text-anchor="middle" font-size="14" fill="#475569">sessions.db</text>
<rect x="570" y="516" width="270" height="76" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="705" y="554" text-anchor="middle" font-size="18" font-weight="600" fill="#0f172a">Браузер (веб-интерфейс)</text>
<text x="705" y="576" text-anchor="middle" font-size="14" fill="#475569">устанавливаемое PWA</text>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

+2
View File
@@ -40,6 +40,8 @@ ROOT_FILES = (
'README.md', 'README.md',
'README_RUS.md', 'README_RUS.md',
'frontend.png', 'frontend.png',
'architecture_en.svg',
'architecture_ru.svg',
'LICENSE', 'LICENSE',
) )
+15
View File
@@ -81,6 +81,21 @@ class TestReleaseZip(unittest.TestCase):
self.assertIn('%s/frontend/%s' % (top, asset), self.names, self.assertIn('%s/frontend/%s' % (top, asset), self.names,
'precached %s is missing from the zip' % asset) 'precached %s is missing from the zip' % asset)
def test_readme_images_are_in_the_zip(self):
# Drift guard: the runtime tree's READMEs embed the screenshot and the
# architecture diagrams by relative path, so every referenced image
# must travel with the archive.
top = 'simtrace-analyser-%s' % __version__
for readme in ('README.md', 'README_RUS.md'):
text = (REPO / readme).read_text()
images = re.findall(r'!\[[^\]]*\]\(([^)\s]+)\)', text)
self.assertTrue(images, 'no images referenced by %s' % readme)
for image in images:
self.assertNotIn('://', image, image)
self.assertIn('%s/%s' % (top, image), self.names,
'%s references %s, which is missing from the zip'
% (readme, image))
def test_batch_files_use_crlf(self): def test_batch_files_use_crlf(self):
with zipfile.ZipFile(self.archive) as zf: with zipfile.ZipFile(self.archive) as zf:
bats = [n for n in self.names if n.endswith('.bat')] bats = [n for n in self.names if n.endswith('.bat')]