cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

File fixtures: notebook tabs and outputs sent to sheets in this release's workbook; roadmap: cycles found from the formulas as written

Dami committed 7108899
commit
71088999e16cbafa956ed1b59e6a138c1d095be1
parent
788cacb0d0ad02469ed5b8e54b62d075f3bbce4c
author
Dami <dami.etoile@gmail.com>
kind
test risk score 0.7 of 3, Jev's estimate
5 files changed, +62 -29
MROADMAP.md2+-
Mdocs/contributing/releasing.md13+++++++------
Mdocs/contributing/testing.md27++++++++++++++++-----------
Minternal/sheet/testdata/fixtures/new/workbook.01224+++++++++++++++++++-----
Minternal/sheet/testdata/fixtures/v0.3.0/workbook.01225+++++++++++++++++++------
M ROADMAP.md +1 -1
M docs/contributing/releasing.md +7 -6
M docs/contributing/testing.md +16 -11
@@ -30,17 +30,22 @@ saved and saves them again, byte for byte
3030 3131 `TestRandomEdits` (`internal/sheet/randedit_test.go`) checks what holds3232 between features: from each of a thousand seeds it builds a workbook33-of two sheets and a notebook, makes up to 40 edits drawn from the seed34-(entries, pastes, fills, series, sorts, inserted and deleted rows and35-columns, formats, borders, merges, moves, notes, rules, names, sheets,36-frozen panes, filters, and region runs and sorts, with tables standing37-in for nushell's output), and checks that undoing every step gives back38-the file and the values it started with, redoing gives back the end,39-saving and reopening gives the same file and values (a recalculation40-from scratch), and recalculating everything in place changes no value.41-A failure names the fewest of the seed's edits that still fail. It takes42-about a second; `-randedit.seeds=20000` runs more, and `FuzzRandomEdits`43-(in `make fuzz`) lets the fuzzer choose the edits.33+of two sheets and a notebook tab, makes up to 40 edits drawn from the34+seed (entries, pastes, fills, series, sorts, inserted and deleted rows35+and columns, formats, borders, merges, moves, notes, rules, names,36+sheets, frozen panes, filters, notebook cells, and outputs sent to37+sheets, frozen, deleted and sent rows, with tables standing in for38+nushell's), and checks that undoing every step gives back the file and39+the values it started with, redoing gives back the end, saving and40+reopening gives the same file and values (a recalculation from41+scratch), and recalculating everything in place changes no value.42+Outputs' rows come from outside the undo history, so the test sends43+them again after each edit, undo and reopening, as the UI does. A44+failure names the fewest of the seed's edits that still fail. It takes45+about a second; `-randedit.seeds=20000` runs more, and46+`FuzzRandomEdits` (in `make fuzz`) lets the fuzzer choose the edits.47+Seeds that fail for a reason on the roadmap are listed in `randKnown`,48+with it.4449 4550 The UI is tested by sending4651 Bubble Tea messages (keys, mouse, paste, window size) to the model and
M internal/sheet/testdata/fixtures/new/workbook.012 +19 -5
@@ -131,17 +131,31 @@
131131 "pivot": {"source":"Sales!A1:E9","rows":[{"column":"B"},{"column":"A","order":"desc","sortBy":1}],"columns":[{"column":"C"}],"values":[{"column":"E","summarize":"sum"},{"column":"C","summarize":"counta","showAs":"percent_of_total","name":"Share"}],"filters":[{"column":"B","hidden":["West"]}],"rowTotals":true,"columnTotals":false}132132 },133133 {134- "name": "Notebook 1",134+ "name": "Data",135135 "widths": {"A": 20},136- "cells": {},137- "notebook": true,136+ "cells": {137+ "A20": "=SUM(nu.files)"138+ },138139 "regions": [139- {"name":"r1","command":"ls","at":"A1","rows":4,"cols":3},140- {"name":"big","command":"$r1 | where size > 1kb","at":"A8","rows":3,"cols":3,"reads":["r1"],"input":"Sales!A1:E9","sort":[{"column":3,"desc":true}]},140+ {"name":"files","at":"A1","output":true},141+ {"name":"big","at":"A8","output":true},141142 {"name":"app","at":"F2","path":"logs/app.csv","window":500},142143 {"name":"db","at":"F20","path":"data.sqlite","format":"SQLite","table":"orders"},143144 {"name":"q","at":"M20","path":"data.sqlite","format":"SQLite","query":"select * from orders limit 5"}144145 ]146+ },147+ {148+ "name": "Notebook",149+ "cells": {},150+ "tab": "notebook",151+ "reactive": true,152+ "notebookCells": [153+ {"kind":"note","source":"# Files\nWhat the folder holds."},154+ {"source":"files = ls","output":"[[name, size]; [go.mod, 812b], [README.md, 4kb]]"},155+ {"source":"big = $files | where size > 1kb","output":"[[name, size]; [README.md, 4kb]]","note":"2 rows left out"},156+ {"source":"$files | nope","error":"Command `nope` not found","detail":"help: check the spelling"},157+ {"source":"ls **/*","unsaved":true}158+ ]145159 }146160 ]147161 }
M internal/sheet/testdata/fixtures/v0.3.0/workbook.012 +19 -6
@@ -6,7 +6,6 @@
66 {"name": "Bold header", "key": "1", "api": 1, "source": "select(\"A1:E1\")\nrun(\"format.bold\")\n"},77 {"name": "Fill totals", "api": 1, "source": "set(\"F2\", \"=SUM(C2:C9)\")\n"}88 ],9- "shellHistory": ["ls","open data.csv | first 3"],109 "sheets": [1110 {1211 "name": "Sales",
@@ -130,17 +129,31 @@
130129 "pivot": {"source":"Sales!A1:E9","rows":[{"column":"B"},{"column":"A","order":"desc","sortBy":1}],"columns":[{"column":"C"}],"values":[{"column":"E","summarize":"sum"},{"column":"C","summarize":"counta","showAs":"percent_of_total","name":"Share"}],"filters":[{"column":"B","hidden":["West"]}],"rowTotals":true,"columnTotals":false}131130 },132131 {133- "name": "Notebook 1",132+ "name": "Data",134133 "widths": {"A": 20},135- "cells": {},136- "notebook": true,134+ "cells": {135+ "A20": "=SUM(nu.files)"136+ },137137 "regions": [138- {"name":"r1","command":"ls","at":"A1","rows":4,"cols":3},139- {"name":"big","command":"$r1 | where size \u003e 1kb","at":"A8","rows":3,"cols":3,"reads":["r1"],"input":"Sales!A1:E9","sort":[{"column":3,"desc":true}]},138+ {"name":"files","at":"A1","output":true},139+ {"name":"big","at":"A8","output":true},140140 {"name":"app","at":"F2","path":"logs/app.csv","window":500},141141 {"name":"db","at":"F20","path":"data.sqlite","format":"SQLite","table":"orders"},142142 {"name":"q","at":"M20","path":"data.sqlite","format":"SQLite","query":"select * from orders limit 5"}143143 ]144+ },145+ {146+ "name": "Notebook",147+ "cells": {},148+ "tab": "notebook",149+ "reactive": true,150+ "notebookCells": [151+ {"kind":"note","source":"# Files\nWhat the folder holds."},152+ {"source":"files = ls","output":"[[name, size]; [go.mod, 812b], [README.md, 4kb]]"},153+ {"source":"big = $files | where size \u003e 1kb","output":"[[name, size]; [README.md, 4kb]]","note":"2 rows left out"},154+ {"source":"$files | nope","error":"Command `nope` not found","detail":"help: check the spelling"},155+ {"source":"ls **/*","unsaved":true}156+ ]144157 }145158 ]146159 }