Skip to content

feat(cli)!: add notebook-backed artifact workflows#508

Merged
acgetchell merged 3 commits into
mainfrom
feat/188-cli-notebook-quickstart
Jul 5, 2026
Merged

feat(cli)!: add notebook-backed artifact workflows#508
acgetchell merged 3 commits into
mainfrom
feat/188-cli-notebook-quickstart

Conversation

@acgetchell

Copy link
Copy Markdown
Owner

Closes #188

  • Add the opt-in delaunay binary for triangulation, convex-hull, validation-demo, and Pachner stress JSON/CSV artifact generation.
  • Add Jupyter quickstart, validation visualization, and Pachner stress notebooks that render README imagery and Parquet-backed telemetry under target/notebooks.
  • Package the active docs, notebooks, and README hero asset for Cargo consumers, and align validation docs on valid affine realization terminology.
  • Add notebook Semgrep guardrails and CLI integration coverage for subcommands, artifact outputs, invalid arguments, and unsupported topology flags.
  • Implement spherical unit-sphere canonicalization for finite nonzero coordinates.

BREAKING CHANGE: GlobalTopology::model is now crate-private, and ToroidalModel::try_new was removed. Construct ToroidalDomain with ToroidalDomain::try_new and pass it to ToroidalModel::new instead.

Closes #188

- Add the opt-in `delaunay` binary for triangulation, convex-hull,
  validation-demo, and Pachner stress JSON/CSV artifact generation.
- Add Jupyter quickstart, validation visualization, and Pachner stress notebooks that render README imagery and Parquet-backed telemetry under `target/notebooks`.
- Package the active docs, notebooks, and README hero asset for Cargo consumers, and align validation docs on valid affine realization terminology.
- Add notebook Semgrep guardrails and CLI integration coverage for subcommands, artifact outputs, invalid arguments, and unsupported topology flags.
- Implement spherical unit-sphere canonicalization for finite nonzero coordinates.

BREAKING CHANGE: `GlobalTopology::model` is now crate-private, and
`ToroidalModel::try_new` was removed. Construct `ToroidalDomain` with `ToroidalDomain::try_new` and pass it to `ToroidalModel::new` instead.
@acgetchell acgetchell self-assigned this Jul 5, 2026
@acgetchell
acgetchell enabled auto-merge (squash) July 5, 2026 05:26
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 43530799-393b-48d2-9716-b40fdccaec2f

📥 Commits

Reviewing files that changed from the base of the PR and between dc90a19 and 4e6dcdb.

📒 Files selected for processing (1)
  • tests/benchmark_flip_fixtures.rs

Walkthrough

This PR adds an opt-in delaunay CLI and stress workflow, implements spherical unit-sphere projection, expands notebook-driven validation flows, and renames Level 4 validation terminology to “valid affine realization” across code and docs.

Changes

CLI, stress workflow, and notebook tooling

Layer / File(s) Summary
CLI surface and validation
Cargo.toml, src/config.rs, src/main.rs, tests/cli.rs
Adds the opt-in CLI binary, command parsing/validation, CLI errors, and integration coverage for generate, validation-demo, and pachner-stress.
Pachner-stress execution and benchmarks
benches/pachner_stress.rs, justfile, benches/README.md, docs/dev/commands.md, docs/dev/debug_env_vars.md, scripts/README.md
Reworks Pachner-stress recipes, telemetry, benchmark wiring, and the surrounding command/debug documentation.
Notebook workflows and hygiene
notebooks/*.ipynb, semgrep.yaml, tests/semgrep/notebooks/*, justfile, README.md, docs/dev/commands.md, scripts/README.md, .gitignore
Adds notebook flows, notebook reset/output handling, notebook hygiene rules, and docs for notebook-driven workflows and artifact locations.

Topology and validation wording

Layer / File(s) Summary
Spherical projection and model errors
src/topology/spaces/spherical.rs, src/topology/traits/global_topology_model.rs, src/topology/traits/topological_space.rs, src/delaunay/builder.rs, tests/prelude_exports.rs
Implements unit-sphere canonicalization and updates topology model behavior, errors, and tests.
Valid affine realization terminology
CITATION.cff, README.md, docs/api_design.md, docs/invariants.md, docs/limitations.md, docs/roadmap.md, docs/topology.md, docs/validation.md, docs/workflows.md, src/core/*, src/lib.rs
Renames Level 4 “faithful embedding” wording to “valid affine realization” across docs and crate commentary.

Rust docs and misc cleanup

Layer / File(s) Summary
Rust docs split and guidance
AGENTS.md, docs/dev/README.md, docs/dev/rust.md, docs/dev/rust/reference.md
Moves detailed Rust policy into a new reference document and turns docs/dev/rust.md into an index.
Typing and ignore updates
scripts/benchmark_utils.py, scripts/postprocess_changelog.py, scripts/tests/*, .gitignore
Updates type-alias syntax, notebook lint coverage, and ignore patterns for notebook artifacts.

Estimated code review effort: 5 (Critical) | ~150 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Notebook
  participant DelaunayCLI
  participant FileSystem
  participant Polars
  Notebook->>DelaunayCLI: run pachner-stress cases
  DelaunayCLI->>FileSystem: write progress.csv and summary.json
  Notebook->>FileSystem: load artifacts
  Notebook->>Polars: normalize telemetry
  Polars-->>Notebook: summary and progress tables
Loading

Possibly related issues

Possibly related PRs

Suggested labels: documentation, enhancement, rust, breaking change, geometry, api, topology

Poem

A rabbit hops on unit spheres,
With notebook plots and CLI gears.
The stress runs hum, the docs align,
And “valid affine” now marks the line.
Hop-hop, the topology glows bright 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR bundles large unrelated CLI, notebook, docs, packaging, and Semgrep changes beyond the spherical normalization issue #188. Split the notebook/CLI/docs/packaging work into separate PRs or expand the linked scope; keep this PR focused on SphericalSpace normalization and tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main notebook-backed artifact workflow and CLI additions.
Description check ✅ Passed The description is clearly related to the PR and mentions the CLI, notebooks, docs, Semgrep rules, and spherical normalization.
Linked Issues check ✅ Passed The spherical helper now normalizes finite nonzero coordinates onto the unit sphere, and tests cover zero and near-zero vectors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/188-cli-notebook-quickstart

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Jul 5, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 332 complexity

Metric Results
Complexity 332

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.03% coverage variation

Metric Results
Coverage variation +0.03% coverage variation (-1.00%)
Diff coverage 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (bc53e32) 78537 71617 91.19%
Head commit (4e6dcdb) 78696 (+159) 71784 (+167) 91.22% (+0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#508) 206 206 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot added api breaking change documentation Improvements or additions to documentation enhancement New feature or request geometry Geometry-related issues rust Pull requests that update rust code topology labels Jul 5, 2026
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.19%. Comparing base (bc53e32) to head (4e6dcdb).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
+ Coverage   91.16%   91.19%   +0.02%     
==========================================
  Files          87       87              
  Lines       78316    78475     +159     
==========================================
+ Hits        71398    71565     +167     
+ Misses       6918     6910       -8     
Flag Coverage Δ
unittests 91.19% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/dev/rust/reference.md`:
- Around line 1052-1069: Update the API Stability guidance in reference.md to
match the crate’s pre-1.0 policy: in the relevant section, change the advice
away from preserving public APIs and adding #[deprecated] migration shims, and
instead state that intentional breaking changes to public types/functions are
acceptable until v1.0.0. Make sure this aligns with the existing Constructor
Naming guidance and the behavior reflected by GlobalTopology::model and
ToroidalModel::try_new, explicitly discouraging deprecated compatibility
aliases, re-exports, or shim functions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 878d2e76-8d15-4f95-8a13-5fde0868cc23

📥 Commits

Reviewing files that changed from the base of the PR and between bc53e32 and 7e685e9.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • docs/images/delaunay_3d_readme.png is excluded by !**/*.png
📒 Files selected for processing (44)
  • .gitignore
  • AGENTS.md
  • CITATION.cff
  • Cargo.toml
  • README.md
  • benches/README.md
  • benches/pachner_stress.rs
  • docs/api_design.md
  • docs/dev/README.md
  • docs/dev/commands.md
  • docs/dev/debug_env_vars.md
  • docs/dev/rust.md
  • docs/dev/rust/reference.md
  • docs/invariants.md
  • docs/limitations.md
  • docs/roadmap.md
  • docs/topology.md
  • docs/validation.md
  • docs/workflows.md
  • justfile
  • notebooks/00_quickstart.ipynb
  • notebooks/01_validation_check_visualization.ipynb
  • notebooks/02_pachner_stress_cli.ipynb
  • notebooks/nonfaithful_embedding.ipynb
  • scripts/README.md
  • scripts/benchmark_utils.py
  • scripts/postprocess_changelog.py
  • scripts/tests/test_notebook_check.py
  • scripts/tests/test_tag_release.py
  • semgrep.yaml
  • src/config.rs
  • src/core/embedding.rs
  • src/core/tds/storage.rs
  • src/core/tds/validation.rs
  • src/core/validation.rs
  • src/delaunay/builder.rs
  • src/lib.rs
  • src/main.rs
  • src/topology/spaces/spherical.rs
  • src/topology/traits/global_topology_model.rs
  • src/topology/traits/topological_space.rs
  • tests/cli.rs
  • tests/prelude_exports.rs
  • tests/semgrep/notebooks/notebook_structure.ipynb
💤 Files with no reviewable changes (2)
  • scripts/tests/test_tag_release.py
  • notebooks/nonfaithful_embedding.ipynb

Comment thread docs/dev/rust/reference.md
- Add `just notebook-reset-from-git` for restoring tracked source notebooks from the Git index or an explicit tree.
- Ignore standard Jupyter checkpoint, virtual-document, and nbconvert artifacts.
- Clarify pre-1.0 API guidance to prefer intentional breaking changes over deprecated compatibility shims.
- Simplify spherical normalization by removing an unreachable post-scaling fallback.
@coderabbitai coderabbitai Bot removed the geometry Geometry-related issues label Jul 5, 2026
- Move the adversarial 3D k=1 roundtrip fixture behind slow-tests so the default nextest profile stays inside the Windows watchdog.
- Keep faster 3D benchmark-fixture coverage in the default suite.
@coderabbitai coderabbitai Bot added the geometry Geometry-related issues label Jul 5, 2026
@acgetchell
acgetchell merged commit 69f08d5 into main Jul 5, 2026
24 checks passed
@acgetchell
acgetchell deleted the feat/188-cli-notebook-quickstart branch July 5, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api breaking change documentation Improvements or additions to documentation enhancement New feature or request geometry Geometry-related issues rust Pull requests that update rust code topology

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement unit-sphere normalization for SphericalSpace::canonicalize_point()

1 participant