You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit de6301b
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: move the shared runtime of the Python bindings into sqlbuild-python-base
The native store, compile context, diagnostics, progress and terminal text,
warehouse access, orchestration reads and the other infra-layer helper modules
move into the base crate, one area per helper bucket. sqlbuild-python imports
their entry points directly; the extension module surface is unchanged.
Copy file name to clipboardExpand all lines: crates/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ tested and benchmarked with `cargo test` alone.
28
28
|`sqlbuild-refactor`| Native rename/move plans, contract-adoption edits, MODEL/SCHEMA/YAML text edits and atomic staging/commit with rollback. Shared scope placement delegates to the native scope implementation; user Python source inspection remains at the Python AST boundary. |
29
29
|`sqlbuild-project`| The compiled project as plain Rust: `CompiledProject` with the producers' facts and each resource's records (model inputs and schemas, compiled models and their analysis, sources, functions, audits and seeds), and what those records answer without Python, such as lineage rows, resolved namespaces and dependency keys. Values the host owns, such as user config and discovered files, and the views it builds lazily live in one slot per record, whose types `sqlbuild-python` supplies through the `ProjectHost` trait; reads that need Python stay in the bindings as extension traits. |
30
30
|`sqlbuild-cli`| The `sqb` and `sqlbuild` executables: `--version`, unchanged compiles replayed from the shared reuse store with Python's exact streams, exit code and compute log capture, and a handoff of every other invocation to the installed `sqlbuild-python` script. Built as its own wheel (`crates/sqlbuild-cli/pyproject.toml`). |
31
-
|`sqlbuild-python-base`| The base of the PyO3 bindings: native record, enum and error classes with their specs, registration, construction and field reads; keyword calls, imports, conversions and panics at the Python boundary; host entry calls; and the process allocator. |
31
+
|`sqlbuild-python-base`| The base of the PyO3 bindings: native record, enum and error classes with their specs, registration, construction and field reads; keyword calls, imports, conversions and panics at the Python boundary; host entry calls; the process allocator; and the shared runtime the binding modules build on: the native store, compile context, diagnostics, progress and terminal text, warehouse access and orchestration reads. |
32
32
|`sqlbuild-python`| The `_native` module: its Python classes and functions and the conversions from Python objects, on top of `sqlbuild-python-base`. |
33
33
34
34
## Layering
@@ -67,7 +67,7 @@ entry carries a version other than its manifest's.
67
67
`main/` entry points, `models.rs`, `types.rs` and `constants.rs`, not through `_helpers/`.
68
68
69
69
Inside `sqlbuild-python`, the custom rule XSB075 orders the `bindings/_helpers` modules in layers
70
-
that follow the planned crate split: shared Python plumbing (`infra`, part of which is already
70
+
that follow the planned crate split: shared Python plumbing (`infra`, which is almost all in
71
71
`sqlbuild-python-base`, which Cargo keeps below every other layer), then the glue of the lower
72
72
crates (`front`), the compiled project (`project`), planning and compilation as siblings (`plan`,
73
73
`compile`), command output (`output`), command handlers (`commands`) and registration
@@ -89,7 +89,7 @@ empty: every import points down, and a new upward import fails the check.
89
89
- module paths are never built at runtime: a `format!` or `concat!` template may not start with
90
90
`sqlbuild.` or with a `{..PACKAGE..}.`/`{..MODULE..}.` constant. Write the complete module
91
91
path as a constant instead;
92
-
- every row of the host table (`bindings/_helpers/native_host/`) must resolve as an attribute of
92
+
- every row of the host table (`entries` in `sqlbuild-host`) must resolve as an attribute of
93
93
`sqlbuild._native_host`.
94
94
95
95
Staying-Python entry points (adapter, user code, executor and runtime, third-party and public
0 commit comments