Skip to content

Add scautable-almond: notebook display for NamedTuple tables (#178) - #179

Merged
Quafadas merged 1 commit into
mainfrom
almond-notebook-display
Oct 28, 2026
Merged

Quafadas merged 1 commit into
mainfrom
almond-notebook-display

Conversation

@Quafadas

Copy link
Copy Markdown
Owner

New almond module (artifact scautable-almond, almond's interpreter-api as a compile-only dependency) with display, displayAll and notebookTable extensions on Iterable[NamedTuple[K, V]].

  • Headers come from K at the call site, so empty tables keep them
  • Publishes text/html (scrollable, sticky header, scoped styles) and uncoloured text/plain; opt-in application/vnd.dataresource+json
  • pandas-style truncation: >60 rows shows 5 at each end, with a marker; single pass, and only the shown rows are formatted
  • No extension for Iterator; materialise first

Core: ptbln now takes a TableSink (console by default). Importing notebook.given routes it to the notebook instead, which avoids an ambiguous-extension clash between two ptblns. TerminalTable.render gains colour = true.

New `almond` module (artifact `scautable-almond`, almond's interpreter-api
as a compile-only dependency) with `display`, `displayAll` and
`notebookTable` extensions on `Iterable[NamedTuple[K, V]]`.

- Headers come from `K` at the call site, so empty tables keep them
- Publishes text/html (scrollable, sticky header, scoped styles) and
  uncoloured text/plain; opt-in application/vnd.dataresource+json
- pandas-style truncation: >60 rows shows 5 at each end, with a marker;
  single pass, and only the shown rows are formatted
- No extension for Iterator; materialise first

Core: `ptbln` now takes a `TableSink` (console by default). Importing
`notebook.given` routes it to the notebook instead, which avoids an
ambiguous-extension clash between two `ptbln`s. `TerminalTable.render`
gains `colour = true`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Quafadas
Quafadas merged commit f13679e into main Oct 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants