Skip to content

Commit f30de51

Browse files
Update docs to reflect renamed TUI app modules and add video generation guide
- Fix stale module names (stack_demo_tui → stack_app, etc.) throughout README and AGENTS.md - Correct short aliases and test file names for all six TUI entries in the README table - Add run-*-app and demo-* targets to the All Valid Targets table - Add Producing Demo Videos section documenting make demo-<name> and make demo-all - Fix test reference in docs/StackTUI.md (test_stack_demo_tui → test_stack_app) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ed81769 commit f30de51

3 files changed

Lines changed: 54 additions & 19 deletions

File tree

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ Pull requests should include a brief description, the data structures or tests c
3232

3333
Several data structures have an interactive terminal UI built with [Textual](https://textual.textualize.io). There are two implementation patterns in use.
3434

35-
### Standalone TUI (`stack_demo_tui.py`)
35+
### Standalone TUI (`stack_app.py`)
3636

37-
`stack_demo_tui.py` is self-contained: it defines its own `StackDemo` model, panel widget, and full command dispatcher without inheriting from any shared base class. All future shared-base improvements do not automatically reach the stack TUI unless it is later refactored to inherit from `BaseLinearStructureTUI`.
37+
`stack_app.py` is self-contained: it defines its own `StackDemo` model, panel widget, and full command dispatcher without inheriting from any shared base class. All future shared-base improvements do not automatically reach the stack TUI unless it is later refactored to inherit from `BaseLinearStructureTUI`.
3838

39-
### Base-class TUIs (`tui_common.py`)
39+
### Base-class TUIs (`common.py`)
4040

4141
All other linear-structure TUIs inherit from `BaseLinearStructureTUI` in `data_structures/tui/common.py`. The base class provides:
4242

‎README.md‎

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,24 @@ make test-stack
2626
make run-stack
2727
```
2828

29-
The repo now includes interactive Textual TUIs for:
30-
- `stack_demo_tui`
31-
- `queue_demo_tui`
32-
- `deque_demo_tui`
33-
- `list_demo_tui`
34-
- `singly_linked_list_tui`
35-
- `doubly_linked_list_tui`
29+
The repo includes interactive Textual TUIs for six data structures. Launch any of them with a dedicated `make run-*-app` target:
3630

37-
Use targets such as `make run-stack-app`, `make run-queue-app`, or `make run-dll-app`. Other demo modules do not yet have a `__main__` block, so their `run-*` targets verify a clean import but produce no output.
31+
```bash
32+
make run-stack-app
33+
make run-queue-app
34+
make run-deque-app
35+
make run-list-app
36+
make run-sll-app
37+
make run-dll-app
38+
```
39+
40+
You can also run a TUI directly:
41+
42+
```bash
43+
.venv/bin/python -m data_structures.tui.stack_app
44+
```
45+
46+
Non-TUI demo modules contain only class definitions, so their `make run-<name>` targets verify a clean import but produce no output.
3847

3948
For walkthroughs of the interactive apps, see:
4049
- `docs/StackTUI.md`
@@ -44,14 +53,40 @@ For walkthroughs of the interactive apps, see:
4453
- `docs/SinglyLinkedListTUI.md`
4554
- `docs/DoublyLinkedListTUI.md`
4655

56+
## Producing Demo Videos
57+
58+
Demo tapes live in `demos/`. Each TUI has a dark-theme tape and a light-theme tape. Generating the videos requires [vhs](https://github.com/charmbracelet/vhs).
59+
60+
Produce videos for one TUI (dark + light):
61+
62+
```bash
63+
make demo-stack
64+
make demo-queue
65+
make demo-deque
66+
make demo-list
67+
make demo-sll
68+
make demo-dll
69+
```
70+
71+
Produce all videos at once:
72+
73+
```bash
74+
make demo-all
75+
```
76+
77+
Individual tape variants are also available, for example `make demo-stack-dark` or `make demo-dll-light`. Generated `.mp4` files are written to `demos/`.
78+
4779
## All Valid Targets
4880

4981
| Target | Description |
5082
|---|---|
5183
| `make install` | Create `.venv` and install dependencies |
5284
| `make test` | Run the full test suite |
53-
| `make run-<name>` | Import a single demo module |
85+
| `make run-<name>` | Import a single non-TUI demo module |
86+
| `make run-<name>-app` | Launch a TUI app interactively |
5487
| `make test-<name>` | Run a single test module with verbose output |
88+
| `make demo-<name>` | Produce dark+light demo videos for one TUI (requires [vhs](https://github.com/charmbracelet/vhs)) |
89+
| `make demo-all` | Produce demo videos for all six TUIs |
5590

5691
Valid `<name>` values (short alias or full name both work):
5792

@@ -66,13 +101,13 @@ Valid `<name>` values (short alias or full name both work):
66101
| `list` | `list_demo` | `data_structures/list_demo.py` | `tests/test_list_demo.py` |
67102
| `networkx` | `networkx_graph_demo` | `data_structures/networkx_graph_demo.py` | `tests/test_networkx_graph_demo.py` |
68103
| `queue` | `queue_demo` | `data_structures/queue_demo.py` | `tests/test_queue_demo.py` |
69-
| `queue-tui` | `queue_demo_tui` | `data_structures/tui/queue_app.py` | `tests/test_queue_demo_tui.py` |
104+
| `queue-app` | `queue_app` | `data_structures/tui/queue_app.py` | `tests/test_queue_app.py` |
70105
| `set` | `set_demo` | `data_structures/set_demo.py` | `tests/test_set_demo.py` |
71106
| `sll` | `singly_linked_list` | `data_structures/singly_linked_list.py` | `tests/test_singly_linked_list.py` |
72-
| `sll-tui` | `singly_linked_list_tui` | `data_structures/tui/singly_linked_list_app.py` | `tests/test_singly_linked_list_tui.py` |
107+
| `sll-app` | `singly_linked_list_app` | `data_structures/tui/singly_linked_list_app.py` | `tests/test_singly_linked_list_app.py` |
73108
| `stack` | `stack_demo` | `data_structures/stack_demo.py` | `tests/test_stack_demo.py` |
74-
| `stack-tui` | `stack_demo_tui` | `data_structures/tui/stack_app.py` | `tests/test_stack_demo_tui.py` |
75-
| `deque-tui` | `deque_demo_tui` | `data_structures/tui/deque_app.py` | `tests/test_deque_demo_tui.py` |
76-
| `list-tui` | `list_demo_tui` | `data_structures/tui/list_app.py` | `tests/test_list_demo_tui.py` |
77-
| `dll-tui` | `doubly_linked_list_tui` | `data_structures/tui/doubly_linked_list_app.py` | `tests/test_doubly_linked_list_tui.py` |
109+
| `stack-app` | `stack_app` | `data_structures/tui/stack_app.py` | `tests/test_stack_app.py` |
110+
| `deque-app` | `deque_app` | `data_structures/tui/deque_app.py` | `tests/test_deque_app.py` |
111+
| `list-app` | `list_app` | `data_structures/tui/list_app.py` | `tests/test_list_app.py` |
112+
| `dll-app` | `doubly_linked_list_app` | `data_structures/tui/doubly_linked_list_app.py` | `tests/test_doubly_linked_list_app.py` |
78113
| `trie` | `trie_demo` | `data_structures/trie_demo.py` | `tests/test_trie_demo.py` |

‎docs/StackTUI.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,6 @@ Expected behavior:
512512

513513
## Verification Notes
514514

515-
The viewport-selection and argument-parsing logic are covered by `tests/test_stack_demo_tui.py`.
515+
The viewport-selection and argument-parsing logic are covered by `tests/test_stack_app.py`.
516516

517517
The app also runs under the local project virtual environment created by `make install`.

0 commit comments

Comments
 (0)