[{"data":1,"prerenderedAt":6813},["ShallowReactive",2],{"doc:\u002Fdocs\u002Fcontributing\u002Fadding-a-node":3,"docs-nav":6551},{"id":4,"title":5,"body":6,"description":6543,"extension":6544,"meta":6545,"navigation":912,"path":6547,"seo":6548,"stem":6549,"__hash__":6550},"docs\u002Fdocs\u002Fcontributing\u002Fadding-a-node.md","Adding a node to the flow editor",{"type":7,"value":8,"toc":6494},"minimark",[9,13,16,41,44,127,130,138,143,175,182,185,219,224,432,439,445,471,565,588,594,695,698,702,705,786,789,1115,1129,1150,1164,1189,1194,1233,1237,1240,1265,1468,1481,1491,1561,1570,1574,1581,1632,1652,1655,1722,1725,1729,1744,1757,1800,1812,1824,2034,2064,2091,2115,2131,2146,2150,2153,2213,2216,2240,2269,2273,2279,2302,2383,2485,2496,2534,2541,2573,2577,2608,2712,2719,2725,2729,2734,2855,2873,2939,2967,2971,2980,3112,3135,3359,3369,3403,3406,3410,3459,3462,3465,3479,3516,3519,3669,3699,3705,3719,3843,3913,3927,3931,3980,3983,3989,4046,4181,4184,4268,4288,4296,4345,4350,4398,4408,4412,4418,4499,4528,4535,4560,4646,4654,4693,4712,4716,4723,4786,4803,4807,4833,4837,4886,4889,4916,4919,5081,5085,5137,5198,5210,5214,5219,5337,5359,5379,5383,5446,5487,5491,5536,5540,5576,5580,5620,5624,5631,5858,5868,5872,5875,6004,6007,6098,6101,6201,6204,6208,6211,6467,6490],[10,11,5],"h1",{"id":12},"adding-a-node-to-the-flow-editor",[14,15],"page-toc",{},[17,18,19,20,24,25,29,30,33,34,29,37,40],"p",{},"A node of the flow editor is an ",[21,22,23],"strong",{},"operation"," the engine knows: ",[26,27,28],"code",{},"filter",", ",[26,31,32],{},"group_by",",\n",[26,35,36],{},"pivot",[26,38,39],{},"stat_t_two_sample",". This guide takes you from nothing to a pull request whose\nchecks pass at the first push. It is written for someone who has not read the code before:\nevery step names the file, shows a few lines of the real code to copy the shape of, the\ntest to write and the command that runs it.",[17,42,43],{},"There are three ways to add a node, and the code treats them differently. Choose first.",[45,46,47,63],"table",{},[48,49,51],"thead",{"role":50},"rowgroup",[52,53,55,60],"tr",{"role":54},"row",[56,57,59],"th",{"role":58},"columnheader","You want to add",[56,61,62],{"role":58},"Follow",[64,65,66,90,109],"tbody",{"role":50},[52,67,68,82],{"role":54},[69,70,73,74,29,76,29,79,81],"td",{"role":71,"data-label":59,"data-place":72},"cell","title","A transformation of the rows or columns: a new ",[26,75,28],{},[26,77,78],{},"reorder",[26,80,36],{},"…",[69,83,85],{"role":71,"data-label":62,"data-place":84},"meta",[86,87,89],"a",{"href":88},"#path-1-a-transformation","Path 1: a transformation",[52,91,92,103],{"role":54},[69,93,94,95,98,99,102],{"role":71,"data-label":59,"data-place":72},"A hypothesis test (",[26,96,97],{},"stat_\u003Cid>","): a new member of the ",[21,100,101],{},"Statistics"," group",[69,104,105],{"role":71,"data-label":62,"data-place":84},[86,106,108],{"href":107},"#path-2-a-statistical-test","Path 2: a statistical test",[52,110,111,121],{"role":54},[69,112,113,114,98,117,120],{"role":71,"data-label":59,"data-place":72},"A statistical model (",[26,115,116],{},"model_\u003Cid>",[21,118,119],{},"Models"," group, fitted in a Job on Kubernetes",[69,122,123],{"role":71,"data-label":62,"data-place":84},[86,124,126],{"href":125},"#path-3-a-statistical-model","Path 3: a statistical model",[17,128,129],{},"A statistical test is not a transformation: it has its own catalogue, one function for\nits final computation, a report and a generic form. If your node reads the data and writes\na table of results of a test, it is Path 2. A model is neither: no engine fits it. It is\ncode in R or Python, in an image Tabularia builds per group, that runs as a Job; its path is\nthe longest, and it is described below from what the models already added. Everything else is Path 1.",[17,131,132,133,137],{},"Before you start, read ",[86,134,136],{"href":135},"\u002Fdocs\u002Fengines\u002Fengine-differences","Engine differences",": a node must\ngive the same result on the five engines (Polars, DuckDB, chDB, the external ClickHouse and\nBigQuery), and that page says what \"the same\" means.",[139,140,142],"h2",{"id":141},"what-you-need","What you need",[144,145,146,150,161,172],"ul",{},[147,148,149],"li",{},"Docker, to build the two development images and run the engine's and the gateway's suites\nas CI does. The first build takes a while and the suites start real ClickHouse, PostgreSQL,\nMinIO and Valkey containers: keep a few GB of memory free.",[147,151,152,153,156,157,160],{},"Node 22 and ",[26,154,155],{},"npm ci"," in ",[26,158,159],{},"frontend\u002F"," for the interface checks (CI uses Node 22).",[147,162,163,164,167,168,171],{},"Go, only if you touch ",[26,165,166],{},"gateway-go\u002F"," (CI runs it in the ",[26,169,170],{},"golang:1.27.3-bookworm"," image).",[147,173,174],{},"Python 3.11 or later, for the catalogue script of Path 2 (standard library only).",[17,176,177,178,181],{},"The repository's map and the rules for pull requests are in ",[26,179,180],{},"CONTRIBUTING.md",".",[139,183,89],{"id":184},"path-1-a-transformation",[17,186,187,188,190,191,194,195,198,199,202,203,206,207,210,211,214,215,218],{},"The model used below is ",[26,189,78],{},", the simplest operation with a complete trail in the\nhistory: commit ",[26,192,193],{},"d6794def"," added it to the engine, the dbt export and the editor. Three\nlater commits added what did not exist yet: ",[26,196,197],{},"4c540b14"," (the BigQuery engine), ",[26,200,201],{},"d57651e0","\n(the flow assistant) and ",[26,204,205],{},"9ea7dcd5"," (the editor's right-click menu). You can follow any of\nthem with ",[26,208,209],{},"git show --stat \u003Ccommit>",". The newest operation that was added in one commit is\n",[26,212,213],{},"sample"," (",[26,216,217],{},"9934f585",", with the oracle suite): it is a good second model when your node has a\nseed or a fraction. No new transformation has been added since September 2026, so the\nlist below was checked against the code as it is today, not against a recent commit.",[220,221,223],"h3",{"id":222},"the-whole-list-at-a-glance","The whole list, at a glance",[45,225,226,239],{},[48,227,228],{"role":50},[52,229,230,233,236],{"role":54},[56,231,232],{"role":58},"#",[56,234,235],{"role":58},"Where",[56,237,238],{"role":58},"File",[64,240,241,255,268,281,294,313,329,347,366,379,392,413],{"role":50},[52,242,243,246,249],{"role":54},[69,244,245],{"role":71,"data-label":232,"data-place":72},"1",[69,247,248],{"role":71,"data-label":235,"data-place":84},"The operation, on Polars",[69,250,252],{"role":71,"data-label":238,"data-place":251},"body",[26,253,254],{},"backend\u002Fapp\u002Fengine\u002Foperations.py",[52,256,257,260,263],{"role":54},[69,258,259],{"role":71,"data-label":232,"data-place":72},"2",[69,261,262],{"role":71,"data-label":235,"data-place":84},"The operation, on DuckDB",[69,264,265],{"role":71,"data-label":238,"data-place":251},[26,266,267],{},"backend\u002Fapp\u002Fengine\u002Fduckdb_ops.py",[52,269,270,273,276],{"role":54},[69,271,272],{"role":71,"data-label":232,"data-place":72},"3",[69,274,275],{"role":71,"data-label":235,"data-place":84},"The operation, on chDB and on the external ClickHouse",[69,277,278],{"role":71,"data-label":238,"data-place":251},[26,279,280],{},"backend\u002Fapp\u002Fengine\u002Fchdb_ops.py",[52,282,283,286,289],{"role":54},[69,284,285],{"role":71,"data-label":232,"data-place":72},"4",[69,287,288],{"role":71,"data-label":235,"data-place":84},"The operation, on BigQuery",[69,290,291],{"role":71,"data-label":238,"data-place":251},[26,292,293],{},"backend\u002Fapp\u002Fengine\u002Fbigquery_ops.py",[52,295,296,299,302],{"role":54},[69,297,298],{"role":71,"data-label":232,"data-place":72},"5",[69,300,301],{"role":71,"data-label":235,"data-place":84},"Tests of the engine",[69,303,304,29,307,29,310],{"role":71,"data-label":238,"data-place":251},[26,305,306],{},"backend\u002Ftests\u002Ftest_operations.py",[26,308,309],{},"test_data_correctness.py",[26,311,312],{},"test_bigquery_ops.py",[52,314,315,318,321],{"role":54},[69,316,317],{"role":71,"data-label":232,"data-place":72},"6",[69,319,320],{"role":71,"data-label":235,"data-place":84},"The dbt export",[69,322,323,29,326],{"role":71,"data-label":238,"data-place":251},[26,324,325],{},"backend\u002Fapp\u002Fengine\u002Fdbt_export.py",[26,327,328],{},"backend\u002Ftests\u002Ftest_dbt_export.py",[52,330,331,334,337],{"role":54},[69,332,333],{"role":71,"data-label":232,"data-place":72},"7",[69,335,336],{"role":71,"data-label":235,"data-place":84},"The Go gateway",[69,338,339,342,343,346],{"role":71,"data-label":238,"data-place":251},[26,340,341],{},"gateway-go\u002Finternal\u002Fapi\u002Fflow_shortcuts.go"," (and ",[26,344,345],{},"dbtexport\u002Fpayload.go",")",[52,348,349,352,355],{"role":54},[69,350,351],{"role":71,"data-label":232,"data-place":72},"8",[69,353,354],{"role":71,"data-label":235,"data-place":84},"The form, the icon, the summary",[69,356,357,29,360,29,363],{"role":71,"data-label":238,"data-place":251},[26,358,359],{},"frontend\u002Fcomposables\u002FuseFlowModel.ts",[26,361,362],{},"useOpIcons.ts",[26,364,365],{},"opSummary.ts",[52,367,368,371,374],{"role":54},[69,369,370],{"role":71,"data-label":232,"data-place":72},"9",[69,372,373],{"role":71,"data-label":235,"data-place":84},"The words in five languages",[69,375,376],{"role":71,"data-label":238,"data-place":251},[26,377,378],{},"frontend\u002Fi18n\u002Flocales\u002F{en,it,de,es,fr}.ts",[52,380,381,384,387],{"role":54},[69,382,383],{"role":71,"data-label":232,"data-place":72},"10",[69,385,386],{"role":71,"data-label":235,"data-place":84},"Interface tests",[69,388,389],{"role":71,"data-label":238,"data-place":251},[26,390,391],{},"frontend\u002Ftests\u002Fflow-shortcuts.test.mjs",[52,393,394,397,400],{"role":54},[69,395,396],{"role":71,"data-label":232,"data-place":72},"11",[69,398,399],{"role":71,"data-label":235,"data-place":84},"The AI assistant and MCP",[69,401,402,405,406,409,410],{"role":71,"data-label":238,"data-place":251},[26,403,404],{},"gateway\u002Fapp\u002Fservices\u002Fai_flow_agent.py",", then ",[26,407,408],{},"prompts.json"," and ",[26,411,412],{},"tools.json",[52,414,415,418,421],{"role":54},[69,416,417],{"role":71,"data-label":232,"data-place":72},"12",[69,419,420],{"role":71,"data-label":235,"data-place":84},"Documentation and changelog",[69,422,423,29,426,29,429],{"role":71,"data-label":238,"data-place":251},[26,424,425],{},"docs\u002Fcapabilities\u002Fflows.md",[26,427,428],{},"docs\u002Fengines\u002Fengine-differences.md",[26,430,431],{},"CHANGELOG.md",[17,433,434,435,438],{},"There is no file where an operation is \"declared\" with a schema. An operation exists\nbecause a function is registered under its name in the four Python registries; its\nparameters are a plain dictionary that each function reads and checks by itself, and the\nform that edits it is declared in the interface (step 8). The palette needs nothing: the\neditor asks the engine for the registered names (",[26,436,437],{},"GET \u002Ftasks\u002Foperations",") and lists them,\nso a registered operation shows up in the palette, with a generic icon until you give it\none.",[220,440,442,443],{"id":441},"step-1-polars-backendappengineoperationspy","Step 1. Polars: ",[26,444,254],{},[17,446,447,448,451,452,455,456,459,460,463,464,467,468,470],{},"An operation is a pure function ",[26,449,450],{},"(lf, params, ctx) -> lf"," on a Polars ",[26,453,454],{},"LazyFrame",",\nregistered with ",[26,457,458],{},"@register(\"name\")",". Use ",[26,461,462],{},"_require(params, \"key\")"," for a required\nparameter and raise ",[26,465,466],{},"EngineError"," with a sentence that says what to do. This is the\nwhole of ",[26,469,78],{},":",[472,473,478],"pre",{"className":474,"code":475,"language":476,"meta":477,"style":477},"language-python shiki shiki-themes github-dark-dimmed github-light-high-contrast","@register(\"reorder\")\ndef op_reorder(lf: pl.LazyFrame, params: dict[str, Any], ctx: OperationContext) -> pl.LazyFrame:\n    # reorder: the listed columns first (in this order), then ALL the others (so the\n    # columns added upstream after the configuration are not lost).\n    order = _require(params, \"columns\")\n    return lf.select([*order, pl.exclude(order)])\n","python","",[26,479,480,500,520,527,533,550],{"__ignoreMap":477},[481,482,485,489,493,497],"span",{"class":483,"line":484},"line",1,[481,486,488],{"class":487},"s94ky","@register",[481,490,492],{"class":491},"s5JDJ","(",[481,494,496],{"class":495},"sLsUC","\"reorder\"",[481,498,499],{"class":491},")\n",[481,501,503,507,510,513,517],{"class":483,"line":502},2,[481,504,506],{"class":505},"ssKa_","def",[481,508,509],{"class":487}," op_reorder",[481,511,512],{"class":491},"(lf: pl.LazyFrame, params: dict[",[481,514,516],{"class":515},"s6oG4","str",[481,518,519],{"class":491},", Any], ctx: OperationContext) -> pl.LazyFrame:\n",[481,521,523],{"class":483,"line":522},3,[481,524,526],{"class":525},"sseud","    # reorder: the listed columns first (in this order), then ALL the others (so the\n",[481,528,530],{"class":483,"line":529},4,[481,531,532],{"class":525},"    # columns added upstream after the configuration are not lost).\n",[481,534,536,539,542,545,548],{"class":483,"line":535},5,[481,537,538],{"class":491},"    order ",[481,540,541],{"class":505},"=",[481,543,544],{"class":491}," _require(params, ",[481,546,547],{"class":495},"\"columns\"",[481,549,499],{"class":491},[481,551,553,556,559,562],{"class":483,"line":552},6,[481,554,555],{"class":505},"    return",[481,557,558],{"class":491}," lf.select([",[481,560,561],{"class":505},"*",[481,563,564],{"class":491},"order, pl.exclude(order)])\n",[17,566,567,568,409,571,574,575,578,579,582,583,409,585,587],{},"Keep it lazy and streaming: do not collect inside an operation. If it needs a second input\n(as ",[26,569,570],{},"join",[26,572,573],{},"union"," do), read how those two use ",[26,576,577],{},"_build_right"," and how the flow is\nresolved first (",[26,580,581],{},"gateway-go\u002Finternal\u002Fflowresolver\u002Fflowresolver.go"," treats ",[26,584,570],{},[26,586,573],{},"\nspecially); that path is not covered by this guide.",[17,589,590,591,593],{},"Test: ",[26,592,306],{}," tests one operation on a small frame:",[472,595,597],{"className":474,"code":596,"language":476,"meta":477,"style":477},"def apply(op_type: str, params: dict, df: pl.DataFrame | None = None, ctx=None) -> pl.DataFrame:\n    \"\"\"Applies one operation and materializes the result.\"\"\"\n    lf = (df if df is not None else df_base()).lazy()\n    return get_operation(op_type)(lf, params, ctx).collect(engine=\"streaming\")\n",[26,598,599,642,647,677],{"__ignoreMap":477},[481,600,601,603,606,609,611,614,617,620,623,626,629,631,634,636,639],{"class":483,"line":484},[481,602,506],{"class":505},[481,604,605],{"class":487}," apply",[481,607,608],{"class":491},"(op_type: ",[481,610,516],{"class":515},[481,612,613],{"class":491},", params: ",[481,615,616],{"class":515},"dict",[481,618,619],{"class":491},", df: pl.DataFrame ",[481,621,622],{"class":505},"|",[481,624,625],{"class":515}," None",[481,627,628],{"class":505}," =",[481,630,625],{"class":515},[481,632,633],{"class":491},", ctx",[481,635,541],{"class":505},[481,637,638],{"class":515},"None",[481,640,641],{"class":491},") -> pl.DataFrame:\n",[481,643,644],{"class":483,"line":502},[481,645,646],{"class":495},"    \"\"\"Applies one operation and materializes the result.\"\"\"\n",[481,648,649,652,654,657,660,663,666,669,671,674],{"class":483,"line":522},[481,650,651],{"class":491},"    lf ",[481,653,541],{"class":505},[481,655,656],{"class":491}," (df ",[481,658,659],{"class":505},"if",[481,661,662],{"class":491}," df ",[481,664,665],{"class":505},"is",[481,667,668],{"class":505}," not",[481,670,625],{"class":515},[481,672,673],{"class":505}," else",[481,675,676],{"class":491}," df_base()).lazy()\n",[481,678,679,681,684,688,690,693],{"class":483,"line":529},[481,680,555],{"class":505},[481,682,683],{"class":491}," get_operation(op_type)(lf, params, ctx).collect(",[481,685,687],{"class":686},"sXYdG","engine",[481,689,541],{"class":505},[481,691,692],{"class":495},"\"streaming\"",[481,694,499],{"class":491},[17,696,697],{},"Check: see \"Running the engine's tests\" below.",[220,699,701],{"id":700},"steps-2-to-4-the-other-four-engines","Steps 2 to 4. The other four engines",[17,703,704],{},"The three SQL engines each have a registry of their own, with the same names. The\nfunctions differ in what they receive, and none of them runs the query: they return the\nnext step of the chain.",[45,706,707,722],{},[48,708,709],{"role":50},[52,710,711,714,716,719],{"role":54},[56,712,713],{"role":58},"Engine",[56,715,238],{"role":58},[56,717,718],{"role":58},"Signature",[56,720,721],{"role":58},"Returns",[64,723,724,744,770],{"role":50},[52,725,726,729,734,739],{"role":54},[69,727,728],{"role":71,"data-label":713,"data-place":72},"DuckDB",[69,730,731],{"role":71,"data-label":238,"data-place":84},[26,732,733],{},"duckdb_ops.py",[69,735,736],{"role":71,"data-label":718,"data-place":84},[26,737,738],{},"(rel, params, a, ctx)",[69,740,741],{"role":71,"data-label":721,"data-place":84},[26,742,743],{},"rel.query(a, \"SELECT ...\")",[52,745,746,749,762,767],{"role":54},[69,747,748],{"role":71,"data-label":713,"data-place":72},"chDB and the external ClickHouse",[69,750,751,754,755,758,759,346],{"role":71,"data-label":238,"data-place":84},[26,752,753],{},"chdb_ops.py"," (the external engine reuses it entirely: ",[26,756,757],{},"clickhouse_engine.py"," imports ",[26,760,761],{},"get_chdb_operation",[69,763,764],{"role":71,"data-label":718,"data-place":84},[26,765,766],{},"(sql, params, ctx)",[69,768,769],{"role":71,"data-label":721,"data-place":84},"an SQL string",[52,771,772,775,780,784],{"role":54},[69,773,774],{"role":71,"data-label":713,"data-place":72},"BigQuery",[69,776,777],{"role":71,"data-label":238,"data-place":84},[26,778,779],{},"bigquery_ops.py",[69,781,782],{"role":71,"data-label":718,"data-place":84},[26,783,766],{},[69,785,769],{"role":71,"data-label":721,"data-place":84},[17,787,788],{},"The same operation on each of them:",[472,790,792],{"className":474,"code":791,"language":476,"meta":477,"style":477},"# duckdb_ops.py\n@_register(\"reorder\")\ndef op_reorder(rel, params, a, ctx):\n    # the listed columns first (in order), then all the others (EXCLUDE the listed ones)\n    order = _require(params, \"columns\")\n    q = \", \".join(_qi(c) for c in order)\n    return rel.query(a, f\"SELECT {q}, * EXCLUDE ({q}) FROM {a}\")\n\n# chdb_ops.py\n@_register(\"reorder\")\ndef op_reorder(sql, params, ctx):\n    # the listed columns first (in order), then the others (EXCEPT the listed ones)\n    order = _require(params, \"columns\")\n    cols = \", \".join(_qi(c) for c in order)\n    return f\"SELECT {cols}, * EXCEPT ({cols}) FROM {_sub(sql)}\"\n\n# bigquery_ops.py\n@_register(\"reorder\")\ndef op_reorder(sql, params, ctx):\n    order = _require(params, \"columns\")\n    cols = \", \".join(ctx.qi(c) for c in order)\n    return f\"SELECT {cols}, * EXCEPT ({cols}) FROM {_sub(sql)}\"\n",[26,793,794,799,810,819,824,836,861,907,914,920,931,941,947,960,980,1018,1023,1029,1040,1049,1062,1082],{"__ignoreMap":477},[481,795,796],{"class":483,"line":484},[481,797,798],{"class":525},"# duckdb_ops.py\n",[481,800,801,804,806,808],{"class":483,"line":502},[481,802,803],{"class":487},"@_register",[481,805,492],{"class":491},[481,807,496],{"class":495},[481,809,499],{"class":491},[481,811,812,814,816],{"class":483,"line":522},[481,813,506],{"class":505},[481,815,509],{"class":487},[481,817,818],{"class":491},"(rel, params, a, ctx):\n",[481,820,821],{"class":483,"line":529},[481,822,823],{"class":525},"    # the listed columns first (in order), then all the others (EXCLUDE the listed ones)\n",[481,825,826,828,830,832,834],{"class":483,"line":535},[481,827,538],{"class":491},[481,829,541],{"class":505},[481,831,544],{"class":491},[481,833,547],{"class":495},[481,835,499],{"class":491},[481,837,838,841,843,846,849,852,855,858],{"class":483,"line":552},[481,839,840],{"class":491},"    q ",[481,842,541],{"class":505},[481,844,845],{"class":495}," \", \"",[481,847,848],{"class":491},".join(_qi(c) ",[481,850,851],{"class":505},"for",[481,853,854],{"class":491}," c ",[481,856,857],{"class":505},"in",[481,859,860],{"class":491}," order)\n",[481,862,864,866,869,872,875,878,881,884,887,889,891,893,896,898,900,902,905],{"class":483,"line":863},7,[481,865,555],{"class":505},[481,867,868],{"class":491}," rel.query(a, ",[481,870,871],{"class":505},"f",[481,873,874],{"class":495},"\"SELECT ",[481,876,877],{"class":505},"{",[481,879,880],{"class":491},"q",[481,882,883],{"class":505},"}",[481,885,886],{"class":495},", * EXCLUDE (",[481,888,877],{"class":505},[481,890,880],{"class":491},[481,892,883],{"class":505},[481,894,895],{"class":495},") FROM ",[481,897,877],{"class":505},[481,899,86],{"class":491},[481,901,883],{"class":505},[481,903,904],{"class":495},"\"",[481,906,499],{"class":491},[481,908,910],{"class":483,"line":909},8,[481,911,913],{"emptyLinePlaceholder":912},true,"\n",[481,915,917],{"class":483,"line":916},9,[481,918,919],{"class":525},"# chdb_ops.py\n",[481,921,923,925,927,929],{"class":483,"line":922},10,[481,924,803],{"class":487},[481,926,492],{"class":491},[481,928,496],{"class":495},[481,930,499],{"class":491},[481,932,934,936,938],{"class":483,"line":933},11,[481,935,506],{"class":505},[481,937,509],{"class":487},[481,939,940],{"class":491},"(sql, params, ctx):\n",[481,942,944],{"class":483,"line":943},12,[481,945,946],{"class":525},"    # the listed columns first (in order), then the others (EXCEPT the listed ones)\n",[481,948,950,952,954,956,958],{"class":483,"line":949},13,[481,951,538],{"class":491},[481,953,541],{"class":505},[481,955,544],{"class":491},[481,957,547],{"class":495},[481,959,499],{"class":491},[481,961,963,966,968,970,972,974,976,978],{"class":483,"line":962},14,[481,964,965],{"class":491},"    cols ",[481,967,541],{"class":505},[481,969,845],{"class":495},[481,971,848],{"class":491},[481,973,851],{"class":505},[481,975,854],{"class":491},[481,977,857],{"class":505},[481,979,860],{"class":491},[481,981,983,985,988,990,992,995,997,1000,1002,1004,1006,1008,1010,1013,1015],{"class":483,"line":982},15,[481,984,555],{"class":505},[481,986,987],{"class":505}," f",[481,989,874],{"class":495},[481,991,877],{"class":505},[481,993,994],{"class":491},"cols",[481,996,883],{"class":505},[481,998,999],{"class":495},", * EXCEPT (",[481,1001,877],{"class":505},[481,1003,994],{"class":491},[481,1005,883],{"class":505},[481,1007,895],{"class":495},[481,1009,877],{"class":505},[481,1011,1012],{"class":491},"_sub(sql)",[481,1014,883],{"class":505},[481,1016,1017],{"class":495},"\"\n",[481,1019,1021],{"class":483,"line":1020},16,[481,1022,913],{"emptyLinePlaceholder":912},[481,1024,1026],{"class":483,"line":1025},17,[481,1027,1028],{"class":525},"# bigquery_ops.py\n",[481,1030,1032,1034,1036,1038],{"class":483,"line":1031},18,[481,1033,803],{"class":487},[481,1035,492],{"class":491},[481,1037,496],{"class":495},[481,1039,499],{"class":491},[481,1041,1043,1045,1047],{"class":483,"line":1042},19,[481,1044,506],{"class":505},[481,1046,509],{"class":487},[481,1048,940],{"class":491},[481,1050,1052,1054,1056,1058,1060],{"class":483,"line":1051},20,[481,1053,538],{"class":491},[481,1055,541],{"class":505},[481,1057,544],{"class":491},[481,1059,547],{"class":495},[481,1061,499],{"class":491},[481,1063,1065,1067,1069,1071,1074,1076,1078,1080],{"class":483,"line":1064},21,[481,1066,965],{"class":491},[481,1068,541],{"class":505},[481,1070,845],{"class":495},[481,1072,1073],{"class":491},".join(ctx.qi(c) ",[481,1075,851],{"class":505},[481,1077,854],{"class":491},[481,1079,857],{"class":505},[481,1081,860],{"class":491},[481,1083,1085,1087,1089,1091,1093,1095,1097,1099,1101,1103,1105,1107,1109,1111,1113],{"class":483,"line":1084},22,[481,1086,555],{"class":505},[481,1088,987],{"class":505},[481,1090,874],{"class":495},[481,1092,877],{"class":505},[481,1094,994],{"class":491},[481,1096,883],{"class":505},[481,1098,999],{"class":495},[481,1100,877],{"class":505},[481,1102,994],{"class":491},[481,1104,883],{"class":505},[481,1106,895],{"class":495},[481,1108,877],{"class":505},[481,1110,1012],{"class":491},[481,1112,883],{"class":505},[481,1114,1017],{"class":495},[17,1116,1117,1118,214,1121,1124,1125,1128],{},"Always quote names with the engine's ",[26,1119,1120],{},"_qi",[26,1122,1123],{},"ctx.qi"," on BigQuery) and write literals with\n",[26,1126,1127],{},"_lit",": column names with spaces, quotes and accents are part of the test data.",[17,1130,1131,1134,1135,1138,1139,1142,1143,1146,1147,1149],{},[26,1132,1133],{},"backend\u002Ftests\u002Ftest_engine_registries.py"," compares the names in the four registries and\nfails when one engine lacks an operation the others have. Without it, a missing operation\nwould only show when someone runs a flow with it: DuckDB refuses it with \"operation 'x' is\nnot supported by the DuckDB engine yet\". ",[26,1136,1137],{},"foreach"," is the one operation that exists on\nPolars and DuckDB only; the test keeps it in an explicit list of exceptions (",[26,1140,1141],{},"EXCEPTIONS","),\nwhich must agree with ",[86,1144,136],{"href":1145},"\u002Fdocs\u002Fengines\u002Fengine-differences#operation-coverage",".\nA new exception goes in both places. If your node cannot be\nwritten on an engine, say so there and refuse it with a sentence that names another engine,\nas ",[26,1148,36],{}," does for the median on BigQuery.",[17,1151,1152,1153,156,1156,1159,1160,1163],{},"If your node writes SQL that changes what a step gives under the same parameters (a fix to\nan existing operation, rather than a new one), the step cache must not reuse old copies.\nThe cache's keys carry the release of the app, which handles releases; inside a release\nonly ",[26,1154,1155],{},"_FINGERPRINT_NAME",[26,1157,1158],{},"backend\u002Fapp\u002Fengine\u002Fcache.py"," moves the ClickHouse copies on\n(",[26,1161,1162],{},"\"clickhouse\": \"clickhouse.2\"","). A brand-new operation does not need it.",[17,1165,1166,1167,156,1170,1173,1174,1177,1178,1181,1182,156,1185,1188],{},"Two optional lists let the editor skip work, and leaving your node out of them is always\nsafe, only slower: ",[26,1168,1169],{},"PRESERVING",[26,1171,1172],{},"backend\u002Fapp\u002Fengine\u002Frowcount.py"," (operations that keep\nevery row, so the row count of the step before is reused) and ",[26,1175,1176],{},"KEEPS_VALUES"," in\n",[26,1179,1180],{},"backend\u002Fapp\u002Fengine\u002Fprofile.py"," (operations after which the parquet footer's statistics\nstill describe the column). Add your node only if it really keeps every row, or every\nvalue. ",[26,1183,1184],{},"_SCAN_HEAVY",[26,1186,1187],{},"backend\u002Fapp\u002Fengine\u002Fclickhouse_engine.py"," is for operations that\nread the whole table on ClickHouse (it raises the thread count for them).",[1190,1191,1193],"h4",{"id":1192},"the-standard-of-correctness-equal-across-engines","The standard of correctness, equal across engines",[17,1195,1196,1197,1200,1201,1204,1205,1208,1209,1211,1212,1214,1215,1218,1219,1222,1223,33,1226,409,1229,1232],{},"A node is not done when it runs on each engine: it is done when it gives the ",[21,1198,1199],{},"same\nrows, columns and types"," on each. The semantics are those of SQL, listed in\n",[86,1202,136],{"href":1203},"\u002Fdocs\u002Fengines\u002Fengine-differences#what-is-guaranteed-identical",": a\ncomparison with ",[26,1206,1207],{},"NULL"," is false, aggregates ignore nulls, sorting puts nulls last, a failed\ncast is ",[26,1210,1207],{},", a ",[26,1213,1207],{}," join key never matches, a datetime without zone is UTC. The\nmodule docstring of ",[26,1216,1217],{},"backend\u002Ftests\u002Ftest_data_correctness.py"," has the full list. When your\nnode has a place where the engines would naturally differ, write the helper once, in\n",[26,1220,1221],{},"operations.py",", and import it from the other registries, as ",[26,1224,1225],{},"sample_threshold",[26,1227,1228],{},"sort_keys",[26,1230,1231],{},"pivot_params"," are.",[220,1234,1236],{"id":1235},"step-5-the-tests-of-the-engine","Step 5. The tests of the engine",[17,1238,1239],{},"Three files, each answering a different question.",[17,1241,1242,1245,1246,1248,1249,1252,1253,1256,1257,1260,1261,1264],{},[21,1243,1244],{},"Do all the engines agree, with data that is hard?"," Add a test to\n",[26,1247,1217],{},". Each case states the expected rows computed by\nhand (not by running the code) on the dataset ",[26,1250,1251],{},"ORDERS",", which has nulls, empty strings,\napostrophes, accents, spaces in column names and integers past 2^53. The test is\nparametrised on ",[26,1254,1255],{},"ENGINES",", so one function proves Polars, DuckDB, chDB, the external\nClickHouse (when ",[26,1258,1259],{},"CLICKHOUSE_TEST_HOST"," is set, which CI does) and BigQuery (only with\n",[26,1262,1263],{},"BIGQUERY_LIVE=1",", never in CI):",[472,1266,1268],{"className":474,"code":1267,"language":476,"meta":477,"style":477},"@pytest.mark.parametrize(\"name\", ENGINES)\ndef test_select_reorder_drop_rename_with_hard_names(storage, orders, name):\n    res = run(name, storage, orders, [{\"type\": \"select\", \"params\": {\"columns\": [\"Ragione Sociale\", \"id\"]}}])\n    assert [c.name for c in res.columns] == [\"Ragione Sociale\", \"id\"] and res.row_count == 8\n    res = run(name, storage, orders, [{\"type\": \"reorder\", \"params\": {\"columns\": [\"note\", \"id\", \"cliente\"]}}])\n    assert [c.name for c in res.columns][:3] == [\"note\", \"id\", \"cliente\"] and len(res.columns) == 15\n",[26,1269,1270,1286,1296,1339,1382,1420],{"__ignoreMap":477},[481,1271,1272,1275,1277,1280,1282,1284],{"class":483,"line":484},[481,1273,1274],{"class":487},"@pytest.mark.parametrize",[481,1276,492],{"class":491},[481,1278,1279],{"class":495},"\"name\"",[481,1281,29],{"class":491},[481,1283,1255],{"class":515},[481,1285,499],{"class":491},[481,1287,1288,1290,1293],{"class":483,"line":502},[481,1289,506],{"class":505},[481,1291,1292],{"class":487}," test_select_reorder_drop_rename_with_hard_names",[481,1294,1295],{"class":491},"(storage, orders, name):\n",[481,1297,1298,1301,1303,1306,1309,1312,1315,1317,1320,1323,1325,1328,1331,1333,1336],{"class":483,"line":522},[481,1299,1300],{"class":491},"    res ",[481,1302,541],{"class":505},[481,1304,1305],{"class":491}," run(name, storage, orders, [{",[481,1307,1308],{"class":495},"\"type\"",[481,1310,1311],{"class":491},": ",[481,1313,1314],{"class":495},"\"select\"",[481,1316,29],{"class":491},[481,1318,1319],{"class":495},"\"params\"",[481,1321,1322],{"class":491},": {",[481,1324,547],{"class":495},[481,1326,1327],{"class":491},": [",[481,1329,1330],{"class":495},"\"Ragione Sociale\"",[481,1332,29],{"class":491},[481,1334,1335],{"class":495},"\"id\"",[481,1337,1338],{"class":491},"]}}])\n",[481,1340,1341,1344,1347,1349,1351,1353,1356,1359,1362,1364,1366,1368,1371,1374,1377,1379],{"class":483,"line":529},[481,1342,1343],{"class":505},"    assert",[481,1345,1346],{"class":491}," [c.name ",[481,1348,851],{"class":505},[481,1350,854],{"class":491},[481,1352,857],{"class":505},[481,1354,1355],{"class":491}," res.columns] ",[481,1357,1358],{"class":505},"==",[481,1360,1361],{"class":491}," [",[481,1363,1330],{"class":495},[481,1365,29],{"class":491},[481,1367,1335],{"class":495},[481,1369,1370],{"class":491},"] ",[481,1372,1373],{"class":505},"and",[481,1375,1376],{"class":491}," res.row_count ",[481,1378,1358],{"class":505},[481,1380,1381],{"class":515}," 8\n",[481,1383,1384,1386,1388,1390,1392,1394,1396,1398,1400,1402,1404,1406,1409,1411,1413,1415,1418],{"class":483,"line":535},[481,1385,1300],{"class":491},[481,1387,541],{"class":505},[481,1389,1305],{"class":491},[481,1391,1308],{"class":495},[481,1393,1311],{"class":491},[481,1395,496],{"class":495},[481,1397,29],{"class":491},[481,1399,1319],{"class":495},[481,1401,1322],{"class":491},[481,1403,547],{"class":495},[481,1405,1327],{"class":491},[481,1407,1408],{"class":495},"\"note\"",[481,1410,29],{"class":491},[481,1412,1335],{"class":495},[481,1414,29],{"class":491},[481,1416,1417],{"class":495},"\"cliente\"",[481,1419,1338],{"class":491},[481,1421,1422,1424,1426,1428,1430,1432,1435,1437,1439,1441,1443,1445,1447,1449,1451,1453,1455,1457,1460,1463,1465],{"class":483,"line":552},[481,1423,1343],{"class":505},[481,1425,1346],{"class":491},[481,1427,851],{"class":505},[481,1429,854],{"class":491},[481,1431,857],{"class":505},[481,1433,1434],{"class":491}," res.columns][:",[481,1436,272],{"class":515},[481,1438,1370],{"class":491},[481,1440,1358],{"class":505},[481,1442,1361],{"class":491},[481,1444,1408],{"class":495},[481,1446,29],{"class":491},[481,1448,1335],{"class":495},[481,1450,29],{"class":491},[481,1452,1417],{"class":495},[481,1454,1370],{"class":491},[481,1456,1373],{"class":505},[481,1458,1459],{"class":515}," len",[481,1461,1462],{"class":491},"(res.columns) ",[481,1464,1358],{"class":505},[481,1466,1467],{"class":515}," 15\n",[17,1469,1470,1473,1474,156,1477,1480],{},[26,1471,1472],{},"check(name, storage, orders, ops, expected_rows)"," compares the result with a list of\nexpected rows. For a node that reshapes the table (changes the columns' names or types),\nalso add cases to ",[26,1475,1476],{},"CASES",[26,1478,1479],{},"backend\u002Ftests\u002Ftest_reshape_parity.py",", which compares every\nother engine with Polars.",[17,1482,1483,1486,1487,1490],{},[21,1484,1485],{},"Is the BigQuery SQL what we meant?"," BigQuery cannot run in CI. ",[26,1488,1489],{},"backend\u002Ftests\u002Ftest_bigquery_ops.py","\nchecks the generated SQL string against a fake context:",[472,1492,1494],{"className":474,"code":1493,"language":476,"meta":477,"style":477},"def test_column_ops_use_except_replace():\n    assert op(\"select\", {\"columns\": [\"id\", \"nome\"]}) == \"SELECT `id`, `nome` FROM (SELECT * FROM `_src1`)\"\n    assert op(\"reorder\", {\"columns\": [\"nome\"]}).startswith(\"SELECT `nome`, * EXCEPT (`nome`) FROM\")\n",[26,1495,1496,1506,1537],{"__ignoreMap":477},[481,1497,1498,1500,1503],{"class":483,"line":484},[481,1499,506],{"class":505},[481,1501,1502],{"class":487}," test_column_ops_use_except_replace",[481,1504,1505],{"class":491},"():\n",[481,1507,1508,1510,1513,1515,1518,1520,1522,1524,1526,1529,1532,1534],{"class":483,"line":502},[481,1509,1343],{"class":505},[481,1511,1512],{"class":491}," op(",[481,1514,1314],{"class":495},[481,1516,1517],{"class":491},", {",[481,1519,547],{"class":495},[481,1521,1327],{"class":491},[481,1523,1335],{"class":495},[481,1525,29],{"class":491},[481,1527,1528],{"class":495},"\"nome\"",[481,1530,1531],{"class":491},"]}) ",[481,1533,1358],{"class":505},[481,1535,1536],{"class":495}," \"SELECT `id`, `nome` FROM (SELECT * FROM `_src1`)\"\n",[481,1538,1539,1541,1543,1545,1547,1549,1551,1553,1556,1559],{"class":483,"line":522},[481,1540,1343],{"class":505},[481,1542,1512],{"class":491},[481,1544,496],{"class":495},[481,1546,1517],{"class":491},[481,1548,547],{"class":495},[481,1550,1327],{"class":491},[481,1552,1528],{"class":495},[481,1554,1555],{"class":491},"]}).startswith(",[481,1557,1558],{"class":495},"\"SELECT `nome`, * EXCEPT (`nome`) FROM\"",[481,1560,499],{"class":491},[17,1562,1563,1566,1567,1569],{},[21,1564,1565],{},"Does one operation behave on its own?"," ",[26,1568,306],{}," (Polars only).",[1190,1571,1573],{"id":1572},"running-the-engines-tests","Running the engine's tests",[17,1575,1576,1577,1580],{},"CI builds the development image and runs every test of ",[26,1578,1579],{},"backend\u002Ftests"," inside it, beside\nreal servers. The same script runs on a laptop:",[472,1582,1586],{"className":1583,"code":1584,"language":1585,"meta":477,"style":477},"language-bash shiki shiki-themes github-dark-dimmed github-light-high-contrast","docker build --build-arg WITH_DEV=true --build-arg WITH_CHDB=true -t tabularia-backend:ci backend\n.github\u002Fscripts\u002Fci_tests.sh engine tabularia-backend:ci\n","bash",[26,1587,1588,1621],{"__ignoreMap":477},[481,1589,1590,1593,1596,1599,1602,1605,1607,1610,1612,1615,1618],{"class":483,"line":484},[481,1591,1592],{"class":686},"docker",[481,1594,1595],{"class":495}," build",[481,1597,1598],{"class":515}," --build-arg",[481,1600,1601],{"class":495}," WITH_DEV=",[481,1603,1604],{"class":515},"true",[481,1606,1598],{"class":515},[481,1608,1609],{"class":495}," WITH_CHDB=",[481,1611,1604],{"class":515},[481,1613,1614],{"class":515}," -t",[481,1616,1617],{"class":495}," tabularia-backend:ci",[481,1619,1620],{"class":495}," backend\n",[481,1622,1623,1626,1629],{"class":483,"line":502},[481,1624,1625],{"class":686},".github\u002Fscripts\u002Fci_tests.sh",[481,1627,1628],{"class":495}," engine",[481,1630,1631],{"class":495}," tabularia-backend:ci\n",[17,1633,1634,1635,29,1638,29,1641,29,1644,1647,1648,1651],{},"The script fails for any skipped test whose reason is not one of the four it allows\n(",[26,1636,1637],{},"BIGQUERY_LIVE",[26,1639,1640],{},"ORACLE_TEST_HOST",[26,1642,1643],{},"SQLSERVER_TEST_HOST",[26,1645,1646],{},"mssql_python","): a test of\nyours that skips because a server is missing breaks the run (",[26,1649,1650],{},".github\u002Fscripts\u002Fci_skips.py",").",[17,1653,1654],{},"The script always runs the whole suite. To iterate on one file, run the same image\nwithout the servers (the tests that need them skip, which is fine locally; this is not a\ncommand of the repository, only what the script does with fewer parts):",[472,1656,1658],{"className":1583,"code":1657,"language":1585,"meta":477,"style":477},"docker run --rm -v \"$PWD\u002Fbackend:\u002Fapp\" -w \u002Fapp tabularia-backend:ci \\\n  python -m pytest tests\u002Ftest_operations.py -q -p no:cacheprovider -k reorder\n",[26,1659,1660,1693],{"__ignoreMap":477},[481,1661,1662,1664,1667,1670,1673,1676,1679,1682,1685,1688,1690],{"class":483,"line":484},[481,1663,1592],{"class":686},[481,1665,1666],{"class":495}," run",[481,1668,1669],{"class":515}," --rm",[481,1671,1672],{"class":515}," -v",[481,1674,1675],{"class":495}," \"",[481,1677,1678],{"class":491},"$PWD",[481,1680,1681],{"class":495},"\u002Fbackend:\u002Fapp\"",[481,1683,1684],{"class":515}," -w",[481,1686,1687],{"class":495}," \u002Fapp",[481,1689,1617],{"class":495},[481,1691,1692],{"class":505}," \\\n",[481,1694,1695,1698,1701,1704,1707,1710,1713,1716,1719],{"class":483,"line":502},[481,1696,1697],{"class":495},"  python",[481,1699,1700],{"class":515}," -m",[481,1702,1703],{"class":495}," pytest",[481,1705,1706],{"class":495}," tests\u002Ftest_operations.py",[481,1708,1709],{"class":515}," -q",[481,1711,1712],{"class":515}," -p",[481,1714,1715],{"class":495}," no:cacheprovider",[481,1717,1718],{"class":515}," -k",[481,1720,1721],{"class":495}," reorder\n",[17,1723,1724],{},"Always run the full script once before you push: the external ClickHouse in CI is the\nversion 24.8 server, and the dialect of newer ones is not the same.",[220,1726,1728],{"id":1727},"step-6-the-dbt-export","Step 6. The dbt export",[17,1730,1731,1732,1735,1736,1739,1740,1743],{},"Every operation is either ",[21,1733,1734],{},"exportable"," to dbt (its SQL is written by the exporter) or\n",[21,1737,1738],{},"refused"," with the code ",[26,1741,1742],{},"op_not_exportable",". Decide, and say which in the pull request.",[17,1745,1746,1750,1751,156,1754,1756],{},[1747,1748,1749],"em",{},"Refused",": write nothing. ",[26,1752,1753],{},"_compile_op",[26,1755,325],{}," ends with",[472,1758,1760],{"className":474,"code":1759,"language":476,"meta":477,"style":477},"    raise DbtExportError(f\"operation '{op_type}' cannot be exported to dbt\", \"op_not_exportable\", op=op_type)\n",[26,1761,1762],{"__ignoreMap":477},[481,1763,1764,1767,1770,1772,1775,1777,1780,1782,1785,1787,1790,1792,1795,1797],{"class":483,"line":484},[481,1765,1766],{"class":505},"    raise",[481,1768,1769],{"class":491}," DbtExportError(",[481,1771,871],{"class":505},[481,1773,1774],{"class":495},"\"operation '",[481,1776,877],{"class":505},[481,1778,1779],{"class":491},"op_type",[481,1781,883],{"class":505},[481,1783,1784],{"class":495},"' cannot be exported to dbt\"",[481,1786,29],{"class":491},[481,1788,1789],{"class":495},"\"op_not_exportable\"",[481,1791,29],{"class":491},[481,1793,1794],{"class":686},"op",[481,1796,541],{"class":505},[481,1798,1799],{"class":491},"op_type)\n",[17,1801,1802,1803,156,1806,1808,1809,181],{},"and the message exists in the five languages already. Add a test beside\n",[26,1804,1805],{},"test_a_statistics_step_is_not_exported",[26,1807,328],{},", and one\nline to the limits in ",[26,1810,1811],{},"docs\u002Fdbt-export.md",[17,1813,1814,1817,1818,1820,1821,1823],{},[1747,1815,1816],{},"Exportable",": add a branch in ",[26,1819,1753],{},", which returns the new reference and the\nschema after the step. ",[26,1822,78],{},"'s branch is:",[472,1825,1827],{"className":474,"code":1826,"language":476,"meta":477,"style":477},"    if op_type == \"reorder\":\n        order = _require(params, \"columns\")\n        new_ones = list(order) + [c for c in cols if c not in set(order)]\n        if _needs_list(model, s, \"reorder\"):\n            return model.add(f\"SELECT {_column_list(new_ones)} FROM {ref}\"), _S(new_ones, types)\n        qs = \", \".join(q(x) for x in order)\n        # with the columns not known, the listed ones are only the first of them\n        after = _S(new_ones, types) if cols else _S([], types, s.others)\n        return model.add(f\"SELECT {qs}, * EXCLUDE ({qs}) FROM {ref}\"), after\n",[26,1828,1829,1845,1858,1902,1915,1949,1970,1975,1995],{"__ignoreMap":477},[481,1830,1831,1834,1837,1839,1842],{"class":483,"line":484},[481,1832,1833],{"class":505},"    if",[481,1835,1836],{"class":491}," op_type ",[481,1838,1358],{"class":505},[481,1840,1841],{"class":495}," \"reorder\"",[481,1843,1844],{"class":491},":\n",[481,1846,1847,1850,1852,1854,1856],{"class":483,"line":502},[481,1848,1849],{"class":491},"        order ",[481,1851,541],{"class":505},[481,1853,544],{"class":491},[481,1855,547],{"class":495},[481,1857,499],{"class":491},[481,1859,1860,1863,1865,1868,1871,1874,1877,1879,1881,1883,1886,1888,1890,1893,1896,1899],{"class":483,"line":522},[481,1861,1862],{"class":491},"        new_ones ",[481,1864,541],{"class":505},[481,1866,1867],{"class":515}," list",[481,1869,1870],{"class":491},"(order) ",[481,1872,1873],{"class":505},"+",[481,1875,1876],{"class":491}," [c ",[481,1878,851],{"class":505},[481,1880,854],{"class":491},[481,1882,857],{"class":505},[481,1884,1885],{"class":491}," cols ",[481,1887,659],{"class":505},[481,1889,854],{"class":491},[481,1891,1892],{"class":505},"not",[481,1894,1895],{"class":505}," in",[481,1897,1898],{"class":515}," set",[481,1900,1901],{"class":491},"(order)]\n",[481,1903,1904,1907,1910,1912],{"class":483,"line":529},[481,1905,1906],{"class":505},"        if",[481,1908,1909],{"class":491}," _needs_list(model, s, ",[481,1911,496],{"class":495},[481,1913,1914],{"class":491},"):\n",[481,1916,1917,1920,1923,1925,1927,1929,1932,1934,1937,1939,1942,1944,1946],{"class":483,"line":535},[481,1918,1919],{"class":505},"            return",[481,1921,1922],{"class":491}," model.add(",[481,1924,871],{"class":505},[481,1926,874],{"class":495},[481,1928,877],{"class":505},[481,1930,1931],{"class":491},"_column_list(new_ones)",[481,1933,883],{"class":505},[481,1935,1936],{"class":495}," FROM ",[481,1938,877],{"class":505},[481,1940,1941],{"class":491},"ref",[481,1943,883],{"class":505},[481,1945,904],{"class":495},[481,1947,1948],{"class":491},"), _S(new_ones, types)\n",[481,1950,1951,1954,1956,1958,1961,1963,1966,1968],{"class":483,"line":552},[481,1952,1953],{"class":491},"        qs ",[481,1955,541],{"class":505},[481,1957,845],{"class":495},[481,1959,1960],{"class":491},".join(q(x) ",[481,1962,851],{"class":505},[481,1964,1965],{"class":491}," x ",[481,1967,857],{"class":505},[481,1969,860],{"class":491},[481,1971,1972],{"class":483,"line":863},[481,1973,1974],{"class":525},"        # with the columns not known, the listed ones are only the first of them\n",[481,1976,1977,1980,1982,1985,1987,1989,1992],{"class":483,"line":909},[481,1978,1979],{"class":491},"        after ",[481,1981,541],{"class":505},[481,1983,1984],{"class":491}," _S(new_ones, types) ",[481,1986,659],{"class":505},[481,1988,1885],{"class":491},[481,1990,1991],{"class":505},"else",[481,1993,1994],{"class":491}," _S([], types, s.others)\n",[481,1996,1997,2000,2002,2004,2006,2008,2011,2013,2015,2017,2019,2021,2023,2025,2027,2029,2031],{"class":483,"line":916},[481,1998,1999],{"class":505},"        return",[481,2001,1922],{"class":491},[481,2003,871],{"class":505},[481,2005,874],{"class":495},[481,2007,877],{"class":505},[481,2009,2010],{"class":491},"qs",[481,2012,883],{"class":505},[481,2014,886],{"class":495},[481,2016,877],{"class":505},[481,2018,2010],{"class":491},[481,2020,883],{"class":505},[481,2022,895],{"class":495},[481,2024,877],{"class":505},[481,2026,1941],{"class":491},[481,2028,883],{"class":505},[481,2030,904],{"class":495},[481,2032,2033],{"class":491},"), after\n",[17,2035,2036,2037,2040,2041,2044,2045,2048,2049,2052,2053,2056,2057,2060,2061,1651],{},"Then, in the same file: the step's name and its sentence for the generated model\n(the ",[26,2038,2039],{},"simple"," dictionary: ",[26,2042,2043],{},"\"reorder\": (\"reorder_columns\", lambda: f\"put first ...\")","),\nthe order a following ",[26,2046,2047],{},"first","\u002F",[26,2050,2051],{},"last"," must respect (",[26,2054,2055],{},"_order_after",": does your step keep\nthe order of the rows?) and, in ",[26,2058,2059],{},"_wrong_shape",", the shape check of the parameters\n(",[26,2062,2063],{},"\"reorder\": lambda: list_of(p.get(\"columns\"), str)",[17,2065,2066,2067,1177,2070,2073,2074,2076,2077,156,2080,2083,2084,156,2087,2090],{},"If your node has parameters it cannot work without, add them to ",[26,2068,2069],{},"required",[26,2071,2072],{},"gateway-go\u002Finternal\u002Fdbtexport\u002Fpayload.go"," (the ",[26,2075,2069],{}," map) so an incomplete step is\nrefused before anything is sent. The Python gateway keeps the same table\n(",[26,2078,2079],{},"_REQUIRED",[26,2081,2082],{},"gateway\u002Fapp\u002Fservices\u002Fdbt_export.py","); it is frozen, and\n",[26,2085,2086],{},"TestRequiredAsPython",[26,2088,2089],{},"gateway-go\u002Finternal\u002Fdbtexport\u002Frequired_test.go"," reads it as text\nand fails if the two tables differ. A new step with required parameters therefore makes it\nfail while the Python gateway stays frozen: say so in the pull request, and the test is\nadapted then (an explicit list of Go-only steps).",[17,2092,2093,2094,156,2097,2099,2100,409,2103,2106,2107,2110,2111,2114],{},"Tests: add your step to the parametrised list that precedes\n",[26,2095,2096],{},"test_every_steps_federated_sql_really_runs_in_duckdb",[26,2098,328],{},"\n(the SQL really runs in DuckDB), and a case that goes through ",[26,2101,2102],{},"_parity",[26,2104,2105],{},"_equal"," (the\nexported model gives the rows the Polars and DuckDB engines give; see\n",[26,2108,2109],{},"test_a_compute_after_a_pivot_replaces_the_column_in_place_or_adds_it","). The end-to-end matrix ",[26,2112,2113],{},"e2e\u002Fdbt_export\u002Fmatrix.py"," (a real dbt and a real\nClickHouse) is not part of CI: add a case to it if you can run a whole stack, and say\nwhether you did.",[472,2116,2118],{"className":1583,"code":2117,"language":1585,"meta":477,"style":477},".github\u002Fscripts\u002Fci_tests.sh engine tabularia-backend:ci   # test_dbt_export.py is in it\n",[26,2119,2120],{"__ignoreMap":477},[481,2121,2122,2124,2126,2128],{"class":483,"line":484},[481,2123,1625],{"class":686},[481,2125,1628],{"class":495},[481,2127,1617],{"class":495},[481,2129,2130],{"class":525},"   # test_dbt_export.py is in it\n",[17,2132,2133,2134,2137,2138,2141,2142,2145],{},"A new error code of the exporter (a new ",[26,2135,2136],{},"DbtExportError"," code) needs its message in the\nfive languages in ",[26,2139,2140],{},"gateway\u002Fapp\u002Fservices\u002Fdbt_messages.py","; the Go gateway holds\nthe same messages in ",[26,2143,2144],{},"gateway-go\u002Finternal\u002Fdbtexport\u002Fmessages_gen.go",". There is no generator\nin the repository: the Go file is edited by hand and its header says so. Change both files\nin the same commit.",[220,2147,2149],{"id":2148},"step-7-the-go-gateway","Step 7. The Go gateway",[17,2151,2152],{},"The Go gateway does not validate a flow's operations when the flow is saved: the flow is\nstored as JSON and the engine refuses what it does not know when it runs. Two places in Go\nname the operations, and one of them you must touch.",[2154,2155,2156,2206],"ol",{},[147,2157,2158,29,2161,1177,2164,2166,2167,2194,2197,2198,2201,2202,2205],{},[21,2159,2160],{},"The right-click menu's allow-list",[26,2162,2163],{},"transformOps",[26,2165,341],{},", written by hand and in this order:",[472,2168,2172],{"className":2169,"code":2170,"language":2171,"meta":477,"style":477},"language-go shiki shiki-themes github-dark-dimmed github-light-high-contrast","var transformOps = []any{\n    \"select\", \"reorder\", \"drop\", \"rename\", \"cast\", \"compute\", \"sql\", \"filter\", \"sort\", \"limit\",\n    \"unique\", \"sample\", \"fill_null\", \"drop_nulls\", \"group_by\", \"pivot\", \"unpivot\", \"join\", \"union\",\n}\n","go",[26,2173,2174,2179,2184,2189],{"__ignoreMap":477},[481,2175,2176],{"class":483,"line":484},[481,2177,2178],{},"var transformOps = []any{\n",[481,2180,2181],{"class":483,"line":502},[481,2182,2183],{},"    \"select\", \"reorder\", \"drop\", \"rename\", \"cast\", \"compute\", \"sql\", \"filter\", \"sort\", \"limit\",\n",[481,2185,2186],{"class":483,"line":522},[481,2187,2188],{},"    \"unique\", \"sample\", \"fill_null\", \"drop_nulls\", \"group_by\", \"pivot\", \"unpivot\", \"join\", \"union\",\n",[481,2190,2191],{"class":483,"line":529},[481,2192,2193],{},"}\n",[2195,2196],"br",{},"Add your name. Without it, ",[26,2199,2200],{},"PUT \u002Fusers\u002Fme\u002Fflow-shortcuts"," refuses your node (a\n",[26,2203,2204],{},"literal_error",") when a person tries to put it in their menu.",[147,2207,2208,156,2210,2212],{},[26,2209,2069],{},[26,2211,2072],{},": step 6.",[17,2214,2215],{},"The interface test of step 10 reads this list and fails when it differs from the\ninterface's list, so the two cannot drift. Test and check:",[472,2217,2219],{"className":1583,"code":2218,"language":1585,"meta":477,"style":477},"cd gateway-go && go test .\u002Finternal\u002F...\n",[26,2220,2221],{"__ignoreMap":477},[481,2222,2223,2226,2229,2232,2234,2237],{"class":483,"line":484},[481,2224,2225],{"class":515},"cd",[481,2227,2228],{"class":495}," gateway-go",[481,2230,2231],{"class":491}," && ",[481,2233,2171],{"class":686},[481,2235,2236],{"class":495}," test",[481,2238,2239],{"class":495}," .\u002Finternal\u002F...\n",[17,2241,2242,2243,2246,2247,2250,2251,29,2254,2257,2258,2261,2262,2264,2265,2268],{},"CI runs more than that: ",[26,2244,2245],{},"gateway-go\u002Fscripts\u002Ftest.sh"," starts a PostgreSQL, creates the\nschema with the gateway image's migrations, then runs ",[26,2248,2249],{},"gofmt -l ."," (the run fails if a\nfile is listed), ",[26,2252,2253],{},"go vet .\u002F...",[26,2255,2256],{},"go test -count=1 .\u002F...",", and the same for ",[26,2259,2260],{},"dataapi\u002F",".\nRun ",[26,2263,2249],{}," yourself; ",[26,2266,2267],{},"go test"," alone does not catch formatting.",[220,2270,2272],{"id":2271},"step-8-the-editor-the-form-the-icon-the-summary","Step 8. The editor: the form, the icon, the summary",[17,2274,2275,2276,181],{},"Three files in ",[26,2277,2278],{},"frontend\u002Fcomposables\u002F",[17,2280,2281,2290,2291,2294,2295,2298,2299,470],{},[21,2282,2283,2284,29,2287,181],{},"The form: ",[26,2285,2286],{},"useFlowModel.ts",[26,2288,2289],{},"OP_SPECS"," One entry per operation, a list of fields; each\nfield has a ",[26,2292,2293],{},"key"," (the parameter's name in the engine), a ",[26,2296,2297],{},"label"," (a word of step 9) and a\n",[26,2300,2301],{},"control",[472,2303,2307],{"className":2304,"code":2305,"language":2306,"meta":477,"style":477},"language-ts shiki shiki-themes github-dark-dimmed github-light-high-contrast","  reorder: [{ key: 'columns', label: 'params.reorder_columns', control: 'reorder' }],\n  limit: [{ key: 'n', label: 'params.limit_n', control: 'number' }],\n  unique: [{ key: 'subset', label: 'params.unique_subset', control: 'columns', optional: true }],\n","ts",[26,2308,2309,2335,2357],{"__ignoreMap":477},[481,2310,2311,2314,2317,2320,2323,2326,2329,2332],{"class":483,"line":484},[481,2312,2313],{"class":686},"  reorder",[481,2315,2316],{"class":491},": [{ key: ",[481,2318,2319],{"class":495},"'columns'",[481,2321,2322],{"class":491},", label: ",[481,2324,2325],{"class":495},"'params.reorder_columns'",[481,2327,2328],{"class":491},", control: ",[481,2330,2331],{"class":495},"'reorder'",[481,2333,2334],{"class":491}," }],\n",[481,2336,2337,2340,2342,2345,2347,2350,2352,2355],{"class":483,"line":502},[481,2338,2339],{"class":686},"  limit",[481,2341,2316],{"class":491},[481,2343,2344],{"class":495},"'n'",[481,2346,2322],{"class":491},[481,2348,2349],{"class":495},"'params.limit_n'",[481,2351,2328],{"class":491},[481,2353,2354],{"class":495},"'number'",[481,2356,2334],{"class":491},[481,2358,2359,2362,2364,2367,2369,2372,2374,2376,2379,2381],{"class":483,"line":522},[481,2360,2361],{"class":686},"  unique",[481,2363,2316],{"class":491},[481,2365,2366],{"class":495},"'subset'",[481,2368,2322],{"class":491},[481,2370,2371],{"class":495},"'params.unique_subset'",[481,2373,2328],{"class":491},[481,2375,2319],{"class":495},[481,2377,2378],{"class":491},", optional: ",[481,2380,1604],{"class":515},[481,2382,2334],{"class":491},[17,2384,2385,2386,1311,2389,29,2392,33,2395,29,2398,29,2401,29,2404,29,2407,29,2410,29,2413,29,2416,29,2419,33,2422,29,2425,29,2428,29,2431,29,2434,29,2437,29,2440,33,2442,29,2445,29,2448,2451,2452,2455,2456,29,2458,2460,2461,2463,2464,2466,2467,2470,2471,2473,2474,2477,2478,2480,2481,2484],{},"The controls that exist are the union of ",[26,2387,2388],{},"FieldSpec['control']",[26,2390,2391],{},"column",[26,2393,2394],{},"columns",[26,2396,2397],{},"operator",[26,2399,2400],{},"func",[26,2402,2403],{},"dtype",[26,2405,2406],{},"how",[26,2408,2409],{},"text",[26,2411,2412],{},"number",[26,2414,2415],{},"boolean",[26,2417,2418],{},"value",[26,2420,2421],{},"castlist",[26,2423,2424],{},"renamelist",[26,2426,2427],{},"filllist",[26,2429,2430],{},"agglist",[26,2432,2433],{},"exprlist",[26,2435,2436],{},"strategy",[26,2438,2439],{},"joinkeys",[26,2441,78],{},[26,2443,2444],{},"sortlist",[26,2446,2447],{},"json",[26,2449,2450],{},"sqltext",". Reuse one if it fits: then ",[26,2453,2454],{},"frontend\u002Fcomponents\u002Fui\u002FParamForm.vue","\nneeds no change (a ",[26,2457,2409],{},[26,2459,2412],{}," or ",[26,2462,2415],{}," field is written under its ",[26,2465,2293],{}," by the\n",[26,2468,2469],{},"default"," branch). A new control means a new member of that union, a branch that fills its\nstate when the form opens and one that writes the parameters back, and a block in the\ntemplate: ",[26,2472,78],{}," is the one to read (",[26,2475,2476],{},"ParamForm.vue",", search ",[26,2479,78],{},"). If the node\nstarts with defaults, add them to ",[26,2482,2483],{},"defaultParams"," in the same file.",[17,2486,2487,2495],{},[21,2488,2489,2490,29,2492,181],{},"The icon and colour: ",[26,2491,362],{},[26,2493,2494],{},"OP_META"," Without an entry the palette shows a\ngear and the operation's id. The colour says the group (blue: columns, orange: rows,\nviolet: nulls, green: combining and reshaping):",[472,2497,2499],{"className":2304,"code":2498,"language":2306,"meta":477,"style":477},"  reorder:    { icon: ArrowLeftRight, label: 'ops.reorder', color: '#4f8cff' },\n",[26,2500,2501],{"__ignoreMap":477},[481,2502,2503,2505,2508,2511,2514,2516,2518,2521,2523,2526,2528,2531],{"class":483,"line":484},[481,2504,2313],{"class":686},[481,2506,2507],{"class":491},":    { ",[481,2509,2510],{"class":686},"icon",[481,2512,2513],{"class":491},": ArrowLeftRight, ",[481,2515,2297],{"class":686},[481,2517,1311],{"class":491},[481,2519,2520],{"class":495},"'ops.reorder'",[481,2522,29],{"class":491},[481,2524,2525],{"class":686},"color",[481,2527,1311],{"class":491},[481,2529,2530],{"class":495},"'#4f8cff'",[481,2532,2533],{"class":491}," },\n",[17,2535,2536,2537,2540],{},"Import the icon from ",[26,2538,2539],{},"lucide-vue-next"," at the top of the file.",[17,2542,2543,1211,2548,156,2551,2554,2555,2558,2559,2562,2563,2566,2567,409,2569,2572],{},[21,2544,2545,2546],{},"The line under the node: ",[26,2547,365],{},[26,2549,2550],{},"case",[26,2552,2553],{},"opSummary"," that returns a short\ntext from the parameters (",[26,2556,2557],{},"case 'limit': return p.n != null ? ...","). ",[26,2560,2561],{},"previewGrid.ts","\n(",[26,2564,2565],{},"consumedColumns",") only matters when your node turns columns into other columns, as\n",[26,2568,36],{},[26,2570,2571],{},"unpivot"," do: the columns it lists are not shown as \"removed\".",[220,2574,2576],{"id":2575},"step-9-the-words-in-five-languages","Step 9. The words, in five languages",[17,2578,2579,2580,2583,2584,29,2587,29,2590,29,2593,409,2596,2599,2600,2603,2604,2607],{},"For a transformation the words are in the ",[21,2581,2582],{},"hand-written"," catalogues\n",[26,2585,2586],{},"frontend\u002Fi18n\u002Flocales\u002Fen.ts",[26,2588,2589],{},"it.ts",[26,2591,2592],{},"de.ts",[26,2594,2595],{},"es.ts",[26,2597,2598],{},"fr.ts",", under ",[26,2601,2602],{},"ops"," (the\nnode's name) and ",[26,2605,2606],{},"params"," (the form's labels). English is the base; the four others must\nhave exactly the same keys:",[472,2609,2611],{"className":2304,"code":2610,"language":2306,"meta":477,"style":477},"  ops: {\n    reorder: 'Reorder columns',            \u002F\u002F en.ts\n    reorder: 'Riordina colonne',           \u002F\u002F it.ts\n    reorder: 'Spalten neu ordnen',         \u002F\u002F de.ts\n  },\n  params: {\n    reorder_columns: 'Drag to reorder',    \u002F\u002F en.ts\n    reorder_columns: 'Trascina per riordinare',   \u002F\u002F it.ts\n  },\n",[26,2612,2613,2621,2637,2652,2667,2672,2679,2694,2708],{"__ignoreMap":477},[481,2614,2615,2618],{"class":483,"line":484},[481,2616,2617],{"class":686},"  ops",[481,2619,2620],{"class":491},": {\n",[481,2622,2623,2626,2628,2631,2634],{"class":483,"line":502},[481,2624,2625],{"class":686},"    reorder",[481,2627,1311],{"class":491},[481,2629,2630],{"class":495},"'Reorder columns'",[481,2632,2633],{"class":491},",            ",[481,2635,2636],{"class":525},"\u002F\u002F en.ts\n",[481,2638,2639,2641,2643,2646,2649],{"class":483,"line":522},[481,2640,2625],{"class":686},[481,2642,1311],{"class":491},[481,2644,2645],{"class":495},"'Riordina colonne'",[481,2647,2648],{"class":491},",           ",[481,2650,2651],{"class":525},"\u002F\u002F it.ts\n",[481,2653,2654,2656,2658,2661,2664],{"class":483,"line":529},[481,2655,2625],{"class":686},[481,2657,1311],{"class":491},[481,2659,2660],{"class":495},"'Spalten neu ordnen'",[481,2662,2663],{"class":491},",         ",[481,2665,2666],{"class":525},"\u002F\u002F de.ts\n",[481,2668,2669],{"class":483,"line":535},[481,2670,2671],{"class":491},"  },\n",[481,2673,2674,2677],{"class":483,"line":552},[481,2675,2676],{"class":686},"  params",[481,2678,2620],{"class":491},[481,2680,2681,2684,2686,2689,2692],{"class":483,"line":863},[481,2682,2683],{"class":686},"    reorder_columns",[481,2685,1311],{"class":491},[481,2687,2688],{"class":495},"'Drag to reorder'",[481,2690,2691],{"class":491},",    ",[481,2693,2636],{"class":525},[481,2695,2696,2698,2700,2703,2706],{"class":483,"line":909},[481,2697,2683],{"class":686},[481,2699,1311],{"class":491},[481,2701,2702],{"class":495},"'Trascina per riordinare'",[481,2704,2705],{"class":491},",   ",[481,2707,2651],{"class":525},[481,2709,2710],{"class":483,"line":916},[481,2711,2671],{"class":491},[17,2713,2714,2715,2718],{},"(Each line goes in its own file, not together.) The files ",[26,2716,2717],{},"*.gen.ts"," beside them hold the\nwords of whole pages (the report designer, the statistics group); their name\nis a leftover of an i18n sweep that no longer exists: there is no generator in the\nrepository and the files are edited by hand, as their header says. A transformation does not need them.",[17,2720,590,2721,2724],{},[26,2722,2723],{},"frontend\u002Ftests\u002Fi18n.test.mjs"," fails when a language lacks a key English has or has\none more, when a message does not compile, and when the code names a key that does not\nexist.",[220,2726,2728],{"id":2727},"step-10-the-interface-tests-and-the-type-check","Step 10. The interface tests and the type check",[17,2730,2731,2733],{},[26,2732,391],{}," has the list of the engine's operations, written\nby hand:",[472,2735,2739],{"className":2736,"code":2737,"language":2738,"meta":477,"style":477},"language-js shiki shiki-themes github-dark-dimmed github-light-high-contrast","const TRANSFORMS = ['cast', 'compute', 'drop', 'drop_nulls', 'fill_null', 'filter', 'foreach', 'group_by', 'join', 'limit',\n  'pivot', 'rename', 'reorder', 'sample', 'select', 'sort', 'sql', 'union', 'unique', 'unpivot']\n","js",[26,2740,2741,2803],{"__ignoreMap":477},[481,2742,2743,2746,2749,2751,2753,2756,2758,2761,2763,2766,2768,2771,2773,2776,2778,2781,2783,2786,2788,2791,2793,2796,2798,2801],{"class":483,"line":484},[481,2744,2745],{"class":505},"const",[481,2747,2748],{"class":515}," TRANSFORMS",[481,2750,628],{"class":505},[481,2752,1361],{"class":491},[481,2754,2755],{"class":495},"'cast'",[481,2757,29],{"class":491},[481,2759,2760],{"class":495},"'compute'",[481,2762,29],{"class":491},[481,2764,2765],{"class":495},"'drop'",[481,2767,29],{"class":491},[481,2769,2770],{"class":495},"'drop_nulls'",[481,2772,29],{"class":491},[481,2774,2775],{"class":495},"'fill_null'",[481,2777,29],{"class":491},[481,2779,2780],{"class":495},"'filter'",[481,2782,29],{"class":491},[481,2784,2785],{"class":495},"'foreach'",[481,2787,29],{"class":491},[481,2789,2790],{"class":495},"'group_by'",[481,2792,29],{"class":491},[481,2794,2795],{"class":495},"'join'",[481,2797,29],{"class":491},[481,2799,2800],{"class":495},"'limit'",[481,2802,33],{"class":491},[481,2804,2805,2808,2810,2813,2815,2817,2819,2822,2824,2827,2829,2832,2834,2837,2839,2842,2844,2847,2849,2852],{"class":483,"line":502},[481,2806,2807],{"class":495},"  'pivot'",[481,2809,29],{"class":491},[481,2811,2812],{"class":495},"'rename'",[481,2814,29],{"class":491},[481,2816,2331],{"class":495},[481,2818,29],{"class":491},[481,2820,2821],{"class":495},"'sample'",[481,2823,29],{"class":491},[481,2825,2826],{"class":495},"'select'",[481,2828,29],{"class":491},[481,2830,2831],{"class":495},"'sort'",[481,2833,29],{"class":491},[481,2835,2836],{"class":495},"'sql'",[481,2838,29],{"class":491},[481,2840,2841],{"class":495},"'union'",[481,2843,29],{"class":491},[481,2845,2846],{"class":495},"'unique'",[481,2848,29],{"class":491},[481,2850,2851],{"class":495},"'unpivot'",[481,2853,2854],{"class":491},"]\n",[17,2856,2857,2858,2860,2861,2864,2865,2868,2869,2872],{},"Add your name, in alphabetical order. The same test reads ",[26,2859,2163],{}," of\n",[26,2862,2863],{},"flow_shortcuts.go"," and fails when the two differ, which is how you find out you forgot\nstep 7. If your node has a summary or consumes columns, add a case to\n",[26,2866,2867],{},"frontend\u002Ftests\u002Fpreview-grid.test.mjs"," (see its ",[26,2870,2871],{},"consumedColumns('unpivot', ...)"," line).",[472,2874,2876],{"className":1583,"code":2875,"language":1585,"meta":477,"style":477},"cd frontend\nnpm ci\nnpx nuxi prepare && npx -y -p typescript@5.6.3 -p vue-tsc@2.2.10 vue-tsc --noEmit -p .nuxt\u002Ftsconfig.json\nnpm test\n",[26,2877,2878,2885,2893,2932],{"__ignoreMap":477},[481,2879,2880,2882],{"class":483,"line":484},[481,2881,2225],{"class":515},[481,2883,2884],{"class":495}," frontend\n",[481,2886,2887,2890],{"class":483,"line":502},[481,2888,2889],{"class":686},"npm",[481,2891,2892],{"class":495}," ci\n",[481,2894,2895,2898,2901,2904,2906,2908,2911,2913,2916,2918,2921,2924,2927,2929],{"class":483,"line":522},[481,2896,2897],{"class":686},"npx",[481,2899,2900],{"class":495}," nuxi",[481,2902,2903],{"class":495}," prepare",[481,2905,2231],{"class":491},[481,2907,2897],{"class":686},[481,2909,2910],{"class":515}," -y",[481,2912,1712],{"class":515},[481,2914,2915],{"class":495}," typescript@5.6.3",[481,2917,1712],{"class":515},[481,2919,2920],{"class":495}," vue-tsc@2.2.10",[481,2922,2923],{"class":495}," vue-tsc",[481,2925,2926],{"class":515}," --noEmit",[481,2928,1712],{"class":515},[481,2930,2931],{"class":495}," .nuxt\u002Ftsconfig.json\n",[481,2933,2934,2936],{"class":483,"line":529},[481,2935,2889],{"class":686},[481,2937,2938],{"class":495}," test\n",[17,2940,2941,2943,2944,2947,2948,2951,2952,2955,2956,2959,2960,2963,2964,2966],{},[26,2942,155],{}," runs ",[26,2945,2946],{},"nuxt prepare"," itself (the ",[26,2949,2950],{},"postinstall","), so ",[26,2953,2954],{},"npx nuxi prepare"," is only\nneeded when you did not install. ",[26,2957,2958],{},"npm test"," runs every ",[26,2961,2962],{},"tests\u002F*.test.mjs"," with Node's test\nrunner. vue-tsc does not check keys of translations (a key is a string to it): that is\nwhat ",[26,2965,2958],{}," is for.",[220,2968,2970],{"id":2969},"step-11-the-ai-assistants-and-mcp","Step 11. The AI assistants and MCP",[17,2972,2973,2974,2977,2978,470],{},"The flow assistant (the Python AI service: with the database migrations, the one thing the\notherwise frozen ",[26,2975,2976],{},"gateway\u002F"," still takes changes for) lists the operations it may place and checks their parameters, in\n",[26,2979,404],{},[2154,2981,2982,2989,3102],{},[147,2983,2984,2985,2988],{},"add the name to ",[26,2986,2987],{},"BASE_OPERATIONS",";",[147,2990,2991,2992,2995,2996,2999,3000],{},"add a branch to ",[26,2993,2994],{},"clean_params"," that returns the parameters in the shape the engine and\nthe form read, or raises ",[26,2997,2998],{},"ModelRetry"," with what to fix:",[472,3001,3003],{"className":474,"code":3002,"language":476,"meta":477,"style":477},"    if operation == \"limit\":\n        n = p.get(\"n\")\n        if not isinstance(n, int) or isinstance(n, bool) or n \u003C 1:\n            raise ModelRetry(\"limit needs n, a whole number of rows of at least 1.\")\n        return {\"n\": n}\n",[26,3004,3005,3019,3034,3077,3090],{"__ignoreMap":477},[481,3006,3007,3009,3012,3014,3017],{"class":483,"line":484},[481,3008,1833],{"class":505},[481,3010,3011],{"class":491}," operation ",[481,3013,1358],{"class":505},[481,3015,3016],{"class":495}," \"limit\"",[481,3018,1844],{"class":491},[481,3020,3021,3024,3026,3029,3032],{"class":483,"line":502},[481,3022,3023],{"class":491},"        n ",[481,3025,541],{"class":505},[481,3027,3028],{"class":491}," p.get(",[481,3030,3031],{"class":495},"\"n\"",[481,3033,499],{"class":491},[481,3035,3036,3038,3040,3043,3046,3049,3052,3055,3057,3059,3062,3064,3066,3069,3072,3075],{"class":483,"line":522},[481,3037,1906],{"class":505},[481,3039,668],{"class":505},[481,3041,3042],{"class":515}," isinstance",[481,3044,3045],{"class":491},"(n, ",[481,3047,3048],{"class":515},"int",[481,3050,3051],{"class":491},") ",[481,3053,3054],{"class":505},"or",[481,3056,3042],{"class":515},[481,3058,3045],{"class":491},[481,3060,3061],{"class":515},"bool",[481,3063,3051],{"class":491},[481,3065,3054],{"class":505},[481,3067,3068],{"class":491}," n ",[481,3070,3071],{"class":505},"\u003C",[481,3073,3074],{"class":515}," 1",[481,3076,1844],{"class":491},[481,3078,3079,3082,3085,3088],{"class":483,"line":529},[481,3080,3081],{"class":505},"            raise",[481,3083,3084],{"class":491}," ModelRetry(",[481,3086,3087],{"class":495},"\"limit needs n, a whole number of rows of at least 1.\"",[481,3089,499],{"class":491},[481,3091,3092,3094,3097,3099],{"class":483,"line":535},[481,3093,1999],{"class":505},[481,3095,3096],{"class":491}," {",[481,3098,3031],{"class":495},[481,3100,3101],{"class":491},": n}\n",[147,3103,3104,3105,3108,3109,1651],{},"add a line to ",[26,3106,3107],{},"_REFERENCE",", the text the model reads\n(",[26,3110,3111],{},"- limit {n}. unique {subset?: [..]}. ...",[17,3113,3114,3115,3118,3119,3122,3123,3126,3127,3130,3131,3134],{},"The MCP server and the assistant's prompts are not generated from the Python at run time:\nthe Go gateway embeds two snapshots, ",[26,3116,3117],{},"gateway-go\u002Finternal\u002Faiprompts\u002Fprompts.json"," and\n",[26,3120,3121],{},"gateway-go\u002Finternal\u002Fmcp\u002Ftools.json"," (the description of the tool ",[26,3124,3125],{},"flow_add_step"," lists\n",[26,3128,3129],{},"ai_flow_agent.OPERATIONS","). After a change to ",[26,3132,3133],{},"ai_flow_agent.py",", write them again, from\nthe repository's root, in the gateway's image (the commands are the ones in the scripts'\nown docstrings):",[472,3136,3138],{"className":1583,"code":3137,"language":1585,"meta":477,"style":477},"docker build --build-arg WITH_DEV=true -t tabularia-gateway:latest gateway\ndocker run --rm --user \"$(id -u)\" -v \"$PWD\u002Fgateway\u002Fapp:\u002Fapp\u002Fapp:ro\" -v \"$PWD\u002Fgateway-go\u002Finternal\u002Faiprompts:\u002Fout\" \\\n    -w \u002Fapp -e HOME=\u002Ftmp -e SECURITY__FERNET_KEY=$(openssl rand -base64 32 | tr '+\u002F' '-_') tabularia-gateway:latest \\\n    python \u002Fout\u002Fgen_prompts.py\ndocker run --rm --user \"$(id -u)\" -v \"$PWD\u002Fgateway\u002Fapp:\u002Fapp\u002Fapp:ro\" -v \"$PWD\u002Fgateway-go\u002Finternal\u002Fmcp:\u002Fout\" -w \u002Fapp \\\n    -e SECURITY__FERNET_KEY=$(openssl rand -base64 32 | tr '+\u002F' '-_') tabularia-gateway:latest \\\n    python \u002Fout\u002Fgen_tools.py\ngit diff --stat gateway-go\u002Finternal\u002Faiprompts gateway-go\u002Finternal\u002Fmcp\n",[26,3139,3140,3160,3203,3255,3263,3304,3335,3342],{"__ignoreMap":477},[481,3141,3142,3144,3146,3148,3150,3152,3154,3157],{"class":483,"line":484},[481,3143,1592],{"class":686},[481,3145,1595],{"class":495},[481,3147,1598],{"class":515},[481,3149,1601],{"class":495},[481,3151,1604],{"class":515},[481,3153,1614],{"class":515},[481,3155,3156],{"class":495}," tabularia-gateway:latest",[481,3158,3159],{"class":495}," gateway\n",[481,3161,3162,3164,3166,3168,3171,3174,3177,3180,3183,3185,3187,3189,3192,3194,3196,3198,3201],{"class":483,"line":502},[481,3163,1592],{"class":686},[481,3165,1666],{"class":495},[481,3167,1669],{"class":515},[481,3169,3170],{"class":515}," --user",[481,3172,3173],{"class":495}," \"$(",[481,3175,3176],{"class":686},"id",[481,3178,3179],{"class":515}," -u",[481,3181,3182],{"class":495},")\"",[481,3184,1672],{"class":515},[481,3186,1675],{"class":495},[481,3188,1678],{"class":491},[481,3190,3191],{"class":495},"\u002Fgateway\u002Fapp:\u002Fapp\u002Fapp:ro\"",[481,3193,1672],{"class":515},[481,3195,1675],{"class":495},[481,3197,1678],{"class":491},[481,3199,3200],{"class":495},"\u002Fgateway-go\u002Finternal\u002Faiprompts:\u002Fout\"",[481,3202,1692],{"class":505},[481,3204,3205,3208,3210,3213,3216,3218,3221,3224,3227,3230,3233,3236,3239,3242,3245,3248,3250,3253],{"class":483,"line":522},[481,3206,3207],{"class":515},"    -w",[481,3209,1687],{"class":495},[481,3211,3212],{"class":515}," -e",[481,3214,3215],{"class":495}," HOME=\u002Ftmp",[481,3217,3212],{"class":515},[481,3219,3220],{"class":495}," SECURITY__FERNET_KEY=",[481,3222,3223],{"class":491},"$(",[481,3225,3226],{"class":686},"openssl",[481,3228,3229],{"class":495}," rand",[481,3231,3232],{"class":515}," -base64",[481,3234,3235],{"class":515}," 32",[481,3237,3238],{"class":505}," |",[481,3240,3241],{"class":686}," tr",[481,3243,3244],{"class":495}," '+\u002F'",[481,3246,3247],{"class":495}," '-_'",[481,3249,3051],{"class":491},[481,3251,3252],{"class":495},"tabularia-gateway:latest",[481,3254,1692],{"class":505},[481,3256,3257,3260],{"class":483,"line":529},[481,3258,3259],{"class":495},"    python",[481,3261,3262],{"class":495}," \u002Fout\u002Fgen_prompts.py\n",[481,3264,3265,3267,3269,3271,3273,3275,3277,3279,3281,3283,3285,3287,3289,3291,3293,3295,3298,3300,3302],{"class":483,"line":535},[481,3266,1592],{"class":686},[481,3268,1666],{"class":495},[481,3270,1669],{"class":515},[481,3272,3170],{"class":515},[481,3274,3173],{"class":495},[481,3276,3176],{"class":686},[481,3278,3179],{"class":515},[481,3280,3182],{"class":495},[481,3282,1672],{"class":515},[481,3284,1675],{"class":495},[481,3286,1678],{"class":491},[481,3288,3191],{"class":495},[481,3290,1672],{"class":515},[481,3292,1675],{"class":495},[481,3294,1678],{"class":491},[481,3296,3297],{"class":495},"\u002Fgateway-go\u002Finternal\u002Fmcp:\u002Fout\"",[481,3299,1684],{"class":515},[481,3301,1687],{"class":495},[481,3303,1692],{"class":505},[481,3305,3306,3309,3311,3313,3315,3317,3319,3321,3323,3325,3327,3329,3331,3333],{"class":483,"line":552},[481,3307,3308],{"class":515},"    -e",[481,3310,3220],{"class":495},[481,3312,3223],{"class":491},[481,3314,3226],{"class":686},[481,3316,3229],{"class":495},[481,3318,3232],{"class":515},[481,3320,3235],{"class":515},[481,3322,3238],{"class":505},[481,3324,3241],{"class":686},[481,3326,3244],{"class":495},[481,3328,3247],{"class":495},[481,3330,3051],{"class":491},[481,3332,3252],{"class":495},[481,3334,1692],{"class":505},[481,3336,3337,3339],{"class":483,"line":863},[481,3338,3259],{"class":495},[481,3340,3341],{"class":495}," \u002Fout\u002Fgen_tools.py\n",[481,3343,3344,3347,3350,3353,3356],{"class":483,"line":909},[481,3345,3346],{"class":686},"git",[481,3348,3349],{"class":495}," diff",[481,3351,3352],{"class":515}," --stat",[481,3354,3355],{"class":495}," gateway-go\u002Finternal\u002Faiprompts",[481,3357,3358],{"class":495}," gateway-go\u002Finternal\u002Fmcp\n",[17,3360,3361,3362,2562,3365,3368],{},"Commit the two files with the change. Tests: ",[26,3363,3364],{},"gateway\u002Ftests\u002Ftest_ai_flow_agent.py",[26,3366,3367],{},"test_wrong_params_tell_the_model_what_to_fix"," is a parametrised list of bad parameters\nand the message each earns). Run the gateway's suite as CI does:",[472,3370,3372],{"className":1583,"code":3371,"language":1585,"meta":477,"style":477},"docker build --build-arg WITH_DEV=true -t tabularia-gateway:ci gateway\n.github\u002Fscripts\u002Fci_tests.sh gateway tabularia-gateway:ci\n",[26,3373,3374,3393],{"__ignoreMap":477},[481,3375,3376,3378,3380,3382,3384,3386,3388,3391],{"class":483,"line":484},[481,3377,1592],{"class":686},[481,3379,1595],{"class":495},[481,3381,1598],{"class":515},[481,3383,1601],{"class":495},[481,3385,1604],{"class":515},[481,3387,1614],{"class":515},[481,3389,3390],{"class":495}," tabularia-gateway:ci",[481,3392,3159],{"class":495},[481,3394,3395,3397,3400],{"class":483,"line":502},[481,3396,1625],{"class":686},[481,3398,3399],{"class":495}," gateway",[481,3401,3402],{"class":495}," tabularia-gateway:ci\n",[17,3404,3405],{},"Lineage needs nothing: it works by dataset, and a step neither reads nor writes one.",[220,3407,3409],{"id":3408},"step-12-documentation-and-changelog","Step 12. Documentation and changelog",[144,3411,3412,3420,3432,3445,3454],{},[147,3413,3414,3416,3417],{},[26,3415,425],{},": a row in the table of the right group (Columns, Rows,\nCombining and reshaping), in the voice of its neighbours:\n",[26,3418,3419],{},"| **Reorder columns** | Puts the listed columns first, in the order you drag them; the others follow. |",[147,3421,3422,3424,3425,29,3428,3431],{},[26,3423,428],{},": the counts in the table \"Operation coverage\"\n(",[26,3426,3427],{},"all 41",[26,3429,3430],{},"40 — no foreach",") and the sentence under it (\"the 19 transformations and the\nloop, plus the 21 statistical tests\"); a row in \"What differs\" if the engines differ in\nsome way a person can see.",[147,3433,3434,3435,409,3438,3441,3442,181],{},"The same counts are written in ",[26,3436,3437],{},"README.md",[26,3439,3440],{},"docs\u002Fcapabilities\u002FREADME.md","\n(\"19 transformations and a loop\"); change them together:\n",[26,3443,3444],{},"git grep -n \"19 transformations\"",[147,3446,3447,3449,3450,3453],{},[26,3448,431],{},": a bullet under ",[26,3451,3452],{},"## Unreleased",", in the shape of its neighbours: bold\nlead sentence, then what changes for the person.",[147,3455,3456,3458],{},[26,3457,1811],{}," if the node is refused (step 6).",[17,3460,3461],{},"Write the documentation in English, with no names of other products.",[139,3463,108],{"id":3464},"path-2-a-statistical-test",[17,3466,3467,3468,3471,3472,3475,3476,181],{},"Everything starts from one table, the catalogue, in\n",[26,3469,3470],{},"backend\u002Fapp\u002Fengine\u002Fstats\u002Fcatalog.py",". The four engine registries, the palette, the form,\nthe allow-list of the menu, the dbt refusal and the assistants are all made from it, so a\nnew test has far fewer places to touch than a transformation. The design is in\n",[26,3473,3474],{},"docs\u002Fspecs\u002Fstatistics.md"," (the section \"The path of a new node\" lists every file and its\nmodel; the spec is kept in the repository and not published on the site) and the user's page\nis ",[86,3477,101],{"href":3478},"\u002Fdocs\u002Fcapabilities\u002Fstatistics",[17,3480,3481,3482,214,3485,3488,3489,3492,3493,3496,3497,3500,3501,3504,3505,3508,3509,3512,3513,181],{},"The model is ",[26,3483,3484],{},"pearson",[26,3486,3487],{},"stat_pearson","): two numeric columns, no groups, a result table with\na report. It came in commit ",[26,3490,3491],{},"321b3cb2",", on the foundations laid by ",[26,3494,3495],{},"a0c50f06"," (the first\ntest on the five engines), ",[26,3498,3499],{},"a51c6490"," (the catalogue, its copies, the palette and the form),\n",[26,3502,3503],{},"8798900b"," (the assistants) and ",[26,3506,3507],{},"0cede891"," (the documentation). The newest group of tests\nis ",[26,3510,3511],{},"91c91444"," (proportions and categories): read it to see a test with new kinds of\nparameter. List the history with ",[26,3514,3515],{},"git log --oneline 3ac34816..HEAD",[220,3517,223],{"id":3518},"the-whole-list-at-a-glance-1",[45,3520,3521,3531],{},[48,3522,3523],{"role":50},[52,3524,3525,3527,3529],{"role":54},[56,3526,232],{"role":58},[56,3528,235],{"role":58},[56,3530,238],{"role":58},[64,3532,3533,3544,3560,3579,3594,3609,3621,3638,3655],{"role":50},[52,3534,3535,3537,3540],{"role":54},[69,3536,245],{"role":71,"data-label":232,"data-place":72},[69,3538,3539],{"role":71,"data-label":235,"data-place":84},"The catalogue",[69,3541,3542],{"role":71,"data-label":238,"data-place":251},[26,3543,3470],{},[52,3545,3546,3548,3551],{"role":54},[69,3547,259],{"role":71,"data-label":232,"data-place":72},[69,3549,3550],{"role":71,"data-label":235,"data-place":84},"The counting passes",[69,3552,3553,409,3556,3559],{"role":71,"data-label":238,"data-place":251},[26,3554,3555],{},"stats\u002Faggregates.py",[26,3557,3558],{},"stats\u002Fpolars_source.py"," (only for a new pass)",[52,3561,3562,3564,3567],{"role":54},[69,3563,272],{"role":71,"data-label":232,"data-place":72},[69,3565,3566],{"role":71,"data-label":235,"data-place":84},"The final computation",[69,3568,3569,214,3572,29,3575,3578],{"role":71,"data-label":238,"data-place":251},[26,3570,3571],{},"stats\u002Fcompute.py",[26,3573,3574],{},"dist.py",[26,3576,3577],{},"exact.py"," for distributions)",[52,3580,3581,3583,3586],{"role":54},[69,3582,285],{"role":71,"data-label":232,"data-place":72},[69,3584,3585],{"role":71,"data-label":235,"data-place":84},"The report",[69,3587,3588,409,3591],{"role":71,"data-label":238,"data-place":251},[26,3589,3590],{},"stats\u002Flayouts.py",[26,3592,3593],{},"stats\u002Freport_texts.json",[52,3595,3596,3598,3601],{"role":54},[69,3597,298],{"role":71,"data-label":232,"data-place":72},[69,3599,3600],{"role":71,"data-label":235,"data-place":84},"The snapshot and its three copies",[69,3602,3603,29,3606],{"role":71,"data-label":238,"data-place":251},[26,3604,3605],{},"backend\u002Fapp\u002Fengine\u002Fstats\u002Fcatalog.json",[26,3607,3608],{},".github\u002Fscripts\u002Fstat_catalog.py",[52,3610,3611,3613,3616],{"role":54},[69,3612,317],{"role":71,"data-label":232,"data-place":72},[69,3614,3615],{"role":71,"data-label":235,"data-place":84},"The words",[69,3617,3618],{"role":71,"data-label":238,"data-place":251},[26,3619,3620],{},"frontend\u002Fi18n\u002Flocales\u002F{en,it,de,es,fr}.gen.ts",[52,3622,3623,3625,3628],{"role":54},[69,3624,333],{"role":71,"data-label":232,"data-place":72},[69,3626,3627],{"role":71,"data-label":235,"data-place":84},"Tests",[69,3629,3630,29,3633,29,3635],{"role":71,"data-label":238,"data-place":251},[26,3631,3632],{},"backend\u002Ftests\u002Ftest_stats_*.py",[26,3634,312],{},[26,3636,3637],{},"frontend\u002Ftests\u002Fstat-*.test.mjs",[52,3639,3640,3642,3645],{"role":54},[69,3641,351],{"role":71,"data-label":232,"data-place":72},[69,3643,3644],{"role":71,"data-label":235,"data-place":84},"The assistants and MCP",[69,3646,3647,3648,405,3651,409,3653],{"role":71,"data-label":238,"data-place":251},"the copy ",[26,3649,3650],{},"gateway\u002Fapp\u002Fservices\u002Fstat_catalog.json",[26,3652,408],{},[26,3654,412],{},[52,3656,3657,3659,3661],{"role":54},[69,3658,370],{"role":71,"data-label":232,"data-place":72},[69,3660,420],{"role":71,"data-label":235,"data-place":84},[69,3662,3663,29,3666,3668],{"role":71,"data-label":238,"data-place":251},[26,3664,3665],{},"docs\u002Fcapabilities\u002Fstatistics.md",[26,3667,431],{}," and the counts",[17,3670,3671,3672,3674,3675,29,3677,33,3679,29,3681,3683,3684,3687,3688,3690,3691,3694,3695,3698],{},"What you do ",[21,3673,1892],{}," touch: the four registries (",[26,3676,1221],{},[26,3678,733],{},[26,3680,753],{},[26,3682,779],{}," register one operation per catalogue entry in a loop over\n",[26,3685,3686],{},"stat_operations()","), the Go gateway (it embeds the copy of the catalogue: its menu, its\ndbt refusal ",[26,3689,1742],{}," and its route ",[26,3692,3693],{},"POST \u002Ftasks\u002Fstat-report"," know the test by\nname), the dbt export (the last ",[26,3696,3697],{},"raise"," refuses it), the palette, the icon (a test takes\nits family's) and the form.",[220,3700,3702,3703],{"id":3701},"step-1-the-catalogue-backendappenginestatscatalogpy","Step 1. The catalogue: ",[26,3704,3470],{},[17,3706,3707,3708,3711,3712,3715,3716,3718],{},"An entry of ",[26,3709,3710],{},"TESTS"," is plain data, which the interface reads: its family, the keys it\nneeds and takes (each with a ",[1747,3713,3714],{},"kind","), and the defaults of what it takes. The keys are shown\nin this order by the form. ",[26,3717,3484],{},", whole:",[472,3720,3722],{"className":474,"code":3721,"language":476,"meta":477,"style":477},"    \"pearson\": {\n        \"family\": \"correlation\",\n        \"needs\": {\"x\": \"number_column\", \"y\": \"number_column\"},\n        \"takes\": {\"alternative\": \"alternative\", \"alpha\": \"alpha\", \"detail\": \"detail\"},\n        \"defaults\": {\"alternative\": \"two_sided\", \"alpha\": 0.05, \"detail\": \"results\"},\n    },\n",[26,3723,3724,3731,3743,3770,3804,3838],{"__ignoreMap":477},[481,3725,3726,3729],{"class":483,"line":484},[481,3727,3728],{"class":495},"    \"pearson\"",[481,3730,2620],{"class":491},[481,3732,3733,3736,3738,3741],{"class":483,"line":502},[481,3734,3735],{"class":495},"        \"family\"",[481,3737,1311],{"class":491},[481,3739,3740],{"class":495},"\"correlation\"",[481,3742,33],{"class":491},[481,3744,3745,3748,3750,3753,3755,3758,3760,3763,3765,3767],{"class":483,"line":522},[481,3746,3747],{"class":495},"        \"needs\"",[481,3749,1322],{"class":491},[481,3751,3752],{"class":495},"\"x\"",[481,3754,1311],{"class":491},[481,3756,3757],{"class":495},"\"number_column\"",[481,3759,29],{"class":491},[481,3761,3762],{"class":495},"\"y\"",[481,3764,1311],{"class":491},[481,3766,3757],{"class":495},[481,3768,3769],{"class":491},"},\n",[481,3771,3772,3775,3777,3780,3782,3784,3786,3789,3791,3793,3795,3798,3800,3802],{"class":483,"line":529},[481,3773,3774],{"class":495},"        \"takes\"",[481,3776,1322],{"class":491},[481,3778,3779],{"class":495},"\"alternative\"",[481,3781,1311],{"class":491},[481,3783,3779],{"class":495},[481,3785,29],{"class":491},[481,3787,3788],{"class":495},"\"alpha\"",[481,3790,1311],{"class":491},[481,3792,3788],{"class":495},[481,3794,29],{"class":491},[481,3796,3797],{"class":495},"\"detail\"",[481,3799,1311],{"class":491},[481,3801,3797],{"class":495},[481,3803,3769],{"class":491},[481,3805,3806,3809,3811,3813,3815,3818,3820,3822,3824,3827,3829,3831,3833,3836],{"class":483,"line":535},[481,3807,3808],{"class":495},"        \"defaults\"",[481,3810,1322],{"class":491},[481,3812,3779],{"class":495},[481,3814,1311],{"class":491},[481,3816,3817],{"class":495},"\"two_sided\"",[481,3819,29],{"class":491},[481,3821,3788],{"class":495},[481,3823,1311],{"class":491},[481,3825,3826],{"class":515},"0.05",[481,3828,29],{"class":491},[481,3830,3797],{"class":495},[481,3832,1311],{"class":491},[481,3834,3835],{"class":495},"\"results\"",[481,3837,3769],{"class":491},[481,3839,3840],{"class":483,"line":552},[481,3841,3842],{"class":491},"    },\n",[17,3844,3845,3848,3849,3852,3853,3856,3857,3860,3861,3864,3865,3868,3869,214,3872,29,3874,29,3877,29,3879,29,3881,33,3884,29,3887,3890,3891,3894,3895,3898,3899,3902,3903,3906,3907,409,3910,1651],{},[26,3846,3847],{},"detail"," is the key every test takes: ",[26,3850,3851],{},"results"," is the table, ",[26,3854,3855],{},"report"," also writes the rows\nthe report's charts draw. The kinds are in ",[26,3858,3859],{},"KINDS"," (what the form draws: ",[26,3862,3863],{},"number_column"," is\na column picker of numeric columns) and ",[26,3866,3867],{},"_READERS"," (what the node accepts and the sentence\nit refuses with). Reuse a kind when you can. A new kind needs both, plus a control the form\ncan draw: the controls are ",[26,3870,3871],{},"CONTROLS",[26,3873,2391],{},[26,3875,3876],{},"levels",[26,3878,2415],{},[26,3880,2412],{},[26,3882,3883],{},"choice",[26,3885,3886],{},"level",[26,3888,3889],{},"proportions","); a new control means work in ",[26,3892,3893],{},"frontend\u002Fcomponents\u002Fui\u002FStatTestForm.vue","\nand ",[26,3896,3897],{},"frontend\u002Fcomposables\u002FstatTests.ts",", which the test below makes you do. When two\noptions exclude each other, add a ",[26,3900,3901],{},"forbids"," rule; when a key matters only with some values\nof another, ",[26,3904,3905],{},"applies"," (see ",[26,3908,3909],{},"anova",[26,3911,3912],{},"chi2_independence",[17,3914,590,3915,3918,3919,3922,3923,3926],{},[26,3916,3917],{},"backend\u002Ftests\u002Ftest_stats_catalog.py"," checks that the snapshot is what the\ncatalogue says, that every kind has a reader and a control the form draws, and\n",[26,3920,3921],{},"test_the_tests_of_the_first_lots_in_their_families"," lists the tests of each family ",[21,3924,3925],{},"by\nname",": add yours there.",[220,3928,3930],{"id":3929},"step-2-the-counting-passes-only-if-the-test-needs-a-new-one","Step 2. The counting passes (only if the test needs a new one)",[17,3932,3933,3934,1177,3937,3940,3941,156,3944,3947,3948,33,3951,29,3954,29,3957,29,3960,29,3963,29,3966,3969,3970,3972,3973,3975,3976,3979],{},"A test sees the engine through two classes with the same methods: ",[26,3935,3936],{},"SqlStatSource",[26,3938,3939],{},"aggregates.py"," (for DuckDB, chDB, ClickHouse and BigQuery, which differ only by dialect)\nand ",[26,3942,3943],{},"PolarsStatSource",[26,3945,3946],{},"polars_source.py",". The existing methods are ",[26,3949,3950],{},"moments",[26,3952,3953],{},"pair_moments",[26,3955,3956],{},"abs_dev_moments",[26,3958,3959],{},"quartiles",[26,3961,3962],{},"successes",[26,3964,3965],{},"crosstab",[26,3967,3968],{},"histogram",". A\ntest that fits them (as ",[26,3971,3484],{}," fits ",[26,3974,3953],{},") needs no change here. A new pass is a\nmethod on both classes that returns the same named tuple, ",[21,3977,3978],{},"centred where it sums",": the\nnumbers must agree across engines within a relative 1e-9, also on a column near 1e9.",[17,3981,3982],{},"The engine never sends the rows to Python: the passes aggregate in the engine and the test\ncomputes on the aggregates (the CHANGELOG says \"the last step in one module on the\naggregates\").",[220,3984,3986,3987],{"id":3985},"step-3-the-final-computation-statscomputepy","Step 3. The final computation: ",[26,3988,3571],{},[17,3990,3991,3992,3995,3996,3999,4000,3118,4002,4004,4005,409,4008,4011,4012,29,4015,29,4017,29,4020,29,4023,29,4025,29,4027,29,4030,33,4033,29,4036,4038,4039,4042,4043,470],{},"One function ",[26,3993,3994],{},"(source, p, out, engine_name)"," per test, entered in ",[26,3997,3998],{},"_TESTS",", that reads the\naggregates, computes the statistic and the p-value with the functions of ",[26,4001,3574],{},[26,4003,3577],{},", and writes the output table with ",[26,4006,4007],{},"out.number(...)",[26,4009,4010],{},"out.text(...)"," (a long\ntable of ten columns: ",[26,4013,4014],{},"section",[26,4016,3886],{},[26,4018,4019],{},"level_2",[26,4021,4022],{},"stat",[26,4024,2418],{},[26,4026,2409],{},[26,4028,4029],{},"x0",[26,4031,4032],{},"x1",[26,4034,4035],{},"ord",[26,4037,2293],{},"; see ",[26,4040,4041],{},"stats\u002Foutput.py","). The head of ",[26,4044,4045],{},"_pearson",[472,4047,4049],{"className":474,"code":4048,"language":476,"meta":477,"style":477},"def _pearson(source, p: dict[str, Any], out: Rows, engine_name: str) -> None:\n    \"\"\"Pearson's correlation, by its t. H0: correlation = 0.\"\"\"\n    test = \"pearson\"\n    x, y, alpha, alternative = p[\"x\"], p[\"y\"], p[\"alpha\"], p[\"alternative\"]\n    pm = _two_columns(source, test, p, 3)\n    for column, var in ((x, pm.var_x), (y, pm.var_y)):\n        if var == 0.0:\n            raise refusal(test, f\"all the values of «{column}» are equal on the rows used (the variance is 0): there is no correlation\")\n",[26,4050,4051,4075,4080,4090,4117,4131,4144,4158],{"__ignoreMap":477},[481,4052,4053,4055,4058,4061,4063,4066,4068,4071,4073],{"class":483,"line":484},[481,4054,506],{"class":505},[481,4056,4057],{"class":487}," _pearson",[481,4059,4060],{"class":491},"(source, p: dict[",[481,4062,516],{"class":515},[481,4064,4065],{"class":491},", Any], out: Rows, engine_name: ",[481,4067,516],{"class":515},[481,4069,4070],{"class":491},") -> ",[481,4072,638],{"class":515},[481,4074,1844],{"class":491},[481,4076,4077],{"class":483,"line":502},[481,4078,4079],{"class":495},"    \"\"\"Pearson's correlation, by its t. H0: correlation = 0.\"\"\"\n",[481,4081,4082,4085,4087],{"class":483,"line":522},[481,4083,4084],{"class":491},"    test ",[481,4086,541],{"class":505},[481,4088,4089],{"class":495}," \"pearson\"\n",[481,4091,4092,4095,4097,4100,4102,4105,4107,4109,4111,4113,4115],{"class":483,"line":529},[481,4093,4094],{"class":491},"    x, y, alpha, alternative ",[481,4096,541],{"class":505},[481,4098,4099],{"class":491}," p[",[481,4101,3752],{"class":495},[481,4103,4104],{"class":491},"], p[",[481,4106,3762],{"class":495},[481,4108,4104],{"class":491},[481,4110,3788],{"class":495},[481,4112,4104],{"class":491},[481,4114,3779],{"class":495},[481,4116,2854],{"class":491},[481,4118,4119,4122,4124,4127,4129],{"class":483,"line":535},[481,4120,4121],{"class":491},"    pm ",[481,4123,541],{"class":505},[481,4125,4126],{"class":491}," _two_columns(source, test, p, ",[481,4128,272],{"class":515},[481,4130,499],{"class":491},[481,4132,4133,4136,4139,4141],{"class":483,"line":552},[481,4134,4135],{"class":505},"    for",[481,4137,4138],{"class":491}," column, var ",[481,4140,857],{"class":505},[481,4142,4143],{"class":491}," ((x, pm.var_x), (y, pm.var_y)):\n",[481,4145,4146,4148,4151,4153,4156],{"class":483,"line":863},[481,4147,1906],{"class":505},[481,4149,4150],{"class":491}," var ",[481,4152,1358],{"class":505},[481,4154,4155],{"class":515}," 0.0",[481,4157,1844],{"class":491},[481,4159,4160,4162,4165,4167,4170,4172,4174,4176,4179],{"class":483,"line":909},[481,4161,3081],{"class":505},[481,4163,4164],{"class":491}," refusal(test, ",[481,4166,871],{"class":505},[481,4168,4169],{"class":495},"\"all the values of «",[481,4171,877],{"class":505},[481,4173,2391],{"class":491},[481,4175,883],{"class":505},[481,4177,4178],{"class":495},"» are equal on the rows used (the variance is 0): there is no correlation\"",[481,4180,499],{"class":491},[17,4182,4183],{},"and its registration:",[472,4185,4187],{"className":474,"code":4186,"language":476,"meta":477,"style":477},"_TESTS: dict[str, Callable[..., None]] = {\n    ...\n    \"pearson\": _pearson,\n    ...\n}\n_WITH_REPORT_ROWS = frozenset({\"t_one_sample\", ..., \"pearson\", ...})\n",[26,4188,4189,4216,4221,4228,4232,4236],{"__ignoreMap":477},[481,4190,4191,4193,4196,4198,4201,4204,4206,4208,4211,4213],{"class":483,"line":484},[481,4192,3998],{"class":515},[481,4194,4195],{"class":491},": dict[",[481,4197,516],{"class":515},[481,4199,4200],{"class":491},", Callable[",[481,4202,4203],{"class":515},"...",[481,4205,29],{"class":491},[481,4207,638],{"class":515},[481,4209,4210],{"class":491},"]] ",[481,4212,541],{"class":505},[481,4214,4215],{"class":491}," {\n",[481,4217,4218],{"class":483,"line":502},[481,4219,4220],{"class":515},"    ...\n",[481,4222,4223,4225],{"class":483,"line":522},[481,4224,3728],{"class":495},[481,4226,4227],{"class":491},": _pearson,\n",[481,4229,4230],{"class":483,"line":529},[481,4231,4220],{"class":515},[481,4233,4234],{"class":483,"line":535},[481,4235,2193],{"class":491},[481,4237,4238,4241,4243,4246,4249,4252,4254,4256,4258,4261,4263,4265],{"class":483,"line":552},[481,4239,4240],{"class":515},"_WITH_REPORT_ROWS",[481,4242,628],{"class":505},[481,4244,4245],{"class":515}," frozenset",[481,4247,4248],{"class":491},"({",[481,4250,4251],{"class":495},"\"t_one_sample\"",[481,4253,29],{"class":491},[481,4255,4203],{"class":515},[481,4257,29],{"class":491},[481,4259,4260],{"class":495},"\"pearson\"",[481,4262,29],{"class":491},[481,4264,4203],{"class":515},[481,4266,4267],{"class":491},"})\n",[17,4269,4270,4271,4273,4274,4277,4278,4281,4282,214,4284,4287],{},"A test not in ",[26,4272,4240],{}," refuses ",[26,4275,4276],{},"detail = report"," with a sentence. Refuse bad\ndata with ",[26,4279,4280],{},"refusal(test, \"...\")",", whose sentence says what to do. Never print a p-value as\nzero, and write a number that is not finite as ",[26,4283,1207],{},[26,4285,4286],{},"output.py"," does it).",[220,4289,4291,4292,409,4294],{"id":4290},"step-4-the-report-statslayoutspy-and-statsreport_textsjson","Step 4. The report: ",[26,4293,3590],{},[26,4295,3593],{},[17,4297,4298,4299,4302,4303,4306,4307,33,4310,4313,4314,4317,4318,4321,4322,4325,4326,214,4329,29,4332,29,4335,33,4338,29,4341,4344],{},"The Report tab draws pages from a layout: a function that builds a definition of the\nreport engine (",[26,4300,4301],{},"backend\u002Fapp\u002Freports",") from the test's name, its parameters and the\nlanguage. Most tests share one by shape: ",[26,4304,4305],{},"LAYOUTS"," maps ",[26,4308,4309],{},"\"pearson\": _correlation",[26,4311,4312],{},"\"t_two_sample\": _two_groups",". If a shape fits, add your test to the map; otherwise write\na function in the style of ",[26,4315,4316],{},"_correlation"," with ",[26,4319,4320],{},"_page(...)",". The words of the report are\nin ",[26,4323,4324],{},"report_texts.json",", in five languages under ",[26,4327,4328],{},"tests.\u003Cid>",[26,4330,4331],{},"name",[26,4333,4334],{},"stats",[26,4336,4337],{},"kpi",[26,4339,4340],{},"symbols",[26,4342,4343],{},"tables","), and must have identical keys in every language and use only characters\nthe PDF font has (tests for both).",[17,4346,590,4347,470],{},[26,4348,4349],{},"backend\u002Ftests\u002Ftest_stats_layouts.py",[472,4351,4353],{"className":474,"code":4352,"language":476,"meta":477,"style":477},"def test_every_test_of_the_catalogue_has_a_layout_and_its_reference():\n    assert set(layouts.LAYOUTS) == set(TESTS) == set(REFERENCE)\n",[26,4354,4355,4364],{"__ignoreMap":477},[481,4356,4357,4359,4362],{"class":483,"line":484},[481,4358,506],{"class":505},[481,4360,4361],{"class":487}," test_every_test_of_the_catalogue_has_a_layout_and_its_reference",[481,4363,1505],{"class":491},[481,4365,4366,4368,4370,4373,4375,4377,4379,4381,4383,4385,4387,4389,4391,4393,4396],{"class":483,"line":502},[481,4367,1343],{"class":505},[481,4369,1898],{"class":515},[481,4371,4372],{"class":491},"(layouts.",[481,4374,4305],{"class":515},[481,4376,3051],{"class":491},[481,4378,1358],{"class":505},[481,4380,1898],{"class":515},[481,4382,492],{"class":491},[481,4384,3710],{"class":515},[481,4386,3051],{"class":491},[481,4388,1358],{"class":505},[481,4390,1898],{"class":515},[481,4392,492],{"class":491},[481,4394,4395],{"class":515},"REFERENCE",[481,4397,499],{"class":491},[17,4399,4400,4401,4403,4404,4407],{},"Add your test to ",[26,4402,4395],{}," (the parameters it is asked on the reference data) and to\n",[26,4405,4406],{},"VARIANTS"," (the variants of its options, which together write every row it may write) at the\ntop of that file.",[220,4409,4411],{"id":4410},"step-5-the-snapshot-and-the-three-copies","Step 5. The snapshot and the three copies",[17,4413,4414,4415,470],{},"The interface, the Go gateway and the AI service each read a copy of the catalogue,\nbecause each is built from its own folder. After any change to ",[26,4416,4417],{},"catalog.py",[472,4419,4421],{"className":1583,"code":4420,"language":1585,"meta":477,"style":477},"# 1. the snapshot, written by the engine's own code (the backend image, from the repository's root)\ndocker run --rm --user \"$(id -u)\" -v \"$PWD\u002Fbackend:\u002Fapp\" -w \u002Fapp tabularia-backend:ci \\\n    python -m app.engine.stats.catalog\n# 2. its three copies (standard library only)\npython3 .github\u002Fscripts\u002Fstat_catalog.py\n# 3. the check CI runs\npython3 .github\u002Fscripts\u002Fstat_catalog.py --check\n",[26,4422,4423,4428,4462,4471,4476,4484,4489],{"__ignoreMap":477},[481,4424,4425],{"class":483,"line":484},[481,4426,4427],{"class":525},"# 1. the snapshot, written by the engine's own code (the backend image, from the repository's root)\n",[481,4429,4430,4432,4434,4436,4438,4440,4442,4444,4446,4448,4450,4452,4454,4456,4458,4460],{"class":483,"line":502},[481,4431,1592],{"class":686},[481,4433,1666],{"class":495},[481,4435,1669],{"class":515},[481,4437,3170],{"class":515},[481,4439,3173],{"class":495},[481,4441,3176],{"class":686},[481,4443,3179],{"class":515},[481,4445,3182],{"class":495},[481,4447,1672],{"class":515},[481,4449,1675],{"class":495},[481,4451,1678],{"class":491},[481,4453,1681],{"class":495},[481,4455,1684],{"class":515},[481,4457,1687],{"class":495},[481,4459,1617],{"class":495},[481,4461,1692],{"class":505},[481,4463,4464,4466,4468],{"class":483,"line":522},[481,4465,3259],{"class":495},[481,4467,1700],{"class":515},[481,4469,4470],{"class":495}," app.engine.stats.catalog\n",[481,4472,4473],{"class":483,"line":529},[481,4474,4475],{"class":525},"# 2. its three copies (standard library only)\n",[481,4477,4478,4481],{"class":483,"line":535},[481,4479,4480],{"class":686},"python3",[481,4482,4483],{"class":495}," .github\u002Fscripts\u002Fstat_catalog.py\n",[481,4485,4486],{"class":483,"line":552},[481,4487,4488],{"class":525},"# 3. the check CI runs\n",[481,4490,4491,4493,4496],{"class":483,"line":863},[481,4492,4480],{"class":686},[481,4494,4495],{"class":495}," .github\u002Fscripts\u002Fstat_catalog.py",[481,4497,4498],{"class":515}," --check\n",[17,4500,4501,4502,33,4505,409,4508,4510,4511,4514,4515,2460,4518,4521,4522,4524,4525,4527],{},"The copies are ",[26,4503,4504],{},"frontend\u002Fassets\u002Fstat-catalog.json",[26,4506,4507],{},"gateway-go\u002Finternal\u002Fstatcatalog\u002Fcatalog.json",[26,4509,3650],{},".\n",[26,4512,4513],{},"--check"," fails when a copy differs from the snapshot by a byte, and when a test's id is\nnot named in backticks (",[26,4516,4517],{},"`pearson`",[26,4519,4520],{},"`stat_pearson`",") in\n",[26,4523,3665],{},". The engine's suite fails when the snapshot is not what\n",[26,4526,4417],{}," says, and Go and the interface have a test each on their copy.",[220,4529,4531,4532],{"id":4530},"step-6-the-words-frontendi18nlocalesgents","Step 6. The words: ",[26,4533,4534],{},"frontend\u002Fi18n\u002Flocales\u002F*.gen.ts",[17,4536,4537,4538,4540,4541,4543,4544,1177,4547,4550,4551,214,4554,1177,4557,4559],{},"The test's words go in the five ",[26,4539,2717],{}," files, namespace ",[26,4542,4022],{},". The test\n",[26,4545,4546],{},"every test, family, field, choice and reason has its words in the five languages",[26,4548,4549],{},"frontend\u002Ftests\u002Fstat-tests.test.mjs"," asks for them ",[21,4552,4553],{},"by name",[26,4555,4556],{},"statWordKeys()",[26,4558,3897],{}," computes the list):",[45,4561,4562,4572],{},[48,4563,4564],{"role":50},[52,4565,4566,4569],{"role":54},[56,4567,4568],{"role":58},"Key",[56,4570,4571],{"role":58},"What",[64,4573,4574,4587,4600,4610,4623,4636],{"role":50},[52,4575,4576,4584],{"role":54},[69,4577,4578,29,4581],{"role":71,"data-label":4568,"data-place":72},[26,4579,4580],{},"stat.tests.\u003Cid>.name",[26,4582,4583],{},"stat.tests.\u003Cid>.hint",[69,4585,4586],{"role":71,"data-label":4571,"data-place":84},"the name in the palette and the one-line question it answers",[52,4588,4589,4597],{"role":54},[69,4590,4591,29,4594],{"role":71,"data-label":4568,"data-place":72},[26,4592,4593],{},"stat.tests.\u003Cid>.params.\u003Ckey>",[26,4595,4596],{},".hints.\u003Ckey>",[69,4598,4599],{"role":71,"data-label":4571,"data-place":84},"optional: a label or a hint of its own for a key",[52,4601,4602,4607],{"role":54},[69,4603,4604],{"role":71,"data-label":4568,"data-place":72},[26,4605,4606],{},"stat.params.\u003Ckey>",[69,4608,4609],{"role":71,"data-label":4571,"data-place":84},"the label of a key (shared by the tests that have it)",[52,4611,4612,4617],{"role":54},[69,4613,4614],{"role":71,"data-label":4568,"data-place":72},[26,4615,4616],{},"stat.choices.\u003Ckind>.\u003Cchoice>",[69,4618,4619,4620,4622],{"role":71,"data-label":4571,"data-place":84},"each choice of a ",[26,4621,3883],{}," kind",[52,4624,4625,4630],{"role":54},[69,4626,4627],{"role":71,"data-label":4568,"data-place":72},[26,4628,4629],{},"stat.reasons.\u003Creason>",[69,4631,4632,4633,4635],{"role":71,"data-label":4571,"data-place":84},"the sentence of a ",[26,4634,3901],{}," rule",[52,4637,4638,4643],{"role":54},[69,4639,4640],{"role":71,"data-label":4568,"data-place":72},[26,4641,4642],{},"stat.families.\u003Cfamily>",[69,4644,4645],{"role":71,"data-label":4571,"data-place":84},"a family (only when you add one)",[17,4647,4648,4649,156,4651,470],{},"The entry of ",[26,4650,3484],{},[26,4652,4653],{},"en.gen.ts",[472,4655,4657],{"className":2304,"code":4656,"language":2306,"meta":477,"style":477},"      \"pearson\": {\n        \"name\": \"Pearson's correlation\",\n        \"hint\": \"Do two columns of the same rows move together? Pearson's r, its test and its confidence interval.\"\n      },\n",[26,4658,4659,4666,4678,4688],{"__ignoreMap":477},[481,4660,4661,4664],{"class":483,"line":484},[481,4662,4663],{"class":495},"      \"pearson\"",[481,4665,2620],{"class":491},[481,4667,4668,4671,4673,4676],{"class":483,"line":502},[481,4669,4670],{"class":495},"        \"name\"",[481,4672,1311],{"class":491},[481,4674,4675],{"class":495},"\"Pearson's correlation\"",[481,4677,33],{"class":491},[481,4679,4680,4683,4685],{"class":483,"line":522},[481,4681,4682],{"class":495},"        \"hint\"",[481,4684,1311],{"class":491},[481,4686,4687],{"class":495},"\"Do two columns of the same rows move together? Pearson's r, its test and its confidence interval.\"\n",[481,4689,4690],{"class":483,"line":529},[481,4691,4692],{"class":491},"      },\n",[17,4694,4695,4696,29,4699,29,4702,409,4705,4708,4709,4711],{},"Do the same in ",[26,4697,4698],{},"it",[26,4700,4701],{},"de",[26,4703,4704],{},"es",[26,4706,4707],{},"fr",". The ",[26,4710,2717],{}," files are edited by hand; there is no generator to run.",[220,4713,4715],{"id":4714},"step-7-tests-that-tell-you-the-numbers-are-right","Step 7. Tests that tell you the numbers are right",[17,4717,4718,4719,4722],{},"All under ",[26,4720,4721],{},"backend\u002Ftests\u002F",", all parametrised on the engines the way the transformations'\ntests are:",[144,4724,4725,4738,4760,4766,4771,4777],{},[147,4726,4727,1311,4730,4733,4734,4737],{},[26,4728,4729],{},"test_stats_reference.py",[21,4731,4732],{},"reference values"," computed outside Tabularia (the file's\ndocstring says R 4.6.1, on small samples written in the file). Every engine must give them\nwithin a relative ",[26,4735,4736],{},"1e-9",", counts and texts exactly. Compute the expected numbers with R\nor SciPy and write them into the test; never copy them from your own output.",[147,4739,4740,1311,4743,4745,4746,4749,4750,29,4753,4756,4757,181],{},[26,4741,4742],{},"test_stats_parity.py",[26,4744,1476],{}," is a dictionary of flows (",[26,4747,4748],{},"stat(\"pearson\", x=\"x\", y=\"x2\")",");\nevery other engine must give the table Polars gives, on 5,000 rows with ties, empty\nvalues, ",[26,4751,4752],{},"NaN",[26,4754,4755],{},"-0.0"," and a column near 1e9. Add a case for each variant of each option,\nand one with ",[26,4758,4759],{},"detail=\"report\"",[147,4761,4762,4765],{},[26,4763,4764],{},"test_stats_params.py",": the refusals (every sentence a bad parameter earns).",[147,4767,4768,4770],{},[26,4769,312],{},": BigQuery's SQL is parsed, not run (it cannot run in CI).",[147,4772,4773,4776],{},[26,4774,4775],{},"test_stats_layouts.py",": step 4.",[147,4778,4779,4782,4783,4785],{},[26,4780,4781],{},"test_dbt_export.py",": nothing to write; ",[26,4784,1805],{}," goes\nthrough every test of the catalogue.",[17,4787,4788,4789,4791,4792,4795,4796,4799,4800,4802],{},"The interface: ",[26,4790,4549],{}," (the fields of each test, e.g.\n",[26,4793,4794],{},"assert.deepEqual(fields('stat_pearson'), ['x:column', 'y:column', 'alternative:choice', 'alpha:number'])",")\nand ",[26,4797,4798],{},"stat-form.test.mjs"," (the form rendered). ",[26,4801,391],{},"\nreads the catalogue, so it needs nothing for a new test.",[220,4804,4806],{"id":4805},"step-8-the-assistants-and-mcp","Step 8. The assistants and MCP",[17,4808,4809,4811,4812,29,4815,33,4818,4821,4822,409,4824,4826,4827,4829,4830,1651],{},[26,4810,404],{}," builds its operations, its reference text and its\nchecks from the copy of the catalogue (",[26,4813,4814],{},"STAT_TESTS",[26,4816,4817],{},"stat_reference()",[26,4819,4820],{},"clean_stat_params","): nothing to write. What changes is the text the Go gateway embeds, so\nwrite ",[26,4823,408],{},[26,4825,412],{}," again with the two commands of Path 1 step 11 and\ncommit them. ",[26,4828,3364],{}," has a test that goes through the whole\ncatalogue (",[26,4831,4832],{},"test_every_test_of_the_catalogue_is_an_operation_with_a_line_of_reference_and_its_defaults_pass",[220,4834,4836],{"id":4835},"step-9-documentation-and-changelog","Step 9. Documentation and changelog",[144,4838,4839,4855,4880],{},[147,4840,4841,4843,4844,3487,4847,4850,4851,4854],{},[26,4842,3665],{},": a paragraph in its family's section,\n",[26,4845,4846],{},"**",[26,4848,4849],{},"**: ..."," with an example on the sample data. The name in backticks is\nwhat ",[26,4852,4853],{},"stat_catalog.py --check"," looks for.",[147,4856,4857,4858,4861,4862,29,4864,29,4866,33,4868,29,4870,409,4872,4874,4875,29,4877,1651],{},"The number of tests: ",[26,4859,4860],{},"git grep -n \"21 \\(hypothesis \\)\\?tests\\|21 statistical\\|Twenty-one\"","\nfinds it in ",[26,4863,3437],{},[26,4865,3440],{},[26,4867,425],{},[26,4869,3665],{},[26,4871,428],{},[26,4873,431],{},";\nthe operation counts in the table \"Operation coverage\" move with it (",[26,4876,3427],{},[26,4878,4879],{},"40",[147,4881,4882,2599,4884,181],{},[26,4883,431],{},[26,4885,3452],{},[139,4887,126],{"id":4888},"path-3-a-statistical-model",[17,4890,4891,4892,4895,4896,4899,4900,4904,4905,4908,4909,4912,4913,181],{},"A model is declared once, in ",[26,4893,4894],{},"backend\u002Fapp\u002Fengine\u002Fmodels\u002Fcatalog.py",", and everything else reads\nthat: the palette, the form, the Go gateway's check of the parameters, the Jobs' ConfigMap, the\nassistants, MLflow and Predict. What the catalogue cannot say is code: the runner, in the\ngroup's image, and the layout of the report. The design, with the rules every model follows\n(Kubernetes only, the ten columns, the report drawn from the results, MLflow logged by the\ngateway, Predict from the card alone), is a maintainers' design note that is not part of this repository\n(comments in the code call it ",[26,4897,4898],{},"docs\u002Fspecs\u002Fstatistical-models.md","); this page and the existing\nmodels are what to read; the user's page is ",[86,4901,4903],{"href":4902},"\u002Fdocs\u002Fcapabilities\u002Fmodels","Statistical models",".\nRead, as models to copy, the ",[21,4906,4907],{},"parametric survival"," node (an R model in an existing group, with\nvariants, an automatic choice and Predict) and the ",[21,4910,4911],{},"customer lifetime"," group (a new group, with\na system library); the history is ",[26,4914,4915],{},"git log --oneline -- backend\u002Fapp\u002Fengine\u002Fmodels\u002Fcatalog.py",[220,4917,223],{"id":4918},"the-whole-list-at-a-glance-2",[45,4920,4921,4931],{},[48,4922,4923],{"role":50},[52,4924,4925,4927,4929],{"role":54},[56,4926,232],{"role":58},[56,4928,235],{"role":58},[56,4930,238],{"role":58},[64,4932,4933,4950,4964,4985,4997,5011,5035,5053,5068],{"role":50},[52,4934,4935,4937,4946],{"role":54},[69,4936,245],{"role":71,"data-label":232,"data-place":72},[69,4938,4939,4940,29,4943],{"role":71,"data-label":235,"data-place":84},"The catalogue: group, model, kinds, variants, ",[26,4941,4942],{},"PREDICT",[26,4944,4945],{},"LIMITS",[69,4947,4948],{"role":71,"data-label":238,"data-place":251},[26,4949,4894],{},[52,4951,4952,4954,4956],{"role":54},[69,4953,259],{"role":71,"data-label":232,"data-place":72},[69,4955,3600],{"role":71,"data-label":235,"data-place":84},[69,4957,4958,29,4961],{"role":71,"data-label":238,"data-place":251},[26,4959,4960],{},"backend\u002Fapp\u002Fengine\u002Fmodels\u002Fcatalog.json",[26,4962,4963],{},".github\u002Fscripts\u002Fmodel_catalog.py",[52,4965,4966,4968,4971],{"role":54},[69,4967,272],{"role":71,"data-label":232,"data-place":72},[69,4969,4970],{"role":71,"data-label":235,"data-place":84},"The group: recipe, runner, reference values",[69,4972,4973,214,4976,29,4979,29,4982,346],{"role":71,"data-label":238,"data-place":251},[26,4974,4975],{},"gateway-go\u002Finternal\u002Fmodelgroups\u002Fgroups\u002F\u003Cgroup>\u002F",[26,4977,4978],{},"recipe.json",[26,4980,4981],{},"runner\u002F",[26,4983,4984],{},"reference\u002F",[52,4986,4987,4989,4992],{"role":54},[69,4988,285],{"role":71,"data-label":232,"data-place":72},[69,4990,4991],{"role":71,"data-label":235,"data-place":84},"The card's schema",[69,4993,4994],{"role":71,"data-label":238,"data-place":251},[26,4995,4996],{},"gateway-go\u002Finternal\u002Fmodelgroups\u002Fcard.schema.json",[52,4998,4999,5001,5003],{"role":54},[69,5000,298],{"role":71,"data-label":232,"data-place":72},[69,5002,3585],{"role":71,"data-label":235,"data-place":84},[69,5004,5005,29,5008],{"role":71,"data-label":238,"data-place":251},[26,5006,5007],{},"backend\u002Fapp\u002Fengine\u002Fmodels\u002Flayouts\u002F\u003Cmodel>.py",[26,5009,5010],{},"report_texts\u002F\u003Cmodel>.json",[52,5012,5013,5015,5018],{"role":54},[69,5014,317],{"role":71,"data-label":232,"data-place":72},[69,5016,5017],{"role":71,"data-label":235,"data-place":84},"The editor and its words",[69,5019,5020,29,5023,29,5026,29,5029,5031,5032,346],{"role":71,"data-label":238,"data-place":251},[26,5021,5022],{},"frontend\u002Fcomposables\u002FmodelCatalog.ts",[26,5024,5025],{},"modelIcons.ts",[26,5027,5028],{},"OpSidebar.vue",[26,5030,4534],{}," (namespace ",[26,5033,5034],{},"models",[52,5036,5037,5039,5041],{"role":54},[69,5038,333],{"role":71,"data-label":232,"data-place":72},[69,5040,3627],{"role":71,"data-label":235,"data-place":84},[69,5042,5043,29,5046,29,5049,5052],{"role":71,"data-label":238,"data-place":251},[26,5044,5045],{},"backend\u002Ftests\u002Ftest_models_{catalog,results,layouts}.py",[26,5047,5048],{},"frontend\u002Ftests\u002Fmodel-*.test.mjs",[26,5050,5051],{},"gateway-go\u002Finternal\u002Fmodelgroups\u002F",", the group's own self-test",[52,5054,5055,5057,5059],{"role":54},[69,5056,351],{"role":71,"data-label":232,"data-place":72},[69,5058,3644],{"role":71,"data-label":235,"data-place":84},[69,5060,5061,5063,5064,409,5066],{"role":71,"data-label":238,"data-place":251},[26,5062,404],{}," (a paragraph), then ",[26,5065,408],{},[26,5067,412],{},[52,5069,5070,5072,5074],{"role":54},[69,5071,370],{"role":71,"data-label":232,"data-place":72},[69,5073,420],{"role":71,"data-label":235,"data-place":84},[69,5075,5076,29,5079,3668],{"role":71,"data-label":238,"data-place":251},[26,5077,5078],{},"docs\u002Fcapabilities\u002Fmodels.md",[26,5080,431],{},[220,5082,5084],{"id":5083},"step-1-the-catalogue","Step 1. The catalogue",[17,5086,3707,5087,5090,5091,409,5094,5097,5098,5101,5102,5105,5106,5108,5109,2460,5111,5113,5114,5117,5118,5121,5122,5125,5126,5129,5130,5132,5133,5136],{},[26,5088,5089],{},"MODELS"," says which keys the node ",[26,5092,5093],{},"needs",[26,5095,5096],{},"takes"," (their kinds, from ",[26,5099,5100],{},"kinds",":\nplain data drawn by the form's existing controls), their ",[26,5103,5104],{},"defaults",", when a key ",[26,5107,3905],{}," or is\n",[26,5110,2069],{},[26,5112,3901],{}," another, which columns must be ",[26,5115,5116],{},"disjoint",", and its ",[21,5119,5120],{},"variants",": what the\nrunner ",[21,5123,5124],{},"may"," write for each combination of options. ",[26,5127,5128],{},"results.py"," refuses a section or a key\nthat the variant does not declare, in the engine and in the Go gateway, so the catalogue is\nalso the list of what a run can contain. A check that does not apply to the options chosen is\nsimply not written; it is never written as «not computed». ",[26,5131,4942],{}," says which options Predict\ntakes for the model and which columns it adds. A new group is an entry of ",[26,5134,5135],{},"GROUPS",", with its\nlanguage. Then write the snapshot, in the engine's image, and its copies, and check them:",[472,5138,5140],{"className":1583,"code":5139,"language":1585,"meta":477,"style":477},"docker run --rm --user \"$(id -u)\" -v \"$PWD\u002Fbackend:\u002Fapp\" -w \u002Fapp tabularia-backend:ci python -m app.engine.models.catalog\npython3 .github\u002Fscripts\u002Fmodel_catalog.py\npython3 .github\u002Fscripts\u002Fmodel_catalog.py --check\n",[26,5141,5142,5182,5189],{"__ignoreMap":477},[481,5143,5144,5146,5148,5150,5152,5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5177,5179],{"class":483,"line":484},[481,5145,1592],{"class":686},[481,5147,1666],{"class":495},[481,5149,1669],{"class":515},[481,5151,3170],{"class":515},[481,5153,3173],{"class":495},[481,5155,3176],{"class":686},[481,5157,3179],{"class":515},[481,5159,3182],{"class":495},[481,5161,1672],{"class":515},[481,5163,1675],{"class":495},[481,5165,1678],{"class":491},[481,5167,1681],{"class":495},[481,5169,1684],{"class":515},[481,5171,1687],{"class":495},[481,5173,1617],{"class":495},[481,5175,5176],{"class":495}," python",[481,5178,1700],{"class":515},[481,5180,5181],{"class":495}," app.engine.models.catalog\n",[481,5183,5184,5186],{"class":483,"line":502},[481,5185,4480],{"class":686},[481,5187,5188],{"class":495}," .github\u002Fscripts\u002Fmodel_catalog.py\n",[481,5190,5191,5193,5196],{"class":483,"line":522},[481,5192,4480],{"class":686},[481,5194,5195],{"class":495}," .github\u002Fscripts\u002Fmodel_catalog.py",[481,5197,4498],{"class":515},[17,5199,5200,5202,5203,5205,5206,5209],{},[26,5201,4513],{}," also fails when ",[26,5204,5078],{}," does not name the model's id in\nbackticks (step 6). ",[26,5207,5208],{},"backend\u002Ftests\u002Ffixtures\u002Fmodels\u002Fparams_cases.json"," holds the cases of parameters that the\nengine, the Go gateway and the assistants all run: add the defaults of your model, one with its\noptions and its refusals.",[220,5211,5213],{"id":5212},"step-2-the-group-the-runner-and-the-reference-values","Step 2. The group, the runner and the reference values",[17,5215,5216,5217,470],{},"A group is a folder, ",[26,5218,4975],{},[144,5220,5221,5264,5302],{},[147,5222,5223,1311,5227,29,5230,5233,5234,5237,5238,33,5241,409,5244,5247,5248,5251,5252,5255,5256,5259,5260,5263],{},[21,5224,5225],{},[26,5226,4978],{},[26,5228,5229],{},"language",[26,5231,5232],{},"base"," (R 4.6 or Python 3.14), the ",[21,5235,5236],{},"packages pinned by version, in\nthe order they are installed"," (each after its dependencies), the default ",[26,5239,5240],{},"resources",[26,5242,5243],{},"max_rows",[26,5245,5246],{},"max_seconds",". A new package or version changes the recipe's hash, and\nevery installation builds the group again by itself; say so in the changelog. A package that\nneeds a ",[21,5249,5250],{},"system library"," is listed in ",[26,5253,5254],{},"system_libraries"," (Ubuntu packages, for example\n",[26,5257,5258],{},"libgsl-dev",": the R base image is Ubuntu): the group's Dockerfile installs them with ",[26,5261,5262],{},"apt-get"," and records the versions that\nwere installed, which the group's card in Administration shows. Only a group with the field has the step,\nand the Dockerfiles of the others do not change by a byte (a test holds it).",[147,5265,5266,1311,5270,5273,5274,5277,5278,5281,5282,5285,5286,5289,5290,5293,5294,5297,5298,5301],{},[21,5267,5268],{},[26,5269,4981],{},[26,5271,5272],{},"run.R"," (or ",[26,5275,5276],{},"run.py",") routes each model to its fit and its predict function, in a file\nof its own (",[26,5279,5280],{},"runner\u002FR\u002F\u003Cmodel>.R","), over the common library in ",[26,5283,5284],{},"common\u002FR",". The rules are the common\nlibrary's: a refusal is ",[26,5287,5288],{},"tab_refuse(code, sentence, params)"," with a sentence that says what to do;\nevery row the runner writes is checked against the catalogue (",[26,5291,5292],{},"tab_check_declared","); the column\nnames are renamed to positional ones before any formula is built, so that a name that looks like\ncode is a label; a run that is slow stops by the node's ",[26,5295,5296],{},"time_budget_seconds",", never by the\nJob's deadline. ",[21,5299,5300],{},"The card"," is what Predict reads, and holds no row of the input.",[147,5303,5304,5308,5309,5312,5313,5316,5317,5320,5321,5324,5325,5328,5329,5332,5333,5336],{},[21,5305,5306],{},[26,5307,4984],{},": small data (",[26,5310,5311],{},"data\u002F*.csv","), ",[26,5314,5315],{},"expected.json"," and the scripts that write it\n(",[26,5318,5319],{},"make_reference*.R","). The expected values are computed ",[21,5322,5323],{},"outside Tabularia's code",", with the library called\ndirectly or a second construction, never with the runner itself; the tolerance of each case says what was measured.\nThe group's ",[21,5326,5327],{},"self-test"," fits them in the image before a version can be used. A second tool\n(a ",[1747,5330,5331],{},"witness",", for example ",[26,5334,5335],{},"make_witness.py"," with lifelines) is run by hand, in a scratch library, not by CI.",[17,5338,5339,5342,5343,29,5346,29,5349,29,5352,5355,5356,181],{},[26,5340,5341],{},"cmd\u002Fmodelgroup"," builds and checks a group on a laptop as the cluster does\n(",[26,5344,5345],{},"dockerfile \u003Cgroup>",[26,5347,5348],{},"code \u003Cgroup> \u003Cdir>",[26,5350,5351],{},"task",[26,5353,5354],{},"groups","): its usage is at the top of\n",[26,5357,5358],{},"gateway-go\u002Fcmd\u002Fmodelgroup\u002Fmain.go",[17,5360,5361,5364,5365,5368,5369,5372,5373,5375,5376,5378],{},[21,5362,5363],{},"The ConfigMap limit."," A Job receives the group's code in a ConfigMap, which Kubernetes limits to 1 MiB.\n",[26,5366,5367],{},"TestEveryGroupOfTheCatalogueHasARecipeAndARunner"," measures, for the Job and for the self-test (the code\nwith the reference cases), the ConfigMap that ",[26,5370,5371],{},"ConfigMap()"," makes, keys and data together, against 900 KiB. When a\ngroup's runner or its ",[26,5374,5315],{}," grow, write ",[26,5377,5315],{}," compact and look at comment-only lines: the test\nfails before the Job does. The catalogue copy the Job gets is its compact form, without indentation.",[220,5380,5382],{"id":5381},"step-3-how-a-check-speaks-and-the-notes","Step 3. How a check speaks, and the notes",[17,5384,5385,5388,5389,29,5392,29,5395,5398,5399,33,5402,29,5405,409,5408,5411,5412,5418,5419,5421,5422,5425,5426,5429,5430,5433,5434,5437,5438,5441,5442,181],{},[21,5386,5387],{},"No constant of ours makes a verdict."," A check's verdict (",[26,5390,5391],{},"ok",[26,5393,5394],{},"failed",[26,5396,5397],{},"not_computed",", with its ",[26,5400,5401],{},"h0",[26,5403,5404],{},"advice",[26,5406,5407],{},"advice_id",[26,5409,5410],{},"threshold",") comes only from a test with a ",[21,5413,5414,5415],{},"p-value read against the node's ",[26,5416,5417],{},"alpha",", with ",[26,5420,5410],{},"\ncarrying alpha; or from a ",[21,5423,5424],{},"fact"," (the Hessian is positive definite, a level has no event), the only case in which\n",[26,5427,5428],{},"doubtful"," is still written. Any other quantity is a ",[21,5431,5432],{},"measure",": a number with a ",[26,5435,5436],{},"description"," and no verdict\nand no advice, which the report lists by its id in ",[26,5439,5440],{},"MEASURES",". A rule of thumb with a threshold belongs to the models\nthat already have them (the boosting group's diagnostics); a new one needs a reason, and the simulation that shows it does not\ncry wolf. See ",[86,5443,5445],{"href":5444},"\u002Fdocs\u002Fcapabilities\u002Fmodels#how-a-check-speaks-verdicts-facts-and-measures","How a check speaks",[17,5447,5448,5449,214,5452,5455,5456,5459,5460,5463,5464,5467,5468,156,5471,5474,5475,5478,5479,5482,5483,5486],{},"The runner's ",[21,5450,5451],{},"notes",[26,5453,5454],{},"note_\u003Cid>"," rows of the ",[26,5457,5458],{},"model"," section) that carry numbers are written as an id and its\nparameters, ",[26,5461,5462],{},"@auto_close distribution=weibull other=gengamma margin=2 delta_aic=0.30 weight=0.47",", which the layout turns into a sentence in the\nreport's language (",[26,5465,5466],{},"note_texts.\u003Cid>"," in the words file). A value that is a name of the data may hold a space, a comma or a\n«%»: write them %20, %2C and %25 (",[26,5469,5470],{},"surv_note",[26,5472,5473],{},"kaplan_meier.R","), and the layout decodes them; a list is joined with «,». A\nunit of time is said in the page's words, ",[26,5476,5477],{},"{unit}"," its plural, ",[26,5480,5481],{},"{unit:one}"," its singular, ",[26,5484,5485],{},"{unit:dative}"," the plural after a\npreposition (German's dative). A note sent as plain English is shown as it is, in English, in every language: send an id.\nA heading of the report stays with the table right under it (the report engine keeps a band of words right above a table on\nthe table's page): a layout needs no room kept under a heading for that.",[220,5488,5490],{"id":5489},"step-4-the-report-the-editor-and-the-words","Step 4. The report, the editor and the words",[17,5492,5493,5496,5497,5500,5501,5504,5505,5507,5508,5511,5512,5515,5516,5519,5520,5522,5523,409,5526,156,5529,5531,5532,5535],{},[26,5494,5495],{},"layouts\u002F\u003Cmodel>.py"," builds the pages from the results rows with ",[26,5498,5499],{},"common.page",": the blocks that models share (the\nchecks and their advice, the measures, the coefficient tables, the charts' grid) are in ",[26,5502,5503],{},"common.py",". Its words are in\n",[26,5506,5010],{}," in the five languages (the catalogue's test fails when one is missing), and the tests of\n",[26,5509,5510],{},"test_models_layouts.py"," render every fixture (",[26,5513,5514],{},"backend\u002Ftests\u002Ffixtures\u002Fmodels\u002F\u003Cmodel>-\u003Cvariant>.json",", written\nfrom the runner's own output with ",[26,5517,5518],{},"tests.models_fixtures --from-results",") in five languages. The editor draws the node from\nthe catalogue: a palette entry, an icon in ",[26,5521,5025],{},", the form with the existing controls (a new kind of key needs one of\nthem, not a component), and the words ",[26,5524,5525],{},"models.\u003Cid>",[26,5527,5528],{},"models.params.\u003Ckey>",[26,5530,2717],{},"; ",[26,5533,5534],{},"model-catalog.test.mjs"," asks for the words of\nevery model of the catalogue.",[220,5537,5539],{"id":5538},"step-5-the-assistants-and-mcp","Step 5. The assistants and MCP",[17,5541,5542,5544,5545,29,5547,29,5550,5553,5554,5557,5558,5561,5562,5565,5566,409,5568,5570,5571,156,5574,181],{},[26,5543,3133],{}," reads its copy of the catalogue (",[26,5546,5089],{},[26,5548,5549],{},"models_reference()",[26,5551,5552],{},"clean_model_operation","): the node, its keys, its\nvariants and the refusals of the form come with the snapshot. What you write is a paragraph of ",[26,5555,5556],{},"_MODELS_INTRO"," on ",[21,5559,5560],{},"when to choose it"," and what\nto set (and, for a model that takes a prepared table, how to prepare it with the steps that exist), and tests in ",[26,5563,5564],{},"test_ai_flow_agent.py",": the line\nof reference, the defaults pass, the wrong parameters are sent back with what to fix, a turn that places the node on a draft. Then write\n",[26,5567,408],{},[26,5569,412],{}," again with the commands of Path 1 step 11 and commit them; ",[26,5572,5573],{},"go test .\u002Finternal\u002Faiprompts .\u002Finternal\u002Fmcp",[26,5575,166],{},[220,5577,5579],{"id":5578},"step-6-documentation-and-changelog","Step 6. Documentation and changelog",[144,5581,5582,5599],{},[147,5583,5584,5586,5587,5590],{},[26,5585,5078],{},": a section with the line ",[26,5588,5589],{},"Model id in the catalogue: ",[3176,5591,5592,5594,5595,5598],{},[26,5593,181],{},", the tables of\nits options (as the form says them), what it gives, the checks (verdicts, facts and measures), Predict, MLflow, what it refuses and an\n",[1747,5596,5597],{},"Example"," on the sample data; an example that cites a number must come from a real run, otherwise it describes the nodes and gives no number.",[147,5600,5601,5602,29,5605,29,5608,5610,5611,5613,5614,5616,5617,181],{},"The counts («Ten models are in the first release, in five groups») in ",[26,5603,5604],{},"models.md",[26,5606,5607],{},"flows.md",[26,5609,3440],{}," and the README, ",[26,5612,431],{}," under ",[26,5615,3452],{},"\nand, when you add a package or a system library, ",[26,5618,5619],{},"docs\u002Fdeploy\u002Fkubernetes.md",[139,5621,5623],{"id":5622},"what-ci-runs","What CI runs",[17,5625,5626,5627,5630],{},"Six workflows in ",[26,5628,5629],{},".github\u002Fworkflows\u002F",". A pull request is green when these pass:",[45,5632,5633,5649],{},[48,5634,5635],{"role":50},[52,5636,5637,5640,5643,5646],{"role":54},[56,5638,5639],{"role":58},"Workflow",[56,5641,5642],{"role":58},"Job",[56,5644,5645],{"role":58},"What it runs",[56,5647,5648],{"role":58},"When",[64,5650,5651,5682,5714,5741,5762,5784,5806,5840],{"role":50},[52,5652,5653,5658,5663,5679],{"role":54},[69,5654,5655],{"role":71,"data-label":5639,"data-place":72},[26,5656,5657],{},"ci.yml",[69,5659,5660],{"role":71,"data-label":5642,"data-place":84},[26,5661,5662],{},"engine tests",[69,5664,5665,5666,409,5669,405,5672,5675,5676,5678],{"role":71,"data-label":5645,"data-place":84},"builds the backend image with ",[26,5667,5668],{},"WITH_DEV=true",[26,5670,5671],{},"WITH_CHDB=true",[26,5673,5674],{},".github\u002Fscripts\u002Fci_tests.sh engine tabularia-backend:ci",": every test of ",[26,5677,1579],{}," beside real ClickHouse 24.8, PostgreSQL, MinIO and Valkey; a skip not on the allowed list fails",[69,5680,5681],{"role":71,"data-label":5648,"data-place":84},"every push and pull request",[52,5683,5684,5688,5693,5712],{"role":54},[69,5685,5686],{"role":71,"data-label":5639,"data-place":72},[26,5687,5657],{},[69,5689,5690],{"role":71,"data-label":5642,"data-place":84},[26,5691,5692],{},"gateway tests",[69,5694,5695,5696,405,5699,1311,5701,29,5703,409,5705,5708,5709,5711],{"role":71,"data-label":5645,"data-place":84},"builds the gateway image, runs ",[26,5697,5698],{},"ci_tests.sh gateway tabularia-gateway:ci",[26,5700,2245],{},[26,5702,2249],{},[26,5704,2253],{},[26,5706,5707],{},"go test .\u002F..."," on the gateway and on ",[26,5710,2260],{},", with a PostgreSQL whose schema is made by the migrations",[69,5713,5681],{"role":71,"data-label":5648,"data-place":84},[52,5715,5716,5720,5725,5739],{"role":54},[69,5717,5718],{"role":71,"data-label":5639,"data-place":72},[26,5719,5657],{},[69,5721,5722],{"role":71,"data-label":5642,"data-place":84},[26,5723,5724],{},"interface type check",[69,5726,5727,5728,1311,5730,29,5732,5735,5736,5738],{"role":71,"data-label":5645,"data-place":84},"in ",[26,5729,159],{},[26,5731,155],{},[26,5733,5734],{},"vue-tsc --noEmit"," (pinned: typescript 5.6.3, vue-tsc 2.2.10) and ",[26,5737,2958],{},"; then the unit tests of the sample data's seed, and the step «The sample data's generator»: the sampledb image is built and its tests run in Docker",[69,5740,5681],{"role":71,"data-label":5648,"data-place":84},[52,5742,5743,5748,5753,5759],{"role":54},[69,5744,5745],{"role":71,"data-label":5639,"data-place":72},[26,5746,5747],{},"stat-catalog.yml",[69,5749,5750],{"role":71,"data-label":5642,"data-place":84},[26,5751,5752],{},"check",[69,5754,5755,5758],{"role":71,"data-label":5645,"data-place":84},[26,5756,5757],{},"python3 .github\u002Fscripts\u002Ftest_stat_catalog.py -v",": the script's tests and the check that the three copies are the snapshot and every test is named in the statistics page",[69,5760,5761],{"role":71,"data-label":5648,"data-place":84},"when the catalogue, its copies, the page or the script change",[52,5763,5764,5769,5773,5781],{"role":54},[69,5765,5766],{"role":71,"data-label":5639,"data-place":72},[26,5767,5768],{},"model-catalog.yml",[69,5770,5771],{"role":71,"data-label":5642,"data-place":84},[26,5772,5752],{},[69,5774,5775,5778,5779],{"role":71,"data-label":5645,"data-place":84},[26,5776,5777],{},"python3 .github\u002Fscripts\u002Fmodel_catalog.py --check"," and its tests: the three copies of the models' catalogue are the snapshot, and every model's id is named in ",[26,5780,5078],{},[69,5782,5783],{"role":71,"data-label":5648,"data-place":84},"when the catalogue, its copies or the page change",[52,5785,5786,5791,5793,5803],{"role":54},[69,5787,5788],{"role":71,"data-label":5639,"data-place":72},[26,5789,5790],{},"config-reference.yml",[69,5792],{"role":71,"data-label":5642,"data-place":84},[69,5794,5795,5798,5799,5802],{"role":71,"data-label":5645,"data-place":84},[26,5796,5797],{},"docs\u002Fconfiguration.md"," against the settings of the code (",[26,5800,5801],{},"python3 .github\u002Fscripts\u002Fconfig_reference.py"," writes it)",[69,5804,5805],{"role":71,"data-label":5648,"data-place":84},"when code that reads a setting changes",[52,5807,5808,5813,5818,5828],{"role":54},[69,5809,5810],{"role":71,"data-label":5639,"data-place":72},[26,5811,5812],{},"website.yml",[69,5814,5815],{"role":71,"data-label":5642,"data-place":84},[26,5816,5817],{},"Generate and check the site",[69,5819,5820,5821,409,5824,5827],{"role":71,"data-label":5645,"data-place":84},"the site's unit tests, ",[26,5822,5823],{},"npm run generate",[26,5825,5826],{},"npm run check-links"," (every internal link and anchor, and every link to a file of the repository)",[69,5829,5830,5831,29,5834,2460,5837,5839],{"role":71,"data-label":5648,"data-place":84},"when ",[26,5832,5833],{},"docs\u002F",[26,5835,5836],{},"website\u002F",[26,5838,3437],{}," change",[52,5841,5842,5847,5849,5855],{"role":54},[69,5843,5844],{"role":71,"data-label":5639,"data-place":72},[26,5845,5846],{},"release-images.yml",[69,5848],{"role":71,"data-label":5642,"data-place":84},[69,5850,5851,5852,5854],{"role":71,"data-label":5645,"data-place":84},"calls ",[26,5853,5657],{}," on the tag and publishes nothing unless it is green",[69,5856,5857],{"role":71,"data-label":5648,"data-place":84},"a version tag",[17,5859,5860,5861,5863,5864,5867],{},"Not in CI, and said so in ",[26,5862,5657],{},": live BigQuery, Oracle and SQL Server, and the\nend-to-end oracles of ",[26,5865,5866],{},"e2e\u002F"," (they need a whole stack). If you can run them for your\nchange, say so in the pull request.",[139,5869,5871],{"id":5870},"the-checklist","The checklist",[17,5873,5874],{},"Path 1, a transformation:",[144,5876,5879,5902,5917,5925,5942,5957,5972,5991],{"className":5877},[5878],"contains-task-list",[147,5880,5883,5887,5888,29,5890,33,5892,29,5894,5896,5897,5899,5900],{"className":5881},[5882],"task-list-item",[5884,5885],"input",{"disabled":912,"type":5886},"checkbox"," The function is registered on all four registries: ",[26,5889,1221],{},[26,5891,733],{},[26,5893,753],{},[26,5895,779],{},"; names quoted with ",[26,5898,1120],{},", literals with ",[26,5901,1127],{},[147,5903,5905,5907,5908,5910,5911,5913,5914],{"className":5904},[5882],[5884,5906],{"disabled":912,"type":5886}," A hand-computed case in ",[26,5909,309],{}," (all engines), the BigQuery SQL in\n",[26,5912,312],{},", a unit test in ",[26,5915,5916],{},"test_operations.py",[147,5918,5920,5922,5923],{"className":5919},[5882],[5884,5921],{"disabled":912,"type":5886}," The dbt export: a branch (and its tests), or nothing and a test of ",[26,5924,1742],{},[147,5926,5928,5930,5931,5933,5934,5936,5937,5933,5940],{"className":5927},[5882],[5884,5929],{"disabled":912,"type":5886}," The name in ",[26,5932,2163],{}," of ",[26,5935,341],{},", and in\n",[26,5938,5939],{},"TRANSFORMS",[26,5941,391],{},[147,5943,5945,1566,5947,342,5949,5312,5951,409,5953,156,5955],{"className":5944},[5882],[5884,5946],{"disabled":912,"type":5886},[26,5948,2289],{},[26,5950,2483],{},[26,5952,2494],{},[26,5954,2553],{},[26,5956,2278],{},[147,5958,5960,1566,5962,409,5965,5968,5969],{"className":5959},[5882],[5884,5961],{"disabled":912,"type":5886},[26,5963,5964],{},"ops.\u003Cname>",[26,5966,5967],{},"params.\u003Ckey>"," in the five ",[26,5970,5971],{},"frontend\u002Fi18n\u002Flocales\u002F*.ts",[147,5973,5975,1566,5977,214,5979,29,5981,29,5983,5985,5986,3894,5988,5990],{"className":5974},[5882],[5884,5976],{"disabled":912,"type":5886},[26,5978,3133],{},[26,5980,2987],{},[26,5982,2994],{},[26,5984,3107],{},") and ",[26,5987,408],{},[26,5989,412],{}," written again and committed",[147,5992,5994,1566,5996,29,5998,6001,6002],{"className":5993},[5882],[5884,5995],{"disabled":912,"type":5886},[26,5997,5607],{},[26,5999,6000],{},"engine-differences.md"," (the counts), the READMEs' counts, ",[26,6003,431],{},[17,6005,6006],{},"Path 2, a statistical test:",[144,6008,6010,6031,6046,6057,6082],{"className":6009},[5878],[147,6011,6013,6015,6016,6018,6019,409,6022,33,6024,29,6026,29,6028,6030],{"className":6012},[5882],[5884,6014],{"disabled":912,"type":5886}," The entry of ",[26,6017,3710],{}," (and its kinds), the function in ",[26,6020,6021],{},"compute.py",[26,6023,3998],{},[26,6025,4240],{},[26,6027,4305],{},[26,6029,4324],{}," in five languages",[147,6032,6034,1566,6036,29,6039,6042,6043,6045],{"className":6033},[5882],[5884,6035],{"disabled":912,"type":5886},[26,6037,6038],{},"python -m app.engine.stats.catalog",[26,6040,6041],{},"python3 .github\u002Fscripts\u002Fstat_catalog.py",", and\n",[26,6044,4513],{}," green",[147,6047,6049,6051,6052,5968,6055],{"className":6048},[5882],[5884,6050],{"disabled":912,"type":5886}," The words ",[26,6053,6054],{},"stat.*",[26,6056,2717],{},[147,6058,6060,1566,6062,409,6064,5933,6066,6068,6069,6072,6073,6075,6076,6078,6079,6081],{"className":6059},[5882],[5884,6061],{"disabled":912,"type":5886},[26,6063,4395],{},[26,6065,4406],{},[26,6067,4775],{},", the family list of\n",[26,6070,6071],{},"test_stats_catalog.py",", references from outside in ",[26,6074,4729],{},", a case\nin ",[26,6077,4742],{},", the refusals in ",[26,6080,4764],{},", BigQuery's SQL",[147,6083,6085,6087,6088,6090,6091,29,6093,409,6095,6097],{"className":6084},[5882],[5884,6086],{"disabled":912,"type":5886}," The test named in backticks in ",[26,6089,3665],{},", the counts,\n",[26,6092,431],{},[26,6094,408],{},[26,6096,412],{}," written again",[17,6099,6100],{},"Path 3, a statistical model:",[144,6102,6104,6119,6128,6140,6152,6161,6167,6178,6190],{"className":6103},[5878],[147,6105,6107,6015,6109,6111,6112,409,6114,6116,6117,6045],{"className":6106},[5882],[5884,6108],{"disabled":912,"type":5886},[26,6110,5089],{}," (and its kinds, variants, ",[26,6113,4942],{},[26,6115,4945],{},"), the snapshot and its three copies, ",[26,6118,4513],{},[147,6120,6122,1566,6124,6127],{"className":6121},[5882],[5884,6123],{"disabled":912,"type":5886},[26,6125,6126],{},"params_cases.json",": defaults, options and refusals",[147,6129,6131,6133,6134,6136,6137,6139],{"className":6130},[5882],[5884,6132],{"disabled":912,"type":5886}," The group's ",[26,6135,4978],{}," (packages pinned, ",[26,6138,5254],{}," if needed), the runner, the card's schema, reference values computed outside the runner",[147,6141,6143,6145,6146,6148,6149],{"className":6142},[5882],[5884,6144],{"disabled":912,"type":5886}," Verdicts only from a p-value against ",[26,6147,5417],{}," or from a fact; the rest a measure; notes as ",[26,6150,6151],{},"@id name=value",[147,6153,6155,6157,6158,346],{"className":6154},[5882],[5884,6156],{"disabled":912,"type":5886}," The group's ConfigMap under 900 KiB (",[26,6159,6160],{},"go test .\u002Finternal\u002Fmodelgroups\u002F",[147,6162,6164,6166],{"className":6163},[5882],[5884,6165],{"disabled":912,"type":5886}," The layout, its words in five languages, its fixtures from the runner's output",[147,6168,6170,6172,6173,5968,6176],{"className":6169},[5882],[5884,6171],{"disabled":912,"type":5886}," The palette entry, the icon, the words ",[26,6174,6175],{},"models.*",[26,6177,2717],{},[147,6179,6181,1566,6183,6185,6186,409,6188,6097],{"className":6180},[5882],[5884,6182],{"disabled":912,"type":5886},[26,6184,5556],{}," and its tests, ",[26,6187,408],{},[26,6189,412],{},[147,6191,6193,6195,6196,6198,6199],{"className":6192},[5882],[5884,6194],{"disabled":912,"type":5886}," The model's id in backticks in ",[26,6197,5604],{}," with its section and an example, the counts, ",[26,6200,431],{},[17,6202,6203],{},"For all: no name of another product in any text; code, comments, messages and\ndocumentation in English; one change per pull request, with the reason in its description.",[139,6205,6207],{"id":6206},"the-commands","The commands",[17,6209,6210],{},"From the repository's root unless said otherwise. Together they are what CI runs.",[472,6212,6214],{"className":1583,"code":6213,"language":1585,"meta":477,"style":477},"# the interface: types and translations\ncd frontend && npx nuxi prepare && npx -y -p typescript@5.6.3 -p vue-tsc@2.2.10 vue-tsc --noEmit -p .nuxt\u002Ftsconfig.json\ncd frontend && npm test\n\n# the Go gateway (CI also runs gofmt, go vet and the database tests: gateway-go\u002Fscripts\u002Ftest.sh)\ncd gateway-go && go test .\u002Finternal\u002F...\ncd gateway-go && gofmt -l .\n\n# the engine and the gateway, in their development images\ndocker build --build-arg WITH_DEV=true --build-arg WITH_CHDB=true -t tabularia-backend:ci backend\n.github\u002Fscripts\u002Fci_tests.sh engine tabularia-backend:ci\ndocker build --build-arg WITH_DEV=true -t tabularia-gateway:ci gateway\n.github\u002Fscripts\u002Fci_tests.sh gateway tabularia-gateway:ci\n\n# the catalogue of the statistical tests (Path 2)\npython3 .github\u002Fscripts\u002Fstat_catalog.py --check\npython3 .github\u002Fscripts\u002Ftest_stat_catalog.py -v\n\n# the catalogue of the statistical models (Path 3)\npython3 .github\u002Fscripts\u002Fmodel_catalog.py --check\npython3 .github\u002Fscripts\u002Ftest_model_catalog.py -v\ncd gateway-go && go test .\u002Finternal\u002Fmodelgroups\u002F .\u002Finternal\u002Fmodelcatalog\u002F\n\n# the configuration reference, when you touched a setting\npython3 .github\u002Fscripts\u002Fconfig_reference.py\n",[26,6215,6216,6221,6258,6270,6274,6279,6293,6310,6314,6319,6343,6351,6369,6377,6381,6386,6394,6404,6408,6413,6421,6430,6448,6453,6459],{"__ignoreMap":477},[481,6217,6218],{"class":483,"line":484},[481,6219,6220],{"class":525},"# the interface: types and translations\n",[481,6222,6223,6225,6228,6230,6232,6234,6236,6238,6240,6242,6244,6246,6248,6250,6252,6254,6256],{"class":483,"line":502},[481,6224,2225],{"class":515},[481,6226,6227],{"class":495}," frontend",[481,6229,2231],{"class":491},[481,6231,2897],{"class":686},[481,6233,2900],{"class":495},[481,6235,2903],{"class":495},[481,6237,2231],{"class":491},[481,6239,2897],{"class":686},[481,6241,2910],{"class":515},[481,6243,1712],{"class":515},[481,6245,2915],{"class":495},[481,6247,1712],{"class":515},[481,6249,2920],{"class":495},[481,6251,2923],{"class":495},[481,6253,2926],{"class":515},[481,6255,1712],{"class":515},[481,6257,2931],{"class":495},[481,6259,6260,6262,6264,6266,6268],{"class":483,"line":522},[481,6261,2225],{"class":515},[481,6263,6227],{"class":495},[481,6265,2231],{"class":491},[481,6267,2889],{"class":686},[481,6269,2938],{"class":495},[481,6271,6272],{"class":483,"line":529},[481,6273,913],{"emptyLinePlaceholder":912},[481,6275,6276],{"class":483,"line":535},[481,6277,6278],{"class":525},"# the Go gateway (CI also runs gofmt, go vet and the database tests: gateway-go\u002Fscripts\u002Ftest.sh)\n",[481,6280,6281,6283,6285,6287,6289,6291],{"class":483,"line":552},[481,6282,2225],{"class":515},[481,6284,2228],{"class":495},[481,6286,2231],{"class":491},[481,6288,2171],{"class":686},[481,6290,2236],{"class":495},[481,6292,2239],{"class":495},[481,6294,6295,6297,6299,6301,6304,6307],{"class":483,"line":863},[481,6296,2225],{"class":515},[481,6298,2228],{"class":495},[481,6300,2231],{"class":491},[481,6302,6303],{"class":686},"gofmt",[481,6305,6306],{"class":515}," -l",[481,6308,6309],{"class":495}," .\n",[481,6311,6312],{"class":483,"line":909},[481,6313,913],{"emptyLinePlaceholder":912},[481,6315,6316],{"class":483,"line":916},[481,6317,6318],{"class":525},"# the engine and the gateway, in their development images\n",[481,6320,6321,6323,6325,6327,6329,6331,6333,6335,6337,6339,6341],{"class":483,"line":922},[481,6322,1592],{"class":686},[481,6324,1595],{"class":495},[481,6326,1598],{"class":515},[481,6328,1601],{"class":495},[481,6330,1604],{"class":515},[481,6332,1598],{"class":515},[481,6334,1609],{"class":495},[481,6336,1604],{"class":515},[481,6338,1614],{"class":515},[481,6340,1617],{"class":495},[481,6342,1620],{"class":495},[481,6344,6345,6347,6349],{"class":483,"line":933},[481,6346,1625],{"class":686},[481,6348,1628],{"class":495},[481,6350,1631],{"class":495},[481,6352,6353,6355,6357,6359,6361,6363,6365,6367],{"class":483,"line":943},[481,6354,1592],{"class":686},[481,6356,1595],{"class":495},[481,6358,1598],{"class":515},[481,6360,1601],{"class":495},[481,6362,1604],{"class":515},[481,6364,1614],{"class":515},[481,6366,3390],{"class":495},[481,6368,3159],{"class":495},[481,6370,6371,6373,6375],{"class":483,"line":949},[481,6372,1625],{"class":686},[481,6374,3399],{"class":495},[481,6376,3402],{"class":495},[481,6378,6379],{"class":483,"line":962},[481,6380,913],{"emptyLinePlaceholder":912},[481,6382,6383],{"class":483,"line":982},[481,6384,6385],{"class":525},"# the catalogue of the statistical tests (Path 2)\n",[481,6387,6388,6390,6392],{"class":483,"line":1020},[481,6389,4480],{"class":686},[481,6391,4495],{"class":495},[481,6393,4498],{"class":515},[481,6395,6396,6398,6401],{"class":483,"line":1025},[481,6397,4480],{"class":686},[481,6399,6400],{"class":495}," .github\u002Fscripts\u002Ftest_stat_catalog.py",[481,6402,6403],{"class":515}," -v\n",[481,6405,6406],{"class":483,"line":1031},[481,6407,913],{"emptyLinePlaceholder":912},[481,6409,6410],{"class":483,"line":1042},[481,6411,6412],{"class":525},"# the catalogue of the statistical models (Path 3)\n",[481,6414,6415,6417,6419],{"class":483,"line":1051},[481,6416,4480],{"class":686},[481,6418,5195],{"class":495},[481,6420,4498],{"class":515},[481,6422,6423,6425,6428],{"class":483,"line":1064},[481,6424,4480],{"class":686},[481,6426,6427],{"class":495}," .github\u002Fscripts\u002Ftest_model_catalog.py",[481,6429,6403],{"class":515},[481,6431,6432,6434,6436,6438,6440,6442,6445],{"class":483,"line":1084},[481,6433,2225],{"class":515},[481,6435,2228],{"class":495},[481,6437,2231],{"class":491},[481,6439,2171],{"class":686},[481,6441,2236],{"class":495},[481,6443,6444],{"class":495}," .\u002Finternal\u002Fmodelgroups\u002F",[481,6446,6447],{"class":495}," .\u002Finternal\u002Fmodelcatalog\u002F\n",[481,6449,6451],{"class":483,"line":6450},23,[481,6452,913],{"emptyLinePlaceholder":912},[481,6454,6456],{"class":483,"line":6455},24,[481,6457,6458],{"class":525},"# the configuration reference, when you touched a setting\n",[481,6460,6462,6464],{"class":483,"line":6461},25,[481,6463,4480],{"class":686},[481,6465,6466],{"class":495}," .github\u002Fscripts\u002Fconfig_reference.py\n",[17,6468,6469,6470,409,6472,156,6474,6476,6477,6479,6480,6482,6483,3118,6486,6489],{},"The site's own checks (",[26,6471,5823],{},[26,6473,5826],{},[26,6475,5836],{},") run in\nCI when a page of ",[26,6478,5833],{}," changes: a link in this guide to a page that does not exist\nfails them. Link only to pages of ",[26,6481,5833],{}," that are published; the folders ",[26,6484,6485],{},"docs\u002Fspecs\u002F",[26,6487,6488],{},"docs\u002Faudit\u002F"," are not, so name their files in backticks instead.",[6491,6492,6493],"style",{},"html pre.shiki code .s94ky, html code.shiki .s94ky{--shiki-default:#DCBDFB;--shiki-light:#622CBC}html pre.shiki code .s5JDJ, html code.shiki .s5JDJ{--shiki-default:#ADBAC7;--shiki-light:#0E1116}html pre.shiki code .sLsUC, html code.shiki .sLsUC{--shiki-default:#96D0FF;--shiki-light:#032563}html pre.shiki code .ssKa_, html code.shiki .ssKa_{--shiki-default:#F47067;--shiki-light:#A0111F}html pre.shiki code .s6oG4, html code.shiki .s6oG4{--shiki-default:#6CB6FF;--shiki-light:#023B95}html pre.shiki code .sseud, html code.shiki .sseud{--shiki-default:#768390;--shiki-light:#66707B}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html pre.shiki code .sXYdG, html code.shiki .sXYdG{--shiki-default:#F69D50;--shiki-light:#702C00}",{"title":477,"searchDepth":502,"depth":522,"links":6495},[6496,6497,6515,6531,6540,6541,6542],{"id":141,"depth":502,"text":142},{"id":184,"depth":502,"text":89,"children":6498},[6499,6500,6502,6505,6508,6509,6510,6511,6512,6513,6514],{"id":222,"depth":522,"text":223},{"id":441,"depth":522,"text":6501},"Step 1. Polars: backend\u002Fapp\u002Fengine\u002Foperations.py",{"id":700,"depth":522,"text":701,"children":6503},[6504],{"id":1192,"depth":529,"text":1193},{"id":1235,"depth":522,"text":1236,"children":6506},[6507],{"id":1572,"depth":529,"text":1573},{"id":1727,"depth":522,"text":1728},{"id":2148,"depth":522,"text":2149},{"id":2271,"depth":522,"text":2272},{"id":2575,"depth":522,"text":2576},{"id":2727,"depth":522,"text":2728},{"id":2969,"depth":522,"text":2970},{"id":3408,"depth":522,"text":3409},{"id":3464,"depth":502,"text":108,"children":6516},[6517,6518,6520,6521,6523,6525,6526,6528,6529,6530],{"id":3518,"depth":522,"text":223},{"id":3701,"depth":522,"text":6519},"Step 1. The catalogue: backend\u002Fapp\u002Fengine\u002Fstats\u002Fcatalog.py",{"id":3929,"depth":522,"text":3930},{"id":3985,"depth":522,"text":6522},"Step 3. The final computation: stats\u002Fcompute.py",{"id":4290,"depth":522,"text":6524},"Step 4. The report: stats\u002Flayouts.py and stats\u002Freport_texts.json",{"id":4410,"depth":522,"text":4411},{"id":4530,"depth":522,"text":6527},"Step 6. The words: frontend\u002Fi18n\u002Flocales\u002F*.gen.ts",{"id":4714,"depth":522,"text":4715},{"id":4805,"depth":522,"text":4806},{"id":4835,"depth":522,"text":4836},{"id":4888,"depth":502,"text":126,"children":6532},[6533,6534,6535,6536,6537,6538,6539],{"id":4918,"depth":522,"text":223},{"id":5083,"depth":522,"text":5084},{"id":5212,"depth":522,"text":5213},{"id":5381,"depth":522,"text":5382},{"id":5489,"depth":522,"text":5490},{"id":5538,"depth":522,"text":5539},{"id":5578,"depth":522,"text":5579},{"id":5622,"depth":502,"text":5623},{"id":5870,"depth":502,"text":5871},{"id":6206,"depth":502,"text":6207},"A node of the flow editor is an operation the engine knows: filter, group_by,\npivot, stat_t_two_sample. This guide takes you from nothing to a pull request whose\nchecks pass at the first push. It is written for someone who has not read the code before:\nevery step names the file, shows a few lines of the real code to copy the shape of, the\ntest to write and the command that runs it.","md",{"source":6546},"docs\u002Fcontributing\u002Fadding-a-node.md","\u002Fdocs\u002Fcontributing\u002Fadding-a-node",{"title":5,"description":6543},"docs\u002Fcontributing\u002Fadding-a-node","jJkVnVvc010VUaioC1R84_8zVWC9qTyRYeW12ZHphEM",[6552,6574,6640,6659,6688,6717,6749,6775,6801],{"title":6553,"icon":6554,"intro":6555,"items":6556},"Getting started","start","Install it on one machine, learn the few ideas everything else is built on, and run a first flow.",[6557,6559,6562,6565,6568,6571],{"path":6558,"title":6553},"\u002Fdocs\u002Fgetting-started",{"path":6560,"title":6561},"\u002Fdocs\u002Fgetting-started-docker-compose","Walkthrough with Docker Compose",{"path":6563,"title":6564},"\u002Fdocs\u002Fdeploy\u002Fminikube","Try it on your computer (minikube)",{"path":6566,"title":6567},"\u002Fdocs\u002Fconcepts","Concepts",{"path":6569,"title":6570},"\u002Fdocs\u002Fhow-it-works","How it works",{"path":6572,"title":6573},"\u002Fdocs\u002Foverview","Overview (README)",{"title":6575,"icon":6576,"intro":6577,"items":6578},"Capabilities","capabilities","What you can build: visual flows, analysis on any step, AI questions, pixel-perfect reports, dashboards, Python, R and SQL scripts, containers and the orchestration that ties them together.",[6579,6582,6585,6588,6591,6594,6597,6600,6603,6606,6609,6612,6615,6618,6621,6624,6627,6630,6633,6636,6639],{"path":6580,"title":6581},"\u002Fdocs\u002Fcapabilities","All capabilities",{"path":6583,"title":6584},"\u002Fdocs\u002Fcapabilities\u002Fhome","The home page",{"path":6586,"title":6587},"\u002Fdocs\u002Fcapabilities\u002Fflows","Low-code flows",{"path":6589,"title":6590},"\u002Fdocs\u002Fcapabilities\u002Fpreview-and-analysis","Preview and analysis",{"path":6592,"title":6593},"\u002Fdocs\u002Fcapabilities\u002Flineage","Lineage",{"path":6595,"title":6596},"\u002Fdocs\u002Fcapabilities\u002Fask-your-data","Ask your data with AI",{"path":6598,"title":6599},"\u002Fdocs\u002Fcapabilities\u002Freports","Pixel-perfect reports",{"path":6601,"title":6602},"\u002Fdocs\u002Fcapabilities\u002Freport-functions","Report functions",{"path":6604,"title":6605},"\u002Fdocs\u002Fcapabilities\u002Fdashboards","Dashboards",{"path":6607,"title":6608},"\u002Fdocs\u002Fcapabilities\u002Fshare-links","Share links",{"path":6610,"title":6611},"\u002Fdocs\u002Fscripting","Python and R",{"path":6613,"title":6614},"\u002Fdocs\u002Fsql-scripts","SQL scripts",{"path":6616,"title":6617},"\u002Fdocs\u002Fdata-apis","Data APIs",{"path":6619,"title":6620},"\u002Fdocs\u002Fcapabilities\u002Fnotebooks","marimo notebooks as apps",{"path":6622,"title":6623},"\u002Fdocs\u002Fcontainer-node","Docker images in flows",{"path":6625,"title":6626},"\u002Fdocs\u002Fcapabilities\u002Fflow-groups","Flow groups: orchestration",{"path":6628,"title":6629},"\u002Fdocs\u002Fcapabilities\u002Fscheduling","Scheduling",{"path":6631,"title":6632},"\u002Fdocs\u002Fpushmail","Pushmail: datasources, reports and dashboards by email",{"path":6634,"title":6635},"\u002Fdocs\u002Fplaceholders","Dynamic dates",{"path":6637,"title":6638},"\u002Fdocs\u002Fcapabilities\u002Fengines","Engines",{"path":135,"title":136},{"title":101,"icon":6641,"intro":6642,"items":6643},"statistics","Hypothesis tests on every engine and statistical models on Kubernetes: regression, survival, time series, experiments, customer lifetime and forecasting, each with a report that explains its method.",[6644,6647,6649,6650,6653,6656],{"path":6645,"title":6646},"\u002Fdocs\u002Fcapabilities\u002Fstatistics-overview","Statistics: the whole picture",{"path":3478,"title":6648},"Hypothesis tests",{"path":4902,"title":4903},{"path":6651,"title":6652},"\u002Fdocs\u002Fcapabilities\u002Fbayesian-models","Bayesian models",{"path":6654,"title":6655},"\u002Fdocs\u002Fconnections\u002Fmlflow","MLflow connections",{"path":6657,"title":6658},"\u002Fdocs\u002Flicences","Licences of the components",{"title":6660,"icon":6661,"intro":6662,"items":6663},"Sources","sources","Every way data comes in: files, databases, buckets, SFTP folders, HTTP APIs, SharePoint, Google Sheets, and the results of your own flows.",[6664,6667,6670,6673,6676,6679,6682,6685],{"path":6665,"title":6666},"\u002Fdocs\u002Fsources","All sources",{"path":6668,"title":6669},"\u002Fdocs\u002Fsources\u002Ffiles","Uploaded files",{"path":6671,"title":6672},"\u002Fdocs\u002Fsources\u002Fdatabases","Database tables and queries",{"path":6674,"title":6675},"\u002Fdocs\u002Fs3-datasource","S3 buckets",{"path":6677,"title":6678},"\u002Fdocs\u002Fapi-datasource","HTTP APIs",{"path":6680,"title":6681},"\u002Fdocs\u002Fsources\u002Fsharepoint","Excel on SharePoint",{"path":6683,"title":6684},"\u002Fdocs\u002Fsources\u002Fgoogle-sheets","Google Sheets",{"path":6686,"title":6687},"\u002Fdocs\u002Fsources\u002Fflow-outputs","Results of flows and scripts",{"title":6689,"icon":6690,"intro":6691,"items":6692},"Connections","connections","The systems Tabularia reads from and writes to, how each connection is set up, and who may use it.",[6693,6696,6699,6702,6705,6708,6711,6714],{"path":6694,"title":6695},"\u002Fdocs\u002Fconnections","All connections",{"path":6697,"title":6698},"\u002Fdocs\u002Fconnections\u002Fdatabases","Databases",{"path":6700,"title":6701},"\u002Fdocs\u002Fsqlserver","Microsoft SQL Server driver",{"path":6703,"title":6704},"\u002Fdocs\u002Fconnections\u002Fs3","S3 and compatible storage",{"path":6706,"title":6707},"\u002Fdocs\u002Fsftp","SFTP: files in and out",{"path":6709,"title":6710},"\u002Fdocs\u002Fconnections\u002Fsmtp","SMTP email",{"path":6712,"title":6713},"\u002Fdocs\u002Fcontainer-registries","Container registries",{"path":6715,"title":6716},"\u002Fdocs\u002Fconnections\u002Fdestinations","Writing data out",{"title":6718,"icon":6719,"intro":6720,"items":6721},"Integrations","integrations","How Tabularia fits your stack: AI providers, the REST API and webhooks, dbt, OpenLineage, single sign-on, SIEM and monitoring.",[6722,6725,6728,6731,6734,6737,6740,6743,6746],{"path":6723,"title":6724},"\u002Fdocs\u002Fintegrations","All integrations",{"path":6726,"title":6727},"\u002Fdocs\u002Fintegrations\u002Fai","AI: where it is used",{"path":6729,"title":6730},"\u002Fdocs\u002Fapi","API, tokens and webhooks",{"path":6732,"title":6733},"\u002Fdocs\u002Fintegrations\u002Fmcp","MCP: agents outside Tabularia",{"path":6735,"title":6736},"\u002Fdocs\u002Fdbt-export","Export to dbt",{"path":6738,"title":6739},"\u002Fdocs\u002Fopenlineage","OpenLineage",{"path":6741,"title":6742},"\u002Fdocs\u002Fsso-keycloak","Single sign-on with Keycloak",{"path":6744,"title":6745},"\u002Fdocs\u002Fsiem-splunk","Audit log to Splunk",{"path":6747,"title":6748},"\u002Fdocs\u002Fintegrations\u002Fmonitoring","Monitoring",{"title":6750,"icon":6751,"intro":6752,"items":6753},"Security & governance","governance","Who may see and do what, what is recorded, and how data quality and personal data are kept in check.",[6754,6757,6760,6763,6766,6769,6772],{"path":6755,"title":6756},"\u002Fdocs\u002Fgovernance","Overview",{"path":6758,"title":6759},"\u002Fdocs\u002Fgovernance\u002Fpermissions","Permissions",{"path":6761,"title":6762},"\u002Fdocs\u002Fgovernance\u002Faudit-log","Audit log",{"path":6764,"title":6765},"\u002Fdocs\u002Fgovernance\u002Fdata-contracts","Data contracts",{"path":6767,"title":6768},"\u002Fdocs\u002Fdesign\u002Fsso-group-mapping","SSO and group mapping",{"path":6770,"title":6771},"\u002Fdocs\u002Fexamples\u002Fkeycloak","Keycloak example on a laptop",{"path":6773,"title":6774},"\u002Fdocs\u002Fengines\u002Fclickhouse-ai-user","A ClickHouse user for the AI assistant",{"title":6776,"icon":6777,"intro":6778,"items":6779},"Install & operate","operate","Run it in production on Kubernetes, configure it, upgrade it and keep it healthy.",[6780,6783,6786,6789,6792,6795,6798],{"path":6781,"title":6782},"\u002Fdocs\u002Fdeploy\u002Fkubernetes","Kubernetes and Helm",{"path":6784,"title":6785},"\u002Fdocs\u002Fdeploy\u002Fkind","A company-like cluster on one computer (kind)",{"path":6787,"title":6788},"\u002Fdocs\u002Fdeploy\u002Fupgrading","Upgrading, backups and restore",{"path":6790,"title":6791},"\u002Fdocs\u002Fdeploy\u002Frelease-checklist","Install and upgrade checklist",{"path":6793,"title":6794},"\u002Fdocs\u002Fconfiguration","Configuration reference",{"path":6796,"title":6797},"\u002Fdocs\u002Fengine-settings","Settings from the panel",{"path":6799,"title":6800},"\u002Fdocs\u002Fdatabase-migrations","Database migrations",{"title":6802,"icon":6803,"intro":6804,"items":6805},"Reference","reference","Release process and the remaining reference pages.",[6806,6809,6812],{"path":6807,"title":6808},"\u002Fdocs\u002Flts","Long-term support",{"path":6810,"title":6811},"\u002Fdocs\u002Frelease-process","Release process",{"path":6547,"title":5},1795854764355]