Repository navigation
Commit 74fcac8
authored
refactor: port CLI commands, progress and output, rules pieces and cursor arithmetic to the native extension (#1101)
* refactor: write and decode integration-result records natively
* chore: update the Python boundary ratchet
* refactor(cli): project lifecycle progress and render progress text natively
Move the lifecycle progress projector, the connection and planning progress
reporters, the verbose inspection writer, execution headers and SQL
expectation rows into the native extension and delete the Python they
replace.
* chore: update the Python boundary ratchet
* refactor(cli): run sqb scope natively
Load the offline scope index, qualify bare targets, run the scope query and
render its text in Rust, route sqb scope to the native handler, and delete
the Python command, target and output modules.
* refactor(lint): scan, lint and format DSL headers natively
Header scanning, body ranges, the header lint rules (parse, description
presence and length, trailing whitespace) and the header formatting fixes
(whitespace, leading-comment relocation, description and audit wrapping)
run natively in sqlbuild-rules, reproducing Python's textwrap and string
semantics. Header values are still parsed by parse_header_values. Delete
the Python header scanner and native header rules.
* refactor(rules): render rules results and duplicate-literal hints natively
Rules result text and JSON rendering and the SQBRSQL044 duplicate-literal
hints run natively in sqlbuild-rules, with PurePosixPath ordering and
json.dumps output reproduced exactly. Delete the Python implementations.
* chore: update the Python boundary ratchet
* refactor: store and report run costs and shared CLI text natively
* chore: drop the duplicate section style and update the Python boundary ratchet
* refactor(cli): run sqb lineage natively
Select relation and column lineage, read and write the structural cache,
and render tree, list and JSON output in Rust, route sqb lineage to the
native handler, resolve rename and move targets with the native target
reader, and delete the Python lineage command, selection, cache and output
modules.
* chore: update the Python boundary ratchet
* refactor: create playgrounds and install skills natively
* chore: update the Python boundary ratchet
* refactor(cli): run sqb rename and sqb mv natively
Read the target, build planner facts and the declaration placement host,
plan, stage, verify, migrate and commit in Rust, render the edit tree,
the layer-move suggestion and the JSON report natively, route rename and
mv to the native handler, and delete the Python command, facts, output,
target and plan-decoding modules. The offline compile stays in Python.
* chore: update the Python boundary ratchet
* refactor(cli): run sqb janitor natively
Resolve the invocation and settings, render the plan preview, --as
preview framing, confirmation prompt and completion summary in Rust, and
route sqb janitor to the native handler. Compilation, warehouse
connection, planning and cleanup stay in the Python janitor runtime.
* refactor(rules): read custom-rule evidence natively
Custom-rule import closures, implementation fingerprints and statically
associated harness test cases are read natively with the CPython-mirrored
ruff tree in sqlbuild-pysource. Loading and running custom rules stays in
Python. Delete the Python evidence module.
* refactor(spec): read typed config values natively
The typed authored-config readers (string, boolean, integer, string tuple
and cursor bound) run natively and raise the same ConfigValueTypeError.
Delete the Python helper and its five public wrappers; callers import the
readers from sqlbuild._native.
* style: satisfy clippy and fensu in custom-rule evidence source reading
* chore: update the Python boundary ratchet
* refactor: move sqb debug into the native extension
* refactor: move command connection and warehouse resolution into the native extension
* refactor(cli): run sqb freshness natively
* chore: drop a module the freshness port deleted and update the Python boundary ratchet
* refactor(cursor): run the cursor algebra natively
Cursor parsing, rendering, comparison, grain flooring and stepping,
observed partitions, interval clamping, merging, batch splitting, caps,
interval validation and calendar durations run in the new plain-Rust
sqlbuild-cursor crate with thin bindings. Python datetime objects stay at
the boundary: results keep the input's datetime type and tzinfo, fixed
offsets are computed natively and other zones are resolved through the
input tzinfo. The cursor value models, sentinels and grain constants stay
in Python; callers import the functions from sqlbuild._native.
* style: satisfy clippy in integer cursor text parsing
* chore: update the Python boundary ratchet
* test: raise the native lineage memory budget1 parent a3c431c commit 74fcac8
817 files changed
Lines changed: 29455 additions & 17276 deletions
File tree
- crates
- sqlbuild-analysis/src
- lineage_command
- _helpers
- main
- tests
- sqlbuild-cli/src/dispatch
- sqlbuild-config/src
- command_connection
- _helpers
- main
- tests
- workspace
- _helpers
- main
- tests
- sqlbuild-core/src
- cli_text
- _helpers
- main
- cost_report
- _helpers
- main
- tests
- debug_report
- main
- tests
- freshness_text
- _helpers
- main
- tests
- integration_results
- _helpers
- main
- tests
- janitor_text
- _helpers
- main
- tests
- progress
- _helpers
- main
- tests
- sqlbuild-cursor
- src
- algebra
- _helpers
- main
- tests
- sqlbuild-pysource/src
- rule_evidence
- _helpers
- main
- tests
- sqlbuild-python
- src/bindings
- _helpers
- cli
- command_runtime
- cost_report
- cursor
- debug_command
- freshness
- janitor
- lineage
- model_config
- plan_output
- presentation_text
- refactor
- result_output
- rules
- scopes
- workspace_commands
- main
- sqlbuild-refactor/src
- refactor_command
- _helpers
- main
- tests
- sqlbuild-rules/src
- dsl_headers
- _helpers
- main
- tests
- rule_results
- _helpers
- main
- tests
- sqlbuild-scopes/src
- scope_text
- _helpers
- main
- tests
- scripts/setting_help
- src/sqlbuild
- cli
- commands
- _helpers
- audit
- build_execution
- build_planning
- check
- clone
- contract
- cost
- dbt_init
- dbt
- debug
- diff
- entry
- freshness
- janitor_output
- janitor_runtime
- lineage
- load
- plan
- playground
- refactor
- runtime
- scenario_capture
- scenario_execution
- scenario_output
- scope
- seed
- skills
- test
- classes
- main
- dbt
- execution
- inspection
- project
- state
- workspace
- output
- _helpers
- classes
- progress
- classes
- main
- compiler
- planner
- _helpers
- changes
- migrations
- output
- resolve
- sql_tests
- warehouse
- main
- execution
- pre_build
- selection
- refactoring
- cost
- _helpers
- classes
- cursor_algebra
- _helpers
- main
- executor
- clone/_helpers
- diff/_helpers
- load/_helpers
- pipeline/_helpers
- run
- _helpers
- materializations
- validation
- integrations
- dagster
- _helpers
- classes
- dbt/_helpers
- pipeline
- planning
- runtime
- lint
- _helpers
- main
- microbatches
- _helpers
- main
- playground_templates
- dagster
- loader_waffle_shop
- hooks
- python
- sql
- models
- python/loaders
- sources
- python_nodes
- hooks
- python
- sql
- models
- python
- assets
- checks
- loaders
- tasks
- sources
- rivers
- waffle_shop
- functions/sql
- hooks
- python
- sql
- macros
- materializations
- models
- intermediate
- marts
- _sqlbuild
- _audits/generic
- _macros
- staging
- python/loaders
- seeds
- sources
- tests
- scenarios
- unit
- presentation
- _helpers
- classes
- main
- rule_engine
- _helpers
- engine
- guidance
- run
- main
- spec/contracts
- _helpers
- main
- tests
- e2e/src/sqlbuild
- cli/commands/main
- compile
- playground
- skills
- integrations
- dagster
- rivers
- integration/src/sqlbuild
- cli
- commands
- _helpers/refactor
- main
- output
- executor/run/microbatch
- unit/src/sqlbuild
- adapters/snowflake
- cli
- commands
- _helpers
- build_execution
- check
- cost
- debug
- freshness
- janitor_output
- lineage
- refactor
- runtime
- scenario_execution
- scope
- main
- dbt
- entry
- execution
- inspection/cost
- janitor
- playground
- scope
- skills
- output
- _helpers
- classes
- progress
- classes
- main
- verbose_inspection_output
- compiler/planner
- _helpers
- resolve
- warehouse
- main
- cost
- cursor_algebra/main
- executor
- build/_helpers
- load
- python_nodes/_helpers
- run/_helpers
- integrations/dagster
- lint/_helpers
- microbatches
- presentation
- classes
- main
- rule_engine/_helpers/engine
- spec/contracts/_helpers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
0 commit comments