Skip to content

Standardize orthogonal CI buckets and reusable notebook checker #205

Description

@acgetchell

Goal

Align causal-triangulations with the shared validation shape: just ci should be the GitHub-equivalent flat union of leaf validators, and notebook validation should keep the current strong behavior while moving more logic into a reusable checker CLI.

Deliverables

  • Make just ci compose leaf validators directly instead of depending on broad nested bundles.
  • Keep focused changed-surface validators for local work: docs/config/Python/notebooks/core Rust/unit tests/doctests/integration tests/benchmarks/examples.
  • Keep test-unit, test-doc, and test-integration as focused recipes for local or changed-surface validation.
  • Add a broad Rust CI nextest bucket, for example test-rust-ci, that runs lib unit tests and integration tests together with cargo nextest run --release --profile ci --lib --tests.
  • Wire just test-rust and just ci through test-rust-ci plus the separate doctest bucket, rather than compiling unit tests in the default profile and integration tests again in release.
  • Keep doctests as their own bucket because cargo test --doc is not covered by nextest.
  • Keep broad all-target Clippy sweeps as optional manual recipes outside just ci if they duplicate tests/examples/benches that have their own validators.
  • Document the fast-cycle guidance: run the smallest changed test/doctest/integration crate first; compose focused buckets once for final non-core changes; run full just ci for core Rust or GitHub-equivalent validation.

Keep from the current notebook workflow

causal-triangulations already has the right notebook behavior:

  • source notebooks must not commit outputs or execution counts
  • notebook code is linted/type-checked after extraction
  • fast notebooks execute headlessly in CI
  • executed notebooks/artifacts are written under target/notebooks
  • slow notebooks stay in an explicit notebook-check-slow bucket

Standardize

  • Move output hygiene, JSON validation, cell compilation, extracted-code Ruff/ty checks, and diagnostics into a reusable scripts/notebook_check.py CLI.
  • Keep Just recipes responsible for launch/headless execution policy: notebook, notebook-lint, notebook-check, notebook-check-slow, notebook-clear-outputs-all.
  • Make just ci compose leaf validators directly rather than depending on broad nested bundles that may duplicate target classes.

Desired validation buckets

  • GitHub Actions
  • Markdown
  • TOML
  • YAML/CFF
  • Python
  • notebooks
  • core Rust
  • Rust focused tests: unit, doctest, integration recipes for changed-surface validation
  • Rust broad CI tests: one release-profile nextest bucket for lib unit + integration tests, plus separate doctests
  • benchmark harness compile
  • examples

CI shape

Broad all-target Clippy sweeps can remain as optional manual recipes, but should not make just ci compile tests/examples/benches before their own validators run. Avoid the debug-plus-release Rust test split in broad CI: --lib and --tests select different target classes, but running them in different profiles recompiles the library twice. For scientific correctness and less duplicate compilation, broad Rust CI should use one release-profile nextest pass for lib unit + integration tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions