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
docs: pull guide snippets from runnable, CI-tested example scripts
Previously every ```python fence in the guide was inline text. `zensical
build` only renders those fences, so a snippet that went stale against the
API would render fine while being broken — the guide's code was never
executed.
Move each snippet into a runnable script under examples/guide/ and include
it into the page with pymdownx.snippets (`--8<-- "examples/guide/<page>.py:
<section>"`), mirroring the substrait-java approach. Then:
- Enable pymdownx.snippets in zensical.toml with check_paths=true, so a bad
include path or section name fails the docs build.
- Add tests/docs/test_guide_snippets.py, which executes every
examples/guide/*.py end to end. Snippets that build a DataFrame call
.to_plan(), so the test validates plan construction *and* resolution;
this surfaced and fixed several previously-broken examples (e.g. joins
referencing non-existent columns).
- Document the convention in CONTRIBUTING.md.
- The two engine-handoff snippets (DuckDB/ADBC tabs) stay inline: they need
network + an external engine and are exercised by examples/{duckdb,adbc}_
example.py (run by example.yml). Also add dataframe_example.py to that
workflow's matrix (it was omitted).
0 commit comments