Skip to content

Add Perspective.js artifact integration#272

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

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 from 75f2773 to 048921d Compare June 22, 2026 19:32
@boringdata boringdata force-pushed the feat/perspective-artifacts branch 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

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