Skip to content

Add Perspective.js artifact integration#272

Closed
hachej wants to merge 1 commit into
mainfrom
feat/perspective-artifacts
Closed

Add Perspective.js artifact integration#272
hachej wants to merge 1 commit into
mainfrom
feat/perspective-artifacts

Conversation

@hachej

@hachej hachej commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add provider-neutral Perspective.js dataset/artifact helpers for BSL query results
  • add SemanticTable convenience methods for Perspective dataset and artifact export
  • separate inline datasets (kind: bsl.perspective.dataset, data) from static artifact manifests (kind: bsl.perspective.artifact, data_ref)
  • add safe artifact-id validation, JSON-safe payload/viewer sanitization, Decimal-aware schema inference, and semantic role preservation
  • document the Perspective integration and add optional viz-perspective extra
  • add focused tests plus scripts/test_perspective_local.py smoke script

Tests

  • uv run ruff check src/boring_semantic_layer/integrations src/boring_semantic_layer/tests/test_perspective_integration.py src/boring_semantic_layer/expr.py scripts/test_perspective_local.py
  • uv run pytest src/boring_semantic_layer/tests/test_perspective_integration.py
  • uv run python scripts/test_perspective_local.py

Reviews

  • normal reviewer pass: no blockers/actionable findings
  • thermo-nuclear code quality review: no maintainability blockers; ready to merge

Note: broader chart test run was attempted earlier, but optional chart dependencies (altair / plotly / plotext) are not installed in this environment, so those unrelated tests fail with ModuleNotFoundError.

@boringdata boringdata force-pushed the feat/perspective-artifacts branch 2 times, most recently from 048921d to f5b2fbe Compare June 23, 2026 23:43
@hachej

hachej commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

Claude Code Opus/ultracode review iteration:

  • Initial review found Arrow/manifest schema divergence for Decimal values and nullable integer/date schema fidelity gaps.
  • Fixed by coercing JSON and Arrow outputs from the inferred Perspective schema, normalizing Decimal to float consistently and preserving nullable integer/date semantics.
  • Added inline data_format to dataset payloads and updated Arrow install guidance to mention the viz-perspective extra.
  • Final Claude Code review verdict: clean, no remaining blocker/high/medium actionable issues.

Validation after fixes:

  • uv run pytest src/boring_semantic_layer/tests/test_perspective_integration.py
  • uv run python scripts/test_perspective_local.py

@boringdata boringdata force-pushed the feat/perspective-artifacts branch 5 times, most recently from d6026b1 to a5bfd99 Compare July 1, 2026 05:36
@boringdata boringdata force-pushed the feat/perspective-artifacts branch from a5bfd99 to 3e68688 Compare July 1, 2026 06:25
@hachej

hachej commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Closing after revisiting the Perspective integration architecture. For live app integration, Perspective can load Arrow directly or use its client/server replication model, so BSL does not need a dedicated Perspective artifact layer here. Hosts can wire BSL/Ibis Arrow outputs to Perspective without a BSL-specific manifest.

@hachej hachej closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants