about summary refs log tree commit diff
path: root/test/python/test_groups.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-10 19:21:28 +0000
committerPjotr <wrk@bosa.lan>2026-11-10 19:21:28 +0000
commit65a56cb93e905e5901ae61eca750991042721be5 (patch)
treefbbc0f136cef9a88a8855fa0f1dbd8ddc408526a /test/python/test_groups.py
parentbb3a5454c76d9ad7542f884fb14f89998d978553 (diff)
downloadgenenetwork4-65a56cb93e905e5901ae61eca750991042721be5.tar.gz
baskets: every revision kept, files named for the user, all four engines
Three things the first cut was missing, and both were asked for.

  * An automatic version history. Revision 1 is the column as first
    stored and each PATCH adds one -- with its own digest and Unix
    timestamp -- and earlier revisions are kept. GET
    /baskets/{name}/revisions is the history, ?revision=N reads an old
    column, and a mapping can pin one: {"basket": "wbc-edit@2"}. That is
    the point of a digest: a result quoted yesterday can still be
    reproduced after the column has moved on.
  * Files named for the user, not a hash of the subject:
    BASKET_DIR/<user>.sqlite (0600, WAL). Tokens rotate, subjects do not,
    so a new token finds the same baskets -- and an operator can see
    whose baskets a file holds. A subject that is not filename-safe is
    sanitised and disambiguated with a short digest, and a pre-naming
    hash file is renamed on first use rather than orphaned.
  * /compute/rqtl and /compute/gemma and /compute/fitqtl take `basket`
    too, so all four engines share one meaning: a basket resolves to the
    same (name, value) pairs a client would have posted, and every reply
    records the revision and digest it ran.

The schema upgrade is a real one, not a reset: an older file's single
column becomes revision 1 of the history, cells copied across with the
digest and timestamp they already had. Tested by building the old schema
by hand and opening it (an_older_file_is_upgraded_with_its_column_intact),
which is also how I found that the migration was recreating a table the
base schema had already made.

Verified on all four engines, head and pinned: rqtl 3811 rows, gemma
3809, qtl2 3730, fitqtl 3 markers -- each reply carrying "Basket '...'
revision N (digest ...)".
Diffstat (limited to 'test/python/test_groups.py')
0 files changed, 0 insertions, 0 deletions