Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
72094f9
chore: Plugins architecture POC
michael-s-molina Jan 20, 2025
5d5c795
Adds webpack module federation configs
michael-s-molina Feb 20, 2025
3774c55
Adds the extension contributions
michael-s-molina Feb 26, 2025
8037f03
Adds @apache-superset/types and apache-@superset/components
michael-s-molina Mar 6, 2025
2c778e8
Adds extensions code and built files
michael-s-molina Mar 7, 2025
67674a0
update sdk todo
villebro Mar 7, 2025
c90d6c2
add extensions migration
villebro Mar 7, 2025
0e5890c
add missing dev babel deps
villebro Mar 8, 2025
15e51e5
add backend model and general cleanup
villebro Mar 11, 2025
e06826e
remove import from webpack bundle
villebro Mar 11, 2025
d43d628
fix lock files
villebro Mar 11, 2025
b25809b
more cleanup to webpack and package configs
villebro Mar 11, 2025
9e89217
fix lock files and use migration utils
villebro Mar 12, 2025
18ebde4
Clean up old files and change SDK version
michael-s-molina Mar 18, 2025
31aabb9
Improves doc string and adds TODOs
michael-s-molina Mar 18, 2025
70ed8b2
add python primitives package
villebro Mar 18, 2025
6ae0522
Fix primitives dependency version
michael-s-molina Mar 20, 2025
e0502ec
Moves things around
michael-s-molina Mar 20, 2025
ce2dcfa
Adds contributions
michael-s-molina Mar 20, 2025
3c72052
Extract useExtensions
michael-s-molina Mar 20, 2025
2b452f9
Creates setupExtensionsAPI
michael-s-molina Mar 24, 2025
8871ac3
Adds activation/deactivation
michael-s-molina Mar 24, 2025
35062c6
Fix icons
michael-s-molina Mar 25, 2025
62fa209
Removes SqlLabPoc page
michael-s-molina Mar 25, 2025
bbe6776
Improves type checking
michael-s-molina Mar 26, 2025
578dcf4
API definitions
michael-s-molina Mar 27, 2025
29ccc9b
Implements 2 APIs and reference them from extensions
michael-s-molina Mar 28, 2025
d5380f5
Read contributions
michael-s-molina Mar 31, 2025
dd81e10
Adds a placeholder
michael-s-molina Mar 31, 2025
7c168d0
Track database changes
michael-s-molina Apr 3, 2025
2912fd2
Dependency between extensions
michael-s-molina Apr 7, 2025
1dd11da
refactor extensions and add backend support
villebro Apr 13, 2025
660a816
Remove unused import
michael-s-molina Apr 14, 2025
6066407
Fixes to make extensions work again
michael-s-molina Apr 14, 2025
bd8ed2b
add python code to bundle and refactor input manifest
villebro Apr 16, 2025
fa0a819
add backend files to metastore
villebro Apr 18, 2025
95f6875
add try-catch to fix race
villebro Apr 19, 2025
94006fe
support backend plugins
villebro Apr 20, 2025
6b335ad
add missing files and add try-except
villebro Apr 20, 2025
d729289
add license headers
villebro Apr 20, 2025
afb1a40
update docs
villebro Apr 20, 2025
44beb09
add more licenses and general fixes
villebro Apr 20, 2025
1de75b3
fix linting issues
villebro Apr 20, 2025
1efbd21
add api schema
villebro Apr 20, 2025
18c59d2
update API schema again
villebro Apr 20, 2025
f4aad87
fix codeowners
villebro Apr 20, 2025
51d10ae
convert sdk from typer to click
villebro Apr 21, 2025
1f5ccbe
Update ignore
michael-s-molina Apr 25, 2025
bd48358
Cleanup package.json
michael-s-molina Apr 25, 2025
3c98a83
Menu contributions
michael-s-molina Apr 25, 2025
950e96f
Adds commands contributions
michael-s-molina Apr 25, 2025
3413391
Creates the extension manager
michael-s-molina Apr 25, 2025
677e5e7
Add types
michael-s-molina Apr 30, 2025
fecba73
Removes scope
michael-s-molina Apr 30, 2025
e05bc94
Adds extension1 commands
michael-s-molina Apr 30, 2025
47f1c85
Adds contribution types
michael-s-molina Apr 30, 2025
ffee1e2
improve bundler
villebro May 1, 2025
90eb6b3
Merge branch 'master' into plugin-architecture-poc
villebro May 1, 2025
ddd6c09
update down revision of migration
villebro May 1, 2025
55439b3
remove zip reference from import api
villebro May 2, 2025
1183e4d
Warn of duplicate command registration
michael-s-molina May 2, 2025
6a78c5f
Context workaround
michael-s-molina May 2, 2025
dd6d26a
add permissions and make npm package private
villebro May 2, 2025
aef6c45
move sdk to development requirements
villebro May 2, 2025
3820ce6
add dev mode
villebro May 3, 2025
a4c3d2c
remove dev assets
villebro May 3, 2025
b494ec6
add support for binary files in extensions
villebro May 5, 2025
49f46b3
add dev mode
villebro May 5, 2025
c15ebac
fix watchdog dependency
villebro May 5, 2025
34a500c
add rest api support
villebro May 6, 2025
3a0685b
use separate observers for frontend and backend
villebro May 6, 2025
9ef46b0
Merge branch 'master' into plugin-architecture-poc
villebro May 9, 2025
581614b
Adds menu contributions
michael-s-molina May 13, 2025
4d9b287
Revert "use separate observers for frontend and backend"
michael-s-molina May 13, 2025
c795c65
Adds API call example
michael-s-molina May 13, 2025
0174720
Adds the table references example
michael-s-molina May 15, 2025
54fdc6d
Adds deactivation logic
michael-s-molina May 15, 2025
02598e6
Revert "Revert "use separate observers for frontend and backend""
villebro May 25, 2025
392874d
fix sdk typos
villebro May 25, 2025
7aec8ff
remove hardcoded host from api call
villebro May 25, 2025
18c93e6
fix dev command
villebro May 25, 2025
43e20a0
DRY cli.py
villebro May 25, 2025
a6ea08e
simplify manifest update message
villebro May 25, 2025
a24460f
Remove hardcoded host
michael-s-molina May 26, 2025
460b15f
Rename to latest partition
michael-s-molina May 26, 2025
679e89c
move manifest type to primitives
villebro May 26, 2025
825844e
remove redundant AuditMixinNullable fields
villebro May 26, 2025
5c8029b
Rename primitives to core
michael-s-molina Jun 2, 2025
ffe2c37
Merge types to core package
michael-s-molina Jun 2, 2025
fa3bba7
Organize more
michael-s-molina Jun 2, 2025
46a13b6
rename backend packages
villebro Jun 3, 2025
395064b
fix table_references errors
villebro Jun 4, 2025
e039549
Move extensions outside superset-frontend
michael-s-molina Jun 4, 2025
c6af959
Changes MetadataRow
michael-s-molina Jun 4, 2025
b1eb9f7
Merge branch 'master' into plugin-architecture-poc
villebro Jun 4, 2025
043aa6c
add npm ci to build
villebro Jun 4, 2025
ed12062
add check for npm version
villebro Jun 5, 2025
46dc841
Merge branch 'master' into plugin-architecture-poc
villebro Jun 5, 2025
69057e1
Adds the ENABLE_EXTENSIONS feature flag
michael-s-molina Jun 5, 2025
e34133f
add init command with initial templates
villebro Jun 8, 2025
f304786
Refactors to extension initialization
michael-s-molina Jun 11, 2025
760f32f
Handle backend only extensions
michael-s-molina Jun 12, 2025
00bb15c
Manage context, enablement/disablement
michael-s-molina Jun 12, 2025
3a2e525
Put extension endpoints under /api/v1/extensions
michael-s-molina Jun 13, 2025
fb57527
Refactors the startup logic
michael-s-molina Jun 16, 2025
e79a510
Adds initial code for the management page
michael-s-molina Jun 17, 2025
df8a34f
Merge branch 'master' into plugin-architecture-poc
michael-s-molina Jun 17, 2025
972c93d
Removes files from payload
michael-s-molina Jun 24, 2025
2309535
Merge branch 'master' into plugin-architecture-poc
michael-s-molina Jun 24, 2025
26f745d
lint
villebro Jun 24, 2025
3301975
Initializes extensions only when authenticated
michael-s-molina Jun 25, 2025
aa6bba0
More work to enable/disable extensions
michael-s-molina Jun 25, 2025
6bef996
Fix for uploaded extensions
michael-s-molina Jun 25, 2025
6b424f7
Save enable/disable state
michael-s-molina Jun 26, 2025
8a3bbda
Merge branch 'master' into plugin-architecture-poc
michael-s-molina Jun 26, 2025
0e0616c
Adds the Upload modal
michael-s-molina Jun 26, 2025
b01b29c
Adds endpoint for retrieving a single extension
michael-s-molina Jun 26, 2025
916d6ef
Initializes an uploaded extension
michael-s-molina Jun 26, 2025
f80095c
add core host on backend
villebro Jun 26, 2025
904ee65
Fix API calls without parameters
michael-s-molina Jun 27, 2025
7554ba1
Adds delete logic
michael-s-molina Jun 27, 2025
74c23ea
Separate core files from extension files
michael-s-molina Jun 27, 2025
2c5a8c1
Improves SQL Lab APIs
michael-s-molina Jun 30, 2025
7f81c95
Initial draft to isolate events per tab
michael-s-molina Jun 30, 2025
87187a2
Implements getCurrentTab
michael-s-molina Jul 1, 2025
2b0d1b2
add more versatile model api and expose query api
villebro Jul 1, 2025
cef2d9e
Merge branch 'master' into plugin-architecture-poc
villebro Jul 1, 2025
adab9bb
Move extension APIs under /extensions
michael-s-molina Jul 4, 2025
09164a5
Uses SQL Glot for query parsing
michael-s-molina Jul 4, 2025
039618e
Add access to analytical database
michael-s-molina Jul 4, 2025
a16bb5e
Increase simulated row counts
michael-s-molina Jul 4, 2025
8e6f394
fix migration revision path
villebro Jul 12, 2025
ab26e88
add kwargs to model getters
villebro Jul 12, 2025
99ececf
add support for local extension development
villebro Aug 2, 2025
7dcdd11
Merge branch 'master' into plugin-architecture-poc
villebro Aug 2, 2025
177e2ea
fix linting errors
villebro Aug 2, 2025
9b4b208
fix incorrect lazy_gettext
villebro Aug 2, 2025
cb22dd0
Merge branch 'master' into plugin-architecture-poc
villebro Aug 2, 2025
101cd26
update lock files
villebro Aug 2, 2025
3189b85
fix db migration
villebro Aug 3, 2025
2d37357
add commands
villebro Aug 3, 2025
8c795f5
fix linting errors
villebro Aug 3, 2025
d1d6720
fix json import
villebro Aug 3, 2025
4e0042d
add license files
villebro Aug 3, 2025
4da1d71
skip j2 files from license checks
villebro Aug 3, 2025
965ff28
fix typo
villebro Aug 4, 2025
0cb2263
fix deps
villebro Aug 4, 2025
822b44c
Merge branch 'master' into plugin-architecture-poc
michael-s-molina Aug 5, 2025
c034d31
Fix eslint errors
michael-s-molina Aug 6, 2025
7da989b
Merge branch 'master' into plugin-architecture-poc
michael-s-molina Aug 6, 2025
aab2ca8
Fix pre-commit errors
michael-s-molina Aug 6, 2025
0e70565
Fixes jest errors
michael-s-molina Aug 6, 2025
a040a3e
lint
villebro Aug 6, 2025
cee8d21
Merge branch 'master' into plugin-architecture-poc
villebro Aug 9, 2025
0f41a56
add tests to superset-cli
villebro Aug 9, 2025
7cf0191
add gha workflow for superset-cli package
villebro Aug 9, 2025
180e40a
use development deps in gha workflow
villebro Aug 9, 2025
3c32c08
Merge branch 'master' into plugin-architecture-poc
villebro Aug 11, 2025
5ab0252
Separate mypy runs
michael-s-molina Aug 12, 2025
e24bc72
Reuses setup-backend in superset-cli
michael-s-molina Aug 12, 2025
f7c9c1d
Add tests
michael-s-molina Aug 12, 2025
94061dc
Fix eslint errors
michael-s-molina Aug 12, 2025
6664f9c
Adds superset-core to the Docker image
michael-s-molina Aug 12, 2025
38295e1
Also adds superset-cli to the image
michael-s-molina Aug 12, 2025
dbf8199
remove extensions
Aug 17, 2025
a91030f
Merge branch 'master' into plugin-architecture-poc
Aug 17, 2025
bdecdb4
fix migration revision id
Aug 17, 2025
29a639e
implement discovery and remove import endpoint
Aug 17, 2025
5522b0a
dry up and simplify
Aug 17, 2025
ab89326
simplify discovery and skip run on reloader process
Aug 17, 2025
8b44809
List cleanup
michael-s-molina Aug 18, 2025
8e36080
Cleanup manager
michael-s-molina Aug 18, 2025
4aa8985
Revert "remove extensions"
michael-s-molina Aug 18, 2025
912b9c5
Remove UI components from @apache-superset/core
michael-s-molina Aug 18, 2025
247dfd6
Add docstrings to Typescript APIs
michael-s-molina Aug 18, 2025
0d9c10b
Fix test
michael-s-molina Aug 18, 2025
3ce28a1
Removes filter from extensions list and add count
michael-s-molina Aug 18, 2025
77e9d2e
Add implementation placeholders
michael-s-molina Aug 19, 2025
52ba543
Fix lint error
michael-s-molina Aug 19, 2025
ddbfb57
Update Python dependencies
michael-s-molina Aug 19, 2025
5ca0fa8
Update dependencies 2
michael-s-molina Aug 19, 2025
2b8dea8
Theme adjustments
michael-s-molina Aug 19, 2025
66a6d5d
Uses closure
michael-s-molina Aug 19, 2025
da24012
Improve error message
michael-s-molina Aug 19, 2025
5b58fb4
use name as key in ExtensionManager
Aug 19, 2025
643da15
remove id and enabled from fe components
Aug 19, 2025
94bc03e
update api to use new registry
Aug 19, 2025
f4f4e8d
remove extension db model and related functionality
Aug 19, 2025
9915888
Merge branch 'master' into plugin-architecture-poc
Aug 19, 2025
e075efe
Improve error handling for view contributions
michael-s-molina Aug 20, 2025
f7b6c81
Fix tomli import
michael-s-molina Aug 20, 2025
0d99dee
Review CODEOWNERS
michael-s-molina Aug 20, 2025
8b8c4bd
Lint fix
michael-s-molina Aug 20, 2025
2240cce
Add Babel support for namespace exports
michael-s-molina Aug 20, 2025
399c1b9
Fix queries test
michael-s-molina Aug 20, 2025
26c70fd
Fix tab identifier problem
michael-s-molina Aug 20, 2025
034b11f
add id to extensions
Aug 22, 2025
ad8f70b
make cli tests functional
Aug 22, 2025
952a7bf
add id to existing extensions
Aug 22, 2025
38ae656
replace env var with config param
Aug 22, 2025
0d1f4bf
run npm i if no lock exists
Aug 22, 2025
7c2370f
Merge branch 'master' into plugin-architecture-poc
Aug 22, 2025
38480ba
remove checksum
Aug 22, 2025
746d843
fix test
Aug 22, 2025
238b221
fix gha workflow
Aug 22, 2025
18387cb
fix CODEOWNERS
Aug 22, 2025
38bc5be
unpin python version
Aug 22, 2025
366984d
add docstrings to core api
Aug 22, 2025
94201ac
Use tab history for id
michael-s-molina Aug 22, 2025
affbb54
remove extensions
Aug 22, 2025
286cc15
add python matrix to cli test workflow
Aug 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@

**/*.geojson @villebro @rusackas
/superset-frontend/plugins/legacy-plugin-chart-country-map/ @villebro @rusackas

# Notify PMC members of changes to extension-related files

/superset-core/ @michael-s-molina @villebro
/superset-cli/ @michael-s-molina @villebro
/superset/core/ @michael-s-molina @villebro
/superset/extensions/ @michael-s-molina @villebro
/superset-frontend/src/packages/superset-core/ @michael-s-molina @villebro
/superset-frontend/src/core/ @michael-s-molina @villebro
/superset-frontend/src/extensions/ @michael-s-molina @villebro
19 changes: 11 additions & 8 deletions .github/actions/change-detector/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
name: 'Change Detector'
description: 'Detects file changes for pull request and push events'
name: Change Detector
description: Detects file changes for pull request and push events
inputs:
token:
description: 'GitHub token for authentication'
description: GitHub token for authentication
required: true
outputs:
python:
description: 'Whether Python-related files were changed'
description: Whether Python-related files were changed
value: ${{ steps.change-detector.outputs.python }}
frontend:
description: 'Whether frontend-related files were changed'
description: Whether frontend-related files were changed
value: ${{ steps.change-detector.outputs.frontend }}
docker:
description: 'Whether docker-related files were changed'
description: Whether docker-related files were changed
value: ${{ steps.change-detector.outputs.docker }}
docs:
description: 'Whether docs-related files were changed'
description: Whether docs-related files were changed
value: ${{ steps.change-detector.outputs.docs }}
superset-cli:
description: Whether superset-cli package-related files were changed
value: ${{ steps.change-detector.outputs.superset-cli }}
runs:
using: 'composite'
using: composite
steps:
- name: Detect file changes
id: change-detector
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/superset-app-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Superset App CLI tests

on:
push:
branches:
- "master"
- "[0-9].[0-9]*"
pull_request:
types: [synchronize, opened, reopened, ready_for_review]

# cancel previous workflow jobs for PRs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
test-load-examples:
runs-on: ubuntu-24.04
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:[email protected]:15432/superset
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
ports:
# Use custom ports for services to avoid accidentally connecting to
# GitHub action runner's default installations
- 15432:5432
redis:
image: redis:7-alpine
ports:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
- name: Check for file changes
id: check
uses: ./.github/actions/change-detector/
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
if: steps.check.outputs.python
uses: ./.github/actions/setup-backend/
- name: Setup Postgres
if: steps.check.outputs.python
uses: ./.github/actions/cached-dependencies
with:
run: setup-postgres
- name: superset init
if: steps.check.outputs.python
run: |
pip install -e .
superset db upgrade
superset load_test_users
- name: superset load_examples
if: steps.check.outputs.python
run: |
# load examples without test data
superset load_examples --load-big-data
69 changes: 33 additions & 36 deletions .github/workflows/superset-cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Superset CLI tests
name: Superset CLI Package Tests

on:
push:
Expand All @@ -14,54 +14,51 @@ concurrency:
cancel-in-progress: true

jobs:
test-load-examples:
test-superset-cli-package:
runs-on: ubuntu-24.04
env:
PYTHONPATH: ${{ github.workspace }}
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:[email protected]:15432/superset
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
ports:
# Use custom ports for services to avoid accidentally connecting to
# GitHub action runner's default installations
- 15432:5432
redis:
image: redis:7-alpine
ports:
- 16379:6379
strategy:
matrix:
python-version: ["previous", "current", "next"]
defaults:
run:
working-directory: superset-cli
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

- name: Check for file changes
id: check
uses: ./.github/actions/change-detector/
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python
if: steps.check.outputs.python
if: steps.check.outputs.superset-cli
uses: ./.github/actions/setup-backend/
- name: Setup Postgres
if: steps.check.outputs.python
uses: ./.github/actions/cached-dependencies
with:
run: setup-postgres
- name: superset init
if: steps.check.outputs.python
run: |
pip install -e .
superset db upgrade
superset load_test_users
- name: superset load_examples
if: steps.check.outputs.python
python-version: ${{ matrix.python-version }}
requirements-type: dev

- name: Run pytest with coverage
if: steps.check.outputs.superset-cli
run: |
# load examples without test data
superset load_examples --load-big-data
pytest --cov=superset_cli --cov-report=xml --cov-report=term-missing --cov-report=html -v --tb=short

- name: Upload coverage reports to Codecov
if: steps.check.outputs.superset-cli
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: superset-cli
name: superset-cli-coverage
fail_ci_if_error: false

- name: Upload HTML coverage report
if: steps.check.outputs.superset-cli
uses: actions/upload-artifact@v4
with:
name: superset-cli-coverage-html
path: htmlcov/
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ _modules
_static
build
app.db
apache_superset.egg-info/
*.egg-info/
changelog.sh
dist
dump.rdb
Expand Down
80 changes: 43 additions & 37 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ repos:
rev: v1.15.0
hooks:
- id: mypy
name: mypy (main)
args: [--check-untyped-defs]
exclude: ^superset-cli/
additional_dependencies: [
types-simplejson,
types-python-dateutil,
Expand All @@ -38,6 +40,10 @@ repos:
types-paramiko,
types-Markdown,
]
- id: mypy
name: mypy (superset-cli)
args: [--check-untyped-defs]
files: ^superset-cli/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand All @@ -54,25 +60,25 @@ repos:
args: ["--markdown-linebreak-ext=md"]
- repo: local
hooks:
- id: eslint-frontend
name: eslint (frontend)
entry: ./scripts/eslint.sh
language: system
pass_filenames: true
files: ^superset-frontend/.*\.(js|jsx|ts|tsx)$
- id: eslint-docs
name: eslint (docs)
entry: bash -c 'cd docs && FILES=$(echo "$@" | sed "s|docs/||g") && yarn eslint --fix --ext .js,.jsx,.ts,.tsx --quiet $FILES'
language: system
pass_filenames: true
files: ^docs/.*\.(js|jsx|ts|tsx)$
- id: type-checking-frontend
name: Type-Checking (Frontend)
entry: ./scripts/check-type.js package=superset-frontend excludeDeclarationDir=cypress-base
language: system
files: ^superset-frontend\/.*\.(js|jsx|ts|tsx)$
exclude: ^superset-frontend/cypress-base\/
require_serial: true
- id: eslint-frontend
name: eslint (frontend)
entry: ./scripts/eslint.sh
language: system
pass_filenames: true
files: ^superset-frontend/.*\.(js|jsx|ts|tsx)$
- id: eslint-docs
name: eslint (docs)
entry: bash -c 'cd docs && FILES=$(echo "$@" | sed "s|docs/||g") && yarn eslint --fix --ext .js,.jsx,.ts,.tsx --quiet $FILES'
language: system
pass_filenames: true
files: ^docs/.*\.(js|jsx|ts|tsx)$
- id: type-checking-frontend
name: Type-Checking (Frontend)
entry: ./scripts/check-type.js package=superset-frontend excludeDeclarationDir=cypress-base
language: system
files: ^superset-frontend\/.*\.(js|jsx|ts|tsx)$
exclude: ^superset-frontend/cypress-base\/
require_serial: true
# blacklist unsafe functions like make_url (see #19526)
- repo: https://github.com/skorokithakis/blacklist-pre-commit-hook
rev: e2f070289d8eddcaec0b580d3bde29437e7c8221
Expand All @@ -94,21 +100,21 @@ repos:
args: [--fix]
- repo: local
hooks:
- id: pylint
name: pylint with custom Superset plugins
entry: bash
language: system
types: [python]
exclude: ^(tests/|superset/migrations/|scripts/|RELEASING/|docker/)
args:
- -c
- |
TARGET_BRANCH=${GITHUB_BASE_REF:-master}
git fetch origin "$TARGET_BRANCH"
BASE=$(git merge-base origin/"$TARGET_BRANCH" HEAD)
files=$(git diff --name-only --diff-filter=ACM "$BASE"..HEAD | grep '^superset/.*\.py$' || true)
if [ -n "$files" ]; then
pylint --rcfile=.pylintrc --load-plugins=superset.extensions.pylint --reports=no $files
else
echo "No Python files to lint."
fi
- id: pylint
name: pylint with custom Superset plugins
entry: bash
language: system
types: [python]
exclude: ^(tests/|superset/migrations/|scripts/|RELEASING/|docker/)
args:
- -c
- |
TARGET_BRANCH=${GITHUB_BASE_REF:-master}
git fetch origin "$TARGET_BRANCH"
BASE=$(git merge-base origin/"$TARGET_BRANCH" HEAD)
files=$(git diff --name-only --diff-filter=ACM "$BASE"..HEAD | grep '^superset/.*\.py$' || true)
if [ -n "$files" ]; then
pylint --rcfile=.pylintrc --load-plugins=superset.extensions.pylint --reports=no $files
else
echo "No Python files to lint."
fi
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ apache_superset.egg-info
# json and csv in general cannot have comments
.*json
.*csv
# jinja templates often need to be as-is
.*j2
# Generated doc files
env/*
docs/.htaccess*
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ FROM python-common AS lean

# Install Python dependencies using docker/pip-install.sh
COPY requirements/base.txt requirements/

# Copy superset-core package needed for editable install in base.txt
COPY superset-core superset-core

RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
/app/docker/pip-install.sh --requires-build-essential -r requirements/base.txt
# Install the superset package
Expand All @@ -241,6 +245,11 @@ RUN /app/docker/apt-install.sh \

# Copy development requirements and install them
COPY requirements/*.txt requirements/

# Copy local packages needed for editable installs in development.txt
COPY superset-core superset-core
COPY superset-cli superset-cli

# Install Python dependencies using docker/pip-install.sh
RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
/app/docker/pip-install.sh --requires-build-essential -r requirements/development.txt
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
"apache-superset-core>=0.0.1, <0.2",
"backoff>=1.8.0",
"celery>=5.3.6, <6.0.0",
"click>=8.0.3",
Expand Down Expand Up @@ -101,6 +102,7 @@ dependencies = [
"tabulate>=0.9.0, <1.0",
"typing-extensions>=4, <5",
"waitress; sys_platform == 'win32'",
"watchdog>=6.0.0",
"wtforms>=2.3.3, <4",
"wtforms-json",
"xlsxwriter>=3.0.7, <3.1",
Expand Down Expand Up @@ -190,6 +192,7 @@ doris = ["pydoris>=1.0.0, <2.0.0"]
oceanbase = ["oceanbase_py>=0.0.1"]
ydb = ["ydb-sqlalchemy>=0.1.2"]
development = [
"apache-superset-cli>=0.0.1, <0.2",
"docker",
"flask-testing",
"freezegun",
Expand Down Expand Up @@ -221,7 +224,7 @@ documentation = "https://superset.apache.org/docs/intro"
combine_as_imports = true
include_trailing_comma = true
line_length = 88
known_first_party = "superset"
known_first_party = "superset, apache-superset-core, apache-superset-cli"
known_third_party = "alembic, apispec, backoff, celery, click, colorama, cron_descriptor, croniter, cryptography, dateutil, deprecation, flask, flask_appbuilder, flask_babel, flask_caching, flask_compress, flask_jwt_extended, flask_login, flask_migrate, flask_sqlalchemy, flask_talisman, flask_testing, flask_wtf, freezegun, geohash, geopy, holidays, humanize, isodate, jinja2, jwt, markdown, markupsafe, marshmallow, msgpack, nh3, numpy, pandas, parameterized, parsedatetime, pgsanity, polyline, prison, progress, pyarrow, sqlalchemy_bigquery, pyhive, pyparsing, pytest, pytest_mock, pytz, redis, requests, selenium, setuptools, shillelagh, simplejson, slack, sqlalchemy, sqlalchemy_utils, typing_extensions, urllib3, werkzeug, wtforms, wtforms_json, yaml"
multi_line_output = 3
order_by_type = false
Expand Down Expand Up @@ -424,3 +427,7 @@ python-geohash = "0"
# TODO REMOVE THESE DEPS FROM CODEBASE
paramiko = "3" # GPL
pyxlsb = "1" # GPL

[tool.uv.sources]
apache-superset-core = { path = "./superset-core", editable = true }
apache-superset-cli = { path = "./superset-cli", editable = true }
Loading
Loading