feat: semantic layer extension - #37815
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2887016 to
5c1e250
Compare
0e9c71e to
393610a
Compare
There was a problem hiding this comment.
Code Review Agent Run #0e1b4d
Actionable Suggestions - 2
-
superset/semantic_layers/mapper.py - 1
- Debug print statement in production code · Line 351-351
-
superset-core/pyproject.toml - 1
- Dependency version inconsistency · Line 44-48
Additional Suggestions - 1
-
tests/unit_tests/semantic_layers/mapper_test.py - 1
-
Misleading test comment · Line 336-349The test comment claims to verify that TEMPORAL_RANGE filters are skipped, but the assertion passes because the 'order_date' column is not present in the empty all_dimensions dictionary. This tests unknown column handling, not TEMPORAL_RANGE skipping. Consider updating the comment or modifying the test to properly validate TEMPORAL_RANGE behavior.
-
Filtered by Review Rules
Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
-
superset/semantic_layers/mapper.py - 1
- Remove debug print in map_query_object · Line 351-351
Review Details
-
Files reviewed - 7 · Commit Range:
cb5281b..0c33cfc- superset-core/pyproject.toml
- superset-core/src/superset_core/semantic_layers/semantic_layer.py
- superset-core/src/superset_core/semantic_layers/semantic_view.py
- superset-core/src/superset_core/semantic_layers/types.py
- superset/semantic_layers/__init__.py
- superset/semantic_layers/mapper.py
- tests/unit_tests/semantic_layers/mapper_test.py
-
Files skipped - 1
- .github/workflows/superset-python-unittest.yml - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
| time_offset, | ||
| all_dimensions, | ||
| ) | ||
| print(">>", filters) |
There was a problem hiding this comment.
Remove debug print statement before merging. This should be replaced with proper logging if needed.
Code suggestion
Check the AI-generated fix before applying
- print(">>>", filters)
Code Review Run #0e1b4d
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
|
@betodealmeida Was your intention to commit this to the feature branch instead of master? |
My idea is that |
Ah ok. Maybe is better to keep this PR as a draft then until we merge all PRs to |
rusackas
left a comment
There was a problem hiding this comment.
So stoked for this! Extensions for everything! <img src='oprah.gif' alt='YOU get an extension! YOU get an extension!'>
|
Bito Automatic Review Skipped – PR Already Merged |
SUMMARY
This PR implements semantic layers (#35003) as an extension. It also includes a new unit test rule to enforce 100% coverage in the
superset/semantic_layers/directory.Out of scope: currently we only have basic view permissions. I'm going to integrate semantic layers and semantic views with DAR in the next PR. I'll also add a better edit modal for semantic views, showing the existing metrics and dimensions; the current one is just a placeholder for additional metadata.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
docker/pythonpath_dev/superset_config.py:.supxfile insidedocker/extensions.docker compose build --no-cache # this ensure permissions for new views are created docker compose upADDITIONAL INFORMATION
SEMANTIC_LAYERS