diff --git a/.gitignore b/.gitignore index bd4f21d..d49fa99 100755 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ env/ backend/backups/* # Node.js -node_modules/ +frontend/node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* @@ -39,6 +39,7 @@ build/ dist/ .env* config.json +package-lock.json # Logs *.log @@ -62,3 +63,5 @@ keyring passwords.py *tech_spec* dashboards backend/mappings.db + + diff --git a/.kilocode/mcp.json b/.kilocode/mcp.json old mode 100755 new mode 100644 index c052349..f5c3463 --- a/.kilocode/mcp.json +++ b/.kilocode/mcp.json @@ -1,14 +1 @@ -{ - "mcpServers": { - "tavily": { - "command": "npx", - "args": [ - "-y", - "tavily-mcp@0.2.3" - ], - "env": { - "TAVILY_API_KEY": "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" - } - } - } -} \ No newline at end of file +{"mcpServers":{"tavily":{"command":"npx","args":["-y","tavily-mcp@0.2.3"],"env":{"TAVILY_API_KEY":"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"},"alwaysAllow":[]}}} \ No newline at end of file diff --git a/backend/mappings.db b/backend/mappings.db index f255c8d..1a8a6ed 100644 Binary files a/backend/mappings.db and b/backend/mappings.db differ diff --git a/backend/requirements.txt b/backend/requirements.txt index 4934448..57996dc 100755 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -41,3 +41,5 @@ tzlocal==5.3.1 urllib3==2.6.2 uvicorn==0.38.0 websockets==15.0.1 +pandas +psycopg2-binary \ No newline at end of file diff --git a/backend/src/api/routes/connections.py b/backend/src/api/routes/connections.py index ca754c5..09320c1 100644 --- a/backend/src/api/routes/connections.py +++ b/backend/src/api/routes/connections.py @@ -6,7 +6,7 @@ # @CONSTRAINT: Must use belief_scope for logging. # [SECTION: IMPORTS] -from typing import List +from typing import List, Optional from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session from ...core.database import get_db @@ -19,6 +19,7 @@ from ...core.logger import logger, belief_scope router = APIRouter() # [DEF:ConnectionSchema:Class] +# @PURPOSE: Pydantic model for connection response. class ConnectionSchema(BaseModel): id: str name: str @@ -31,8 +32,10 @@ class ConnectionSchema(BaseModel): class Config: orm_mode = True +# [/DEF:ConnectionSchema:Class] # [DEF:ConnectionCreate:Class] +# @PURPOSE: Pydantic model for creating a connection. class ConnectionCreate(BaseModel): name: str type: str @@ -41,17 +44,28 @@ class ConnectionCreate(BaseModel): database: Optional[str] = None username: Optional[str] = None password: Optional[str] = None - -from typing import Optional +# [/DEF:ConnectionCreate:Class] # [DEF:list_connections:Function] +# @PURPOSE: Lists all saved connections. +# @PRE: Database session is active. +# @POST: Returns list of connection configs. +# @PARAM: db (Session) - Database session. +# @RETURN: List[ConnectionSchema] - List of connections. @router.get("", response_model=List[ConnectionSchema]) async def list_connections(db: Session = Depends(get_db)): with belief_scope("ConnectionsRouter.list_connections"): connections = db.query(ConnectionConfig).all() return connections +# [/DEF:list_connections:Function] # [DEF:create_connection:Function] +# @PURPOSE: Creates a new connection configuration. +# @PRE: Connection name is unique. +# @POST: Connection is saved to DB. +# @PARAM: connection (ConnectionCreate) - Config data. +# @PARAM: db (Session) - Database session. +# @RETURN: ConnectionSchema - Created connection. @router.post("", response_model=ConnectionSchema, status_code=status.HTTP_201_CREATED) async def create_connection(connection: ConnectionCreate, db: Session = Depends(get_db)): with belief_scope("ConnectionsRouter.create_connection", f"name={connection.name}"): @@ -61,8 +75,15 @@ async def create_connection(connection: ConnectionCreate, db: Session = Depends( db.refresh(db_connection) logger.info(f"[ConnectionsRouter.create_connection][Success] Created connection {db_connection.id}") return db_connection +# [/DEF:create_connection:Function] # [DEF:delete_connection:Function] +# @PURPOSE: Deletes a connection configuration. +# @PRE: Connection ID exists. +# @POST: Connection is removed from DB. +# @PARAM: connection_id (str) - ID to delete. +# @PARAM: db (Session) - Database session. +# @RETURN: None. @router.delete("/{connection_id}", status_code=status.HTTP_204_NO_CONTENT) async def delete_connection(connection_id: str, db: Session = Depends(get_db)): with belief_scope("ConnectionsRouter.delete_connection", f"id={connection_id}"): @@ -74,5 +95,6 @@ async def delete_connection(connection_id: str, db: Session = Depends(get_db)): db.commit() logger.info(f"[ConnectionsRouter.delete_connection][Success] Deleted connection {connection_id}") return +# [/DEF:delete_connection:Function] # [/DEF:ConnectionsRouter:Module] \ No newline at end of file diff --git a/backend/src/api/routes/plugins.py b/backend/src/api/routes/plugins.py index 1c4cfe6..c992771 100755 --- a/backend/src/api/routes/plugins.py +++ b/backend/src/api/routes/plugins.py @@ -11,7 +11,7 @@ from ...dependencies import get_plugin_loader router = APIRouter() -@router.get("/", response_model=List[PluginConfig]) +@router.get("", response_model=List[PluginConfig]) async def list_plugins( plugin_loader = Depends(get_plugin_loader) ): diff --git a/backend/src/app.py b/backend/src/app.py index a1fe8d7..bad8139 100755 --- a/backend/src/app.py +++ b/backend/src/app.py @@ -11,7 +11,7 @@ from pathlib import Path project_root = Path(__file__).resolve().parent.parent.parent sys.path.append(str(project_root)) -from fastapi import FastAPI, WebSocket, WebSocketDisconnect, Depends, Request +from fastapi import FastAPI, WebSocket, WebSocketDisconnect, Depends, Request, HTTPException from fastapi.middleware.cors import CORSMiddleware from fastapi.staticfiles import StaticFiles from fastapi.responses import FileResponse @@ -138,6 +138,10 @@ if frontend_path.exists(): # Serve other static files from the root of build directory @app.get("/{file_path:path}") async def serve_spa(file_path: str): + # Don't serve SPA for API routes that fell through + if file_path.startswith("api/"): + raise HTTPException(status_code=404, detail="API endpoint not found") + full_path = frontend_path / file_path if full_path.is_file(): return FileResponse(str(full_path)) diff --git a/backend/src/plugins/debug.py b/backend/src/plugins/debug.py index 46a645c..688630a 100644 --- a/backend/src/plugins/debug.py +++ b/backend/src/plugins/debug.py @@ -87,6 +87,11 @@ class DebugPlugin(PluginBase): # [/DEF:DebugPlugin.execute:Function] # [DEF:DebugPlugin._test_db_api:Function] + # @PURPOSE: Tests database API connectivity for source and target environments. + # @PRE: source_env and target_env params exist. + # @POST: Returns DB counts for both envs. + # @PARAM: params (Dict) - Plugin parameters. + # @RETURN: Dict - Comparison results. async def _test_db_api(self, params: Dict[str, Any]) -> Dict[str, Any]: source_env_name = params.get("source_env") target_env_name = params.get("target_env") @@ -112,8 +117,14 @@ class DebugPlugin(PluginBase): } return results + # [/DEF:DebugPlugin._test_db_api:Function] # [DEF:DebugPlugin._get_dataset_structure:Function] + # @PURPOSE: Retrieves the structure of a dataset. + # @PRE: env and dataset_id params exist. + # @POST: Returns dataset JSON structure. + # @PARAM: params (Dict) - Plugin parameters. + # @RETURN: Dict - Dataset structure. async def _get_dataset_structure(self, params: Dict[str, Any]) -> Dict[str, Any]: env_name = params.get("env") dataset_id = params.get("dataset_id") @@ -132,6 +143,7 @@ class DebugPlugin(PluginBase): dataset_response = client.get_dataset(dataset_id) return dataset_response.get('result') or {} + # [/DEF:DebugPlugin._get_dataset_structure:Function] # [/DEF:DebugPlugin:Class] # [/DEF:DebugPluginModule:Module] \ No newline at end of file diff --git a/backend/tasks.db b/backend/tasks.db index dd40c97..a8132cd 100644 Binary files a/backend/tasks.db and b/backend/tasks.db differ diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1967d7e..509caa7 100755 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -912,7 +912,6 @@ "integrity": "sha512-Vp3zX/qlwerQmHMP6x0Ry1oY7eKKRcOWGc2P59srOp4zcqyn+etJyQpELgOi4+ZSUgteX8Y387NuwruLgGXLUQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@standard-schema/spec": "^1.0.0", "@sveltejs/acorn-typescript": "^1.0.5", @@ -952,7 +951,6 @@ "integrity": "sha512-YZs/OSKOQAQCnJvM/P+F1URotNnYNeU3P2s4oIpzm1uFaqUEqRxUB0g5ejMjEb5Gjb9/PiBI5Ktrq4rUUF8UVQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^5.0.0", "debug": "^4.4.1", @@ -1006,7 +1004,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1155,7 +1152,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -1613,7 +1609,6 @@ "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", "dev": true, "license": "MIT", - "peer": true, "bin": { "jiti": "bin/jiti.js" } @@ -1851,7 +1846,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -2224,7 +2218,6 @@ "integrity": "sha512-ZhLtvroYxUxr+HQJfMZEDRsGsmU46x12RvAv/zi9584f5KOX7bUrEbhPJ7cKFmUvZTJXi/CFZUYwDC6M1FigPw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@jridgewell/remapping": "^2.3.4", "@jridgewell/sourcemap-codec": "^1.5.0", @@ -2348,7 +2341,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -2430,7 +2422,6 @@ "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -2524,7 +2515,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, diff --git a/frontend/src/components/tools/ConnectionForm.svelte b/frontend/src/components/tools/ConnectionForm.svelte index a6aee78..496b683 100644 --- a/frontend/src/components/tools/ConnectionForm.svelte +++ b/frontend/src/components/tools/ConnectionForm.svelte @@ -45,6 +45,7 @@ isSubmitting = false; } } + // [/DEF:handleSubmit:Function] function resetForm() { name = ''; diff --git a/frontend/src/components/tools/ConnectionList.svelte b/frontend/src/components/tools/ConnectionList.svelte index 8b4e36d..2c9f710 100644 --- a/frontend/src/components/tools/ConnectionList.svelte +++ b/frontend/src/components/tools/ConnectionList.svelte @@ -29,6 +29,7 @@ isLoading = false; } } + // [/DEF:fetchConnections:Function] // [DEF:handleDelete:Function] // @PURPOSE: Deletes a connection configuration. @@ -43,6 +44,7 @@ addToast(e.message, 'error'); } } + // [/DEF:handleDelete:Function] onMount(fetchConnections); diff --git a/frontend/src/components/tools/DebugTool.svelte b/frontend/src/components/tools/DebugTool.svelte index 11d613b..1f20982 100644 --- a/frontend/src/components/tools/DebugTool.svelte +++ b/frontend/src/components/tools/DebugTool.svelte @@ -23,6 +23,13 @@ let results = null; let pollInterval; + // [DEF:fetchEnvironments:Function] + /** + * @purpose Fetches available environments. + * @pre API is available. + * @post envs variable is populated. + * @returns {Promise} + */ async function fetchEnvironments() { try { const res = await fetch('/api/environments'); @@ -31,7 +38,15 @@ addToast('Failed to fetch environments', 'error'); } } + // [/DEF:fetchEnvironments:Function] + // [DEF:handleRunDebug:Function] + /** + * @purpose Triggers the debug task. + * @pre Required fields are selected. + * @post Task is started and polling begins. + * @returns {Promise} + */ async function handleRunDebug() { isRunning = true; results = null; @@ -66,7 +81,16 @@ addToast(e.message, 'error'); } } + // [/DEF:handleRunDebug:Function] + // [DEF:startPolling:Function] + /** + * @purpose Polls for task completion. + * @pre Task ID is valid. + * @post Polls until success/failure. + * @param {string} taskId - ID of the task. + * @returns {void} + */ function startPolling(taskId) { if (pollInterval) clearInterval(pollInterval); pollInterval = setInterval(async () => { @@ -89,6 +113,7 @@ } }, 2000); } + // [/DEF:startPolling:Function] onMount(fetchEnvironments); @@ -161,4 +186,5 @@ {/if} - \ No newline at end of file + + \ No newline at end of file diff --git a/frontend/src/components/tools/MapperTool.svelte b/frontend/src/components/tools/MapperTool.svelte index de92708..ba1842e 100644 --- a/frontend/src/components/tools/MapperTool.svelte +++ b/frontend/src/components/tools/MapperTool.svelte @@ -37,6 +37,7 @@ addToast('Failed to fetch data', 'error'); } } + // [/DEF:fetchData:Function] // [DEF:handleRunMapper:Function] // @PURPOSE: Triggers the MapperPlugin task. @@ -77,6 +78,7 @@ isRunning = false; } } + // [/DEF:handleRunMapper:Function] onMount(fetchData); diff --git a/frontend/src/components/tools/SearchTool.svelte b/frontend/src/components/tools/SearchTool.svelte index f88ed2e..06db1db 100644 --- a/frontend/src/components/tools/SearchTool.svelte +++ b/frontend/src/components/tools/SearchTool.svelte @@ -30,6 +30,7 @@ addToast('Failed to fetch environments', 'error'); } } + // [/DEF:fetchEnvironments:Function] // [DEF:handleSearch:Function] // @PURPOSE: Triggers the SearchPlugin task. @@ -56,6 +57,7 @@ addToast(e.message, 'error'); } } + // [/DEF:handleSearch:Function] // [DEF:startPolling:Function] // @PURPOSE: Polls for task completion and results. @@ -84,6 +86,7 @@ } }, 2000); } + // [/DEF:startPolling:Function] onMount(fetchEnvironments); diff --git a/semantics/reports/semantic_report_20260112_211607.md b/semantics/reports/semantic_report_20260112_211607.md new file mode 100644 index 0000000..25b583e --- /dev/null +++ b/semantics/reports/semantic_report_20260112_211607.md @@ -0,0 +1,98 @@ +# Semantic Compliance Report + +**Generated At:** 2026-01-12T21:16:07.922245 +**Global Compliance Score:** 90.4% +**Scanned Files:** 80 + +## Critical Parsing Errors +- 🔴 frontend/src/components/tools/ConnectionForm.svelte:99 Mismatched closing anchor. Expected [/DEF:handleSubmit:Function], found [/DEF:ConnectionForm:Component]. +- 🔴 frontend/src/components/tools/ConnectionList.svelte:82 Mismatched closing anchor. Expected [/DEF:handleDelete:Function], found [/DEF:ConnectionList:Component]. +- 🔴 frontend/src/components/tools/MapperTool.svelte:159 Mismatched closing anchor. Expected [/DEF:handleRunMapper:Function], found [/DEF:MapperTool:Component]. +- 🔴 frontend/src/components/tools/SearchTool.svelte:177 Mismatched closing anchor. Expected [/DEF:startPolling:Function], found [/DEF:SearchTool:Component]. +- 🔴 backend/src/api/routes/connections.py:76 Mismatched closing anchor. Expected [/DEF:delete_connection:Function], found [/DEF:ConnectionsRouter:Module]. +- 🔴 backend/src/plugins/debug.py:136 Mismatched closing anchor. Expected [/DEF:DebugPlugin._get_dataset_structure:Function], found [/DEF:DebugPlugin:Class]. +- 🔴 backend/src/plugins/debug.py:137 Mismatched closing anchor. Expected [/DEF:DebugPlugin._get_dataset_structure:Function], found [/DEF:DebugPluginModule:Module]. + +## File Compliance Status +| File | Score | Issues | +|------|-------|--------| +| frontend/.svelte-kit/output/server/entries/pages/migration/_page.svelte.js | 🔴 0% | [handleSort] Unclosed Anchor at end of file (started line 65)
[handleSort] Unclosed Anchor: [DEF:handleSort:Function] started at line 65
[handleSelectionChange] Unclosed Anchor at end of file (started line 68)
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectAll] Unclosed Anchor at end of file (started line 71)
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[goToPage] Unclosed Anchor at end of file (started line 74)
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74 | +| frontend/src/components/tools/ConnectionForm.svelte | 🔴 0% | [ConnectionForm] Unclosed Anchor at end of file (started line 1)
[ConnectionForm] Unclosed Anchor: [DEF:ConnectionForm:Component] started at line 1
[handleSubmit] Unclosed Anchor at end of file (started line 26)
[handleSubmit] Unclosed Anchor: [DEF:handleSubmit:Function] started at line 26
[handleSubmit] Unclosed Anchor: [DEF:handleSubmit:Function] started at line 26 | +| frontend/src/components/tools/ConnectionList.svelte | 🔴 0% | [ConnectionList] Unclosed Anchor at end of file (started line 1)
[ConnectionList] Unclosed Anchor: [DEF:ConnectionList:Component] started at line 1
[fetchConnections] Unclosed Anchor at end of file (started line 20)
[fetchConnections] Unclosed Anchor: [DEF:fetchConnections:Function] started at line 20
[fetchConnections] Unclosed Anchor: [DEF:fetchConnections:Function] started at line 20
[handleDelete] Unclosed Anchor at end of file (started line 33)
[handleDelete] Unclosed Anchor: [DEF:handleDelete:Function] started at line 33
[handleDelete] Unclosed Anchor: [DEF:handleDelete:Function] started at line 33
[handleDelete] Unclosed Anchor: [DEF:handleDelete:Function] started at line 33 | +| frontend/src/components/tools/MapperTool.svelte | 🔴 0% | [MapperTool] Unclosed Anchor at end of file (started line 1)
[MapperTool] Unclosed Anchor: [DEF:MapperTool:Component] started at line 1
[fetchData] Unclosed Anchor at end of file (started line 29)
[fetchData] Unclosed Anchor: [DEF:fetchData:Function] started at line 29
[fetchData] Unclosed Anchor: [DEF:fetchData:Function] started at line 29
[handleRunMapper] Unclosed Anchor at end of file (started line 41)
[handleRunMapper] Unclosed Anchor: [DEF:handleRunMapper:Function] started at line 41
[handleRunMapper] Unclosed Anchor: [DEF:handleRunMapper:Function] started at line 41
[handleRunMapper] Unclosed Anchor: [DEF:handleRunMapper:Function] started at line 41 | +| frontend/src/components/tools/DebugTool.svelte | 🔴 0% | [DebugTool] Unclosed Anchor at end of file (started line 1)
[DebugTool] Unclosed Anchor: [DEF:DebugTool:Component] started at line 1 | +| frontend/src/components/tools/SearchTool.svelte | 🔴 0% | [SearchTool] Unclosed Anchor at end of file (started line 1)
[SearchTool] Unclosed Anchor: [DEF:SearchTool:Component] started at line 1
[fetchEnvironments] Unclosed Anchor at end of file (started line 23)
[fetchEnvironments] Unclosed Anchor: [DEF:fetchEnvironments:Function] started at line 23
[fetchEnvironments] Unclosed Anchor: [DEF:fetchEnvironments:Function] started at line 23
[handleSearch] Unclosed Anchor at end of file (started line 34)
[handleSearch] Unclosed Anchor: [DEF:handleSearch:Function] started at line 34
[handleSearch] Unclosed Anchor: [DEF:handleSearch:Function] started at line 34
[handleSearch] Unclosed Anchor: [DEF:handleSearch:Function] started at line 34
[startPolling] Unclosed Anchor at end of file (started line 60)
[startPolling] Unclosed Anchor: [DEF:startPolling:Function] started at line 60
[startPolling] Unclosed Anchor: [DEF:startPolling:Function] started at line 60
[startPolling] Unclosed Anchor: [DEF:startPolling:Function] started at line 60
[startPolling] Unclosed Anchor: [DEF:startPolling:Function] started at line 60 | +| backend/src/api/routes/connections.py | 🔴 0% | [ConnectionsRouter] Unclosed Anchor at end of file (started line 1)
[ConnectionsRouter] Unclosed Anchor: [DEF:ConnectionsRouter:Module] started at line 1
[ConnectionSchema] Unclosed Anchor at end of file (started line 21)
[ConnectionSchema] Unclosed Anchor: [DEF:ConnectionSchema:Class] started at line 21
[ConnectionSchema] Missing Mandatory Tag: @PURPOSE
[ConnectionSchema] Unclosed Anchor: [DEF:ConnectionSchema:Class] started at line 21
[ConnectionSchema] Missing Mandatory Tag: @PURPOSE
[ConnectionCreate] Unclosed Anchor at end of file (started line 35)
[ConnectionCreate] Unclosed Anchor: [DEF:ConnectionCreate:Class] started at line 35
[ConnectionCreate] Missing Mandatory Tag: @PURPOSE
[ConnectionCreate] Unclosed Anchor: [DEF:ConnectionCreate:Class] started at line 35
[ConnectionCreate] Missing Mandatory Tag: @PURPOSE
[ConnectionCreate] Unclosed Anchor: [DEF:ConnectionCreate:Class] started at line 35
[ConnectionCreate] Missing Mandatory Tag: @PURPOSE
[list_connections] Unclosed Anchor at end of file (started line 45)
[list_connections] Unclosed Anchor: [DEF:list_connections:Function] started at line 45
[list_connections] Missing Mandatory Tag: @PURPOSE
[list_connections] Unclosed Anchor: [DEF:list_connections:Function] started at line 45
[list_connections] Missing Mandatory Tag: @PURPOSE
[list_connections] Unclosed Anchor: [DEF:list_connections:Function] started at line 45
[list_connections] Missing Mandatory Tag: @PURPOSE
[list_connections] Unclosed Anchor: [DEF:list_connections:Function] started at line 45
[list_connections] Missing Mandatory Tag: @PURPOSE
[create_connection] Unclosed Anchor at end of file (started line 52)
[create_connection] Unclosed Anchor: [DEF:create_connection:Function] started at line 52
[create_connection] Missing Mandatory Tag: @PURPOSE
[create_connection] Unclosed Anchor: [DEF:create_connection:Function] started at line 52
[create_connection] Missing Mandatory Tag: @PURPOSE
[create_connection] Unclosed Anchor: [DEF:create_connection:Function] started at line 52
[create_connection] Missing Mandatory Tag: @PURPOSE
[create_connection] Unclosed Anchor: [DEF:create_connection:Function] started at line 52
[create_connection] Missing Mandatory Tag: @PURPOSE
[create_connection] Unclosed Anchor: [DEF:create_connection:Function] started at line 52
[create_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Unclosed Anchor at end of file (started line 63)
[delete_connection] Unclosed Anchor: [DEF:delete_connection:Function] started at line 63
[delete_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Unclosed Anchor: [DEF:delete_connection:Function] started at line 63
[delete_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Unclosed Anchor: [DEF:delete_connection:Function] started at line 63
[delete_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Unclosed Anchor: [DEF:delete_connection:Function] started at line 63
[delete_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Unclosed Anchor: [DEF:delete_connection:Function] started at line 63
[delete_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Unclosed Anchor: [DEF:delete_connection:Function] started at line 63
[delete_connection] Missing Mandatory Tag: @PURPOSE | +| backend/src/plugins/debug.py | 🔴 33% | [DebugPluginModule] Unclosed Anchor at end of file (started line 1)
[DebugPluginModule] Unclosed Anchor: [DEF:DebugPluginModule:Module] started at line 1
[DebugPlugin] Unclosed Anchor at end of file (started line 15)
[DebugPlugin] Unclosed Anchor: [DEF:DebugPlugin:Class] started at line 15
[DebugPlugin] Unclosed Anchor: [DEF:DebugPlugin:Class] started at line 15
[DebugPlugin._test_db_api] Unclosed Anchor at end of file (started line 89)
[DebugPlugin._test_db_api] Unclosed Anchor: [DEF:DebugPlugin._test_db_api:Function] started at line 89
[DebugPlugin._test_db_api] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._test_db_api] Unclosed Anchor: [DEF:DebugPlugin._test_db_api:Function] started at line 89
[DebugPlugin._test_db_api] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._test_db_api] Unclosed Anchor: [DEF:DebugPlugin._test_db_api:Function] started at line 89
[DebugPlugin._test_db_api] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Unclosed Anchor at end of file (started line 116)
[DebugPlugin._get_dataset_structure] Unclosed Anchor: [DEF:DebugPlugin._get_dataset_structure:Function] started at line 116
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Unclosed Anchor: [DEF:DebugPlugin._get_dataset_structure:Function] started at line 116
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Unclosed Anchor: [DEF:DebugPlugin._get_dataset_structure:Function] started at line 116
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Unclosed Anchor: [DEF:DebugPlugin._get_dataset_structure:Function] started at line 116
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE | +| generate_semantic_map.py | 🟢 100% | OK | +| migration_script.py | 🟢 100% | OK | +| superset_tool/exceptions.py | 🟢 100% | OK | +| superset_tool/models.py | 🟢 100% | OK | +| superset_tool/client.py | 🟢 100% | OK | +| superset_tool/__init__.py | 🟢 100% | OK | +| superset_tool/utils/init_clients.py | 🟢 100% | OK | +| superset_tool/utils/logger.py | 🟢 100% | OK | +| superset_tool/utils/fileio.py | 🟢 100% | OK | +| superset_tool/utils/network.py | 🟢 100% | OK | +| superset_tool/utils/whiptail_fallback.py | 🟢 100% | OK | +| superset_tool/utils/dataset_mapper.py | 🟢 100% | OK | +| superset_tool/utils/__init__.py | 🟢 100% | OK | +| frontend/src/main.js | 🟢 100% | OK | +| frontend/src/App.svelte | 🟢 100% | OK | +| frontend/src/lib/stores.js | 🟢 100% | OK | +| frontend/src/lib/toasts.js | 🟢 100% | OK | +| frontend/src/lib/api.js | 🟢 100% | OK | +| frontend/src/routes/migration/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/mappings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/search/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/mapper/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/debug/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/connections/+page.svelte | 🟢 100% | OK | +| frontend/src/pages/Dashboard.svelte | 🟢 100% | OK | +| frontend/src/pages/Settings.svelte | 🟢 100% | OK | +| frontend/src/components/PasswordPrompt.svelte | 🟢 100% | OK | +| frontend/src/components/MappingTable.svelte | 🟢 100% | OK | +| frontend/src/components/TaskLogViewer.svelte | 🟢 100% | OK | +| frontend/src/components/Footer.svelte | 🟢 100% | OK | +| frontend/src/components/MissingMappingModal.svelte | 🟢 100% | OK | +| frontend/src/components/DashboardGrid.svelte | 🟢 100% | OK | +| frontend/src/components/Navbar.svelte | 🟢 100% | OK | +| frontend/src/components/TaskHistory.svelte | 🟢 100% | OK | +| frontend/src/components/Toast.svelte | 🟢 100% | OK | +| frontend/src/components/TaskRunner.svelte | 🟢 100% | OK | +| frontend/src/components/TaskList.svelte | 🟢 100% | OK | +| frontend/src/components/DynamicForm.svelte | 🟢 100% | OK | +| frontend/src/components/EnvSelector.svelte | 🟢 100% | OK | +| backend/src/app.py | 🟢 100% | OK | +| backend/src/dependencies.py | 🟢 100% | OK | +| backend/src/core/superset_client.py | 🟢 100% | OK | +| backend/src/core/config_manager.py | 🟢 100% | OK | +| backend/src/core/scheduler.py | 🟢 100% | OK | +| backend/src/core/config_models.py | 🟢 100% | OK | +| backend/src/core/database.py | 🟢 100% | OK | +| backend/src/core/logger.py | 🟢 100% | OK | +| backend/src/core/plugin_loader.py | 🟢 100% | OK | +| backend/src/core/migration_engine.py | 🟢 100% | OK | +| backend/src/core/plugin_base.py | 🟢 100% | OK | +| backend/src/core/utils/matching.py | 🟢 100% | OK | +| backend/src/core/task_manager/persistence.py | 🟢 100% | OK | +| backend/src/core/task_manager/manager.py | 🟢 100% | OK | +| backend/src/core/task_manager/models.py | 🟢 100% | OK | +| backend/src/core/task_manager/cleanup.py | 🟢 100% | OK | +| backend/src/core/task_manager/__init__.py | 🟢 100% | OK | +| backend/src/api/auth.py | 🟢 100% | OK | +| backend/src/api/routes/environments.py | 🟢 100% | OK | +| backend/src/api/routes/migration.py | 🟢 100% | OK | +| backend/src/api/routes/plugins.py | 🟢 100% | OK | +| backend/src/api/routes/mappings.py | 🟢 100% | OK | +| backend/src/api/routes/settings.py | 🟢 100% | OK | +| backend/src/api/routes/tasks.py | 🟢 100% | OK | +| backend/src/models/task.py | 🟢 100% | OK | +| backend/src/models/connection.py | 🟢 100% | OK | +| backend/src/models/mapping.py | 🟢 100% | OK | +| backend/src/models/dashboard.py | 🟢 100% | OK | +| backend/src/services/mapping_service.py | 🟢 100% | OK | +| backend/src/plugins/backup.py | 🟢 100% | OK | +| backend/src/plugins/search.py | 🟢 100% | OK | +| backend/src/plugins/mapper.py | 🟢 100% | OK | +| backend/src/plugins/migration.py | 🟢 100% | OK | diff --git a/semantics/reports/semantic_report_20260112_211857.md b/semantics/reports/semantic_report_20260112_211857.md new file mode 100644 index 0000000..f756089 --- /dev/null +++ b/semantics/reports/semantic_report_20260112_211857.md @@ -0,0 +1,89 @@ +# Semantic Compliance Report + +**Generated At:** 2026-01-12T21:18:57.549358 +**Global Compliance Score:** 96.8% +**Scanned Files:** 80 + +## File Compliance Status +| File | Score | Issues | +|------|-------|--------| +| frontend/.svelte-kit/output/server/entries/pages/migration/_page.svelte.js | 🔴 0% | [handleSort] Unclosed Anchor at end of file (started line 65)
[handleSort] Unclosed Anchor: [DEF:handleSort:Function] started at line 65
[handleSelectionChange] Unclosed Anchor at end of file (started line 68)
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectAll] Unclosed Anchor at end of file (started line 71)
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[goToPage] Unclosed Anchor at end of file (started line 74)
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74 | +| frontend/src/components/tools/DebugTool.svelte | 🔴 0% | [DebugTool] Unclosed Anchor at end of file (started line 1)
[DebugTool] Unclosed Anchor: [DEF:DebugTool:Component] started at line 1 | +| backend/src/api/routes/connections.py | 🟡 58% | [ConnectionSchema] Missing Mandatory Tag: @PURPOSE
[ConnectionSchema] Missing Mandatory Tag: @PURPOSE
[ConnectionCreate] Missing Mandatory Tag: @PURPOSE
[ConnectionCreate] Missing Mandatory Tag: @PURPOSE
[list_connections] Missing Mandatory Tag: @PURPOSE
[list_connections] Missing Mandatory Tag: @PURPOSE
[create_connection] Missing Mandatory Tag: @PURPOSE
[create_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Missing Mandatory Tag: @PURPOSE
[delete_connection] Missing Mandatory Tag: @PURPOSE | +| backend/src/plugins/debug.py | 🟡 83% | [DebugPlugin._test_db_api] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._test_db_api] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._test_db_api] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE
[DebugPlugin._get_dataset_structure] Missing Mandatory Tag: @PURPOSE | +| generate_semantic_map.py | 🟢 100% | OK | +| migration_script.py | 🟢 100% | OK | +| superset_tool/exceptions.py | 🟢 100% | OK | +| superset_tool/models.py | 🟢 100% | OK | +| superset_tool/client.py | 🟢 100% | OK | +| superset_tool/__init__.py | 🟢 100% | OK | +| superset_tool/utils/init_clients.py | 🟢 100% | OK | +| superset_tool/utils/logger.py | 🟢 100% | OK | +| superset_tool/utils/fileio.py | 🟢 100% | OK | +| superset_tool/utils/network.py | 🟢 100% | OK | +| superset_tool/utils/whiptail_fallback.py | 🟢 100% | OK | +| superset_tool/utils/dataset_mapper.py | 🟢 100% | OK | +| superset_tool/utils/__init__.py | 🟢 100% | OK | +| frontend/src/main.js | 🟢 100% | OK | +| frontend/src/App.svelte | 🟢 100% | OK | +| frontend/src/lib/stores.js | 🟢 100% | OK | +| frontend/src/lib/toasts.js | 🟢 100% | OK | +| frontend/src/lib/api.js | 🟢 100% | OK | +| frontend/src/routes/migration/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/mappings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/search/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/mapper/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/debug/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/connections/+page.svelte | 🟢 100% | OK | +| frontend/src/pages/Dashboard.svelte | 🟢 100% | OK | +| frontend/src/pages/Settings.svelte | 🟢 100% | OK | +| frontend/src/components/PasswordPrompt.svelte | 🟢 100% | OK | +| frontend/src/components/MappingTable.svelte | 🟢 100% | OK | +| frontend/src/components/TaskLogViewer.svelte | 🟢 100% | OK | +| frontend/src/components/Footer.svelte | 🟢 100% | OK | +| frontend/src/components/MissingMappingModal.svelte | 🟢 100% | OK | +| frontend/src/components/DashboardGrid.svelte | 🟢 100% | OK | +| frontend/src/components/Navbar.svelte | 🟢 100% | OK | +| frontend/src/components/TaskHistory.svelte | 🟢 100% | OK | +| frontend/src/components/Toast.svelte | 🟢 100% | OK | +| frontend/src/components/TaskRunner.svelte | 🟢 100% | OK | +| frontend/src/components/TaskList.svelte | 🟢 100% | OK | +| frontend/src/components/DynamicForm.svelte | 🟢 100% | OK | +| frontend/src/components/EnvSelector.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionForm.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionList.svelte | 🟢 100% | OK | +| frontend/src/components/tools/MapperTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/SearchTool.svelte | 🟢 100% | OK | +| backend/src/app.py | 🟢 100% | OK | +| backend/src/dependencies.py | 🟢 100% | OK | +| backend/src/core/superset_client.py | 🟢 100% | OK | +| backend/src/core/config_manager.py | 🟢 100% | OK | +| backend/src/core/scheduler.py | 🟢 100% | OK | +| backend/src/core/config_models.py | 🟢 100% | OK | +| backend/src/core/database.py | 🟢 100% | OK | +| backend/src/core/logger.py | 🟢 100% | OK | +| backend/src/core/plugin_loader.py | 🟢 100% | OK | +| backend/src/core/migration_engine.py | 🟢 100% | OK | +| backend/src/core/plugin_base.py | 🟢 100% | OK | +| backend/src/core/utils/matching.py | 🟢 100% | OK | +| backend/src/core/task_manager/persistence.py | 🟢 100% | OK | +| backend/src/core/task_manager/manager.py | 🟢 100% | OK | +| backend/src/core/task_manager/models.py | 🟢 100% | OK | +| backend/src/core/task_manager/cleanup.py | 🟢 100% | OK | +| backend/src/core/task_manager/__init__.py | 🟢 100% | OK | +| backend/src/api/auth.py | 🟢 100% | OK | +| backend/src/api/routes/environments.py | 🟢 100% | OK | +| backend/src/api/routes/migration.py | 🟢 100% | OK | +| backend/src/api/routes/plugins.py | 🟢 100% | OK | +| backend/src/api/routes/mappings.py | 🟢 100% | OK | +| backend/src/api/routes/settings.py | 🟢 100% | OK | +| backend/src/api/routes/tasks.py | 🟢 100% | OK | +| backend/src/models/task.py | 🟢 100% | OK | +| backend/src/models/connection.py | 🟢 100% | OK | +| backend/src/models/mapping.py | 🟢 100% | OK | +| backend/src/models/dashboard.py | 🟢 100% | OK | +| backend/src/services/mapping_service.py | 🟢 100% | OK | +| backend/src/plugins/backup.py | 🟢 100% | OK | +| backend/src/plugins/search.py | 🟢 100% | OK | +| backend/src/plugins/mapper.py | 🟢 100% | OK | +| backend/src/plugins/migration.py | 🟢 100% | OK | diff --git a/semantics/reports/semantic_report_20260113_090204.md b/semantics/reports/semantic_report_20260113_090204.md new file mode 100644 index 0000000..b3cdda2 --- /dev/null +++ b/semantics/reports/semantic_report_20260113_090204.md @@ -0,0 +1,89 @@ +# Semantic Compliance Report + +**Generated At:** 2026-01-13T09:02:04.771961 +**Global Compliance Score:** 98.8% +**Scanned Files:** 80 + +## File Compliance Status +| File | Score | Issues | +|------|-------|--------| +| frontend/.svelte-kit/output/server/entries/pages/migration/_page.svelte.js | 🔴 0% | [handleSort] Unclosed Anchor at end of file (started line 65)
[handleSort] Unclosed Anchor: [DEF:handleSort:Function] started at line 65
[handleSelectionChange] Unclosed Anchor at end of file (started line 68)
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectAll] Unclosed Anchor at end of file (started line 71)
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[goToPage] Unclosed Anchor at end of file (started line 74)
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74 | +| generate_semantic_map.py | 🟢 100% | OK | +| migration_script.py | 🟢 100% | OK | +| superset_tool/exceptions.py | 🟢 100% | OK | +| superset_tool/models.py | 🟢 100% | OK | +| superset_tool/client.py | 🟢 100% | OK | +| superset_tool/__init__.py | 🟢 100% | OK | +| superset_tool/utils/init_clients.py | 🟢 100% | OK | +| superset_tool/utils/logger.py | 🟢 100% | OK | +| superset_tool/utils/fileio.py | 🟢 100% | OK | +| superset_tool/utils/network.py | 🟢 100% | OK | +| superset_tool/utils/whiptail_fallback.py | 🟢 100% | OK | +| superset_tool/utils/dataset_mapper.py | 🟢 100% | OK | +| superset_tool/utils/__init__.py | 🟢 100% | OK | +| frontend/src/main.js | 🟢 100% | OK | +| frontend/src/App.svelte | 🟢 100% | OK | +| frontend/src/lib/stores.js | 🟢 100% | OK | +| frontend/src/lib/toasts.js | 🟢 100% | OK | +| frontend/src/lib/api.js | 🟢 100% | OK | +| frontend/src/routes/migration/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/mappings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/search/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/mapper/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/debug/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/connections/+page.svelte | 🟢 100% | OK | +| frontend/src/pages/Dashboard.svelte | 🟢 100% | OK | +| frontend/src/pages/Settings.svelte | 🟢 100% | OK | +| frontend/src/components/PasswordPrompt.svelte | 🟢 100% | OK | +| frontend/src/components/MappingTable.svelte | 🟢 100% | OK | +| frontend/src/components/TaskLogViewer.svelte | 🟢 100% | OK | +| frontend/src/components/Footer.svelte | 🟢 100% | OK | +| frontend/src/components/MissingMappingModal.svelte | 🟢 100% | OK | +| frontend/src/components/DashboardGrid.svelte | 🟢 100% | OK | +| frontend/src/components/Navbar.svelte | 🟢 100% | OK | +| frontend/src/components/TaskHistory.svelte | 🟢 100% | OK | +| frontend/src/components/Toast.svelte | 🟢 100% | OK | +| frontend/src/components/TaskRunner.svelte | 🟢 100% | OK | +| frontend/src/components/TaskList.svelte | 🟢 100% | OK | +| frontend/src/components/DynamicForm.svelte | 🟢 100% | OK | +| frontend/src/components/EnvSelector.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionForm.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionList.svelte | 🟢 100% | OK | +| frontend/src/components/tools/MapperTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/DebugTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/SearchTool.svelte | 🟢 100% | OK | +| backend/src/app.py | 🟢 100% | OK | +| backend/src/dependencies.py | 🟢 100% | OK | +| backend/src/core/superset_client.py | 🟢 100% | OK | +| backend/src/core/config_manager.py | 🟢 100% | OK | +| backend/src/core/scheduler.py | 🟢 100% | OK | +| backend/src/core/config_models.py | 🟢 100% | OK | +| backend/src/core/database.py | 🟢 100% | OK | +| backend/src/core/logger.py | 🟢 100% | OK | +| backend/src/core/plugin_loader.py | 🟢 100% | OK | +| backend/src/core/migration_engine.py | 🟢 100% | OK | +| backend/src/core/plugin_base.py | 🟢 100% | OK | +| backend/src/core/utils/matching.py | 🟢 100% | OK | +| backend/src/core/task_manager/persistence.py | 🟢 100% | OK | +| backend/src/core/task_manager/manager.py | 🟢 100% | OK | +| backend/src/core/task_manager/models.py | 🟢 100% | OK | +| backend/src/core/task_manager/cleanup.py | 🟢 100% | OK | +| backend/src/core/task_manager/__init__.py | 🟢 100% | OK | +| backend/src/api/auth.py | 🟢 100% | OK | +| backend/src/api/routes/connections.py | 🟢 100% | OK | +| backend/src/api/routes/environments.py | 🟢 100% | OK | +| backend/src/api/routes/migration.py | 🟢 100% | OK | +| backend/src/api/routes/plugins.py | 🟢 100% | OK | +| backend/src/api/routes/mappings.py | 🟢 100% | OK | +| backend/src/api/routes/settings.py | 🟢 100% | OK | +| backend/src/api/routes/tasks.py | 🟢 100% | OK | +| backend/src/models/task.py | 🟢 100% | OK | +| backend/src/models/connection.py | 🟢 100% | OK | +| backend/src/models/mapping.py | 🟢 100% | OK | +| backend/src/models/dashboard.py | 🟢 100% | OK | +| backend/src/services/mapping_service.py | 🟢 100% | OK | +| backend/src/plugins/backup.py | 🟢 100% | OK | +| backend/src/plugins/debug.py | 🟢 100% | OK | +| backend/src/plugins/search.py | 🟢 100% | OK | +| backend/src/plugins/mapper.py | 🟢 100% | OK | +| backend/src/plugins/migration.py | 🟢 100% | OK | diff --git a/semantics/reports/semantic_report_20260113_090858.md b/semantics/reports/semantic_report_20260113_090858.md new file mode 100644 index 0000000..652f64d --- /dev/null +++ b/semantics/reports/semantic_report_20260113_090858.md @@ -0,0 +1,89 @@ +# Semantic Compliance Report + +**Generated At:** 2026-01-13T09:08:58.209356 +**Global Compliance Score:** 98.8% +**Scanned Files:** 80 + +## File Compliance Status +| File | Score | Issues | +|------|-------|--------| +| frontend/.svelte-kit/output/server/entries/pages/migration/_page.svelte.js | 🔴 0% | [handleSort] Unclosed Anchor at end of file (started line 65)
[handleSort] Unclosed Anchor: [DEF:handleSort:Function] started at line 65
[handleSelectionChange] Unclosed Anchor at end of file (started line 68)
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectionChange] Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68
[handleSelectAll] Unclosed Anchor at end of file (started line 71)
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[handleSelectAll] Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71
[goToPage] Unclosed Anchor at end of file (started line 74)
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74
[goToPage] Unclosed Anchor: [DEF:goToPage:Function] started at line 74 | +| generate_semantic_map.py | 🟢 100% | OK | +| migration_script.py | 🟢 100% | OK | +| superset_tool/exceptions.py | 🟢 100% | OK | +| superset_tool/models.py | 🟢 100% | OK | +| superset_tool/client.py | 🟢 100% | OK | +| superset_tool/__init__.py | 🟢 100% | OK | +| superset_tool/utils/init_clients.py | 🟢 100% | OK | +| superset_tool/utils/logger.py | 🟢 100% | OK | +| superset_tool/utils/fileio.py | 🟢 100% | OK | +| superset_tool/utils/network.py | 🟢 100% | OK | +| superset_tool/utils/whiptail_fallback.py | 🟢 100% | OK | +| superset_tool/utils/dataset_mapper.py | 🟢 100% | OK | +| superset_tool/utils/__init__.py | 🟢 100% | OK | +| frontend/src/main.js | 🟢 100% | OK | +| frontend/src/App.svelte | 🟢 100% | OK | +| frontend/src/lib/stores.js | 🟢 100% | OK | +| frontend/src/lib/toasts.js | 🟢 100% | OK | +| frontend/src/lib/api.js | 🟢 100% | OK | +| frontend/src/routes/migration/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/mappings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/search/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/mapper/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/debug/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/connections/+page.svelte | 🟢 100% | OK | +| frontend/src/pages/Dashboard.svelte | 🟢 100% | OK | +| frontend/src/pages/Settings.svelte | 🟢 100% | OK | +| frontend/src/components/PasswordPrompt.svelte | 🟢 100% | OK | +| frontend/src/components/MappingTable.svelte | 🟢 100% | OK | +| frontend/src/components/TaskLogViewer.svelte | 🟢 100% | OK | +| frontend/src/components/Footer.svelte | 🟢 100% | OK | +| frontend/src/components/MissingMappingModal.svelte | 🟢 100% | OK | +| frontend/src/components/DashboardGrid.svelte | 🟢 100% | OK | +| frontend/src/components/Navbar.svelte | 🟢 100% | OK | +| frontend/src/components/TaskHistory.svelte | 🟢 100% | OK | +| frontend/src/components/Toast.svelte | 🟢 100% | OK | +| frontend/src/components/TaskRunner.svelte | 🟢 100% | OK | +| frontend/src/components/TaskList.svelte | 🟢 100% | OK | +| frontend/src/components/DynamicForm.svelte | 🟢 100% | OK | +| frontend/src/components/EnvSelector.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionForm.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionList.svelte | 🟢 100% | OK | +| frontend/src/components/tools/MapperTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/DebugTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/SearchTool.svelte | 🟢 100% | OK | +| backend/src/app.py | 🟢 100% | OK | +| backend/src/dependencies.py | 🟢 100% | OK | +| backend/src/core/superset_client.py | 🟢 100% | OK | +| backend/src/core/config_manager.py | 🟢 100% | OK | +| backend/src/core/scheduler.py | 🟢 100% | OK | +| backend/src/core/config_models.py | 🟢 100% | OK | +| backend/src/core/database.py | 🟢 100% | OK | +| backend/src/core/logger.py | 🟢 100% | OK | +| backend/src/core/plugin_loader.py | 🟢 100% | OK | +| backend/src/core/migration_engine.py | 🟢 100% | OK | +| backend/src/core/plugin_base.py | 🟢 100% | OK | +| backend/src/core/utils/matching.py | 🟢 100% | OK | +| backend/src/core/task_manager/persistence.py | 🟢 100% | OK | +| backend/src/core/task_manager/manager.py | 🟢 100% | OK | +| backend/src/core/task_manager/models.py | 🟢 100% | OK | +| backend/src/core/task_manager/cleanup.py | 🟢 100% | OK | +| backend/src/core/task_manager/__init__.py | 🟢 100% | OK | +| backend/src/api/auth.py | 🟢 100% | OK | +| backend/src/api/routes/connections.py | 🟢 100% | OK | +| backend/src/api/routes/environments.py | 🟢 100% | OK | +| backend/src/api/routes/migration.py | 🟢 100% | OK | +| backend/src/api/routes/plugins.py | 🟢 100% | OK | +| backend/src/api/routes/mappings.py | 🟢 100% | OK | +| backend/src/api/routes/settings.py | 🟢 100% | OK | +| backend/src/api/routes/tasks.py | 🟢 100% | OK | +| backend/src/models/task.py | 🟢 100% | OK | +| backend/src/models/connection.py | 🟢 100% | OK | +| backend/src/models/mapping.py | 🟢 100% | OK | +| backend/src/models/dashboard.py | 🟢 100% | OK | +| backend/src/services/mapping_service.py | 🟢 100% | OK | +| backend/src/plugins/backup.py | 🟢 100% | OK | +| backend/src/plugins/debug.py | 🟢 100% | OK | +| backend/src/plugins/search.py | 🟢 100% | OK | +| backend/src/plugins/mapper.py | 🟢 100% | OK | +| backend/src/plugins/migration.py | 🟢 100% | OK | diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index 5f8a2c3..fe9f5a2 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,6 +1,6 @@ { "project_root": ".", - "generated_at": "2026-01-01T16:57:12.629465", + "generated_at": "2026-01-13T09:08:58.200446", "modules": [ { "name": "generate_semantic_map", @@ -281,294 +281,6 @@ "issues": [] } }, - { - "name": "search_script", - "type": "Module", - "start_line": 1, - "end_line": 204, - "tags": { - "SEMANTICS": "search, superset, dataset, regex, file_output", - "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c \u0432 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 Superset.", - "LAYER": "App", - "PUBLIC_API": "search_datasets, save_results_to_file, print_search_results, main" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "search_datasets", - "type": "Function", - "start_line": 22, - "end_line": 79, - "tags": { - "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u043c\u0443 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0443 \u0432 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432.", - "PRE": "`search_pattern` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 - ID \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 - \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439.", - "THROW": "SupersetAPIError, RequestException - \u041f\u0440\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 API.", - "PARAM": "logger (Optional[SupersetLogger]) - \u0418\u043d\u0441\u0442\u0430\u043d\u0441 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "RETURN": "Optional[Dict] - \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 None, \u0435\u0441\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e." - }, - "relations": [ - { - "type": "CALLS", - "target": "client.get_datasets" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "save_results_to_file", - "type": "Function", - "start_line": 81, - "end_line": 102, - "tags": { - "PURPOSE": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.", - "PRE": "`filename` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u043a \u0444\u0430\u0439\u043b\u0443.", - "POST": "\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.", - "PARAM": "logger (Optional[SupersetLogger]) - \u0418\u043d\u0441\u0442\u0430\u043d\u0441 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "RETURN": "bool - \u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "print_search_results", - "type": "Function", - "start_line": 104, - "end_line": 163, - "tags": { - "PURPOSE": "\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.", - "PRE": "`results` \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u043c `search_datasets`, \u0438\u043b\u0438 `None`.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438.", - "PARAM": "context_lines (int) - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f.", - "RETURN": "str - \u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "main", - "type": "Function", - "start_line": 165, - "end_line": 199, - "tags": { - "PURPOSE": "\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043e\u0438\u0441\u043a\u0430." - }, - "relations": [ - { - "type": "CALLS", - "target": "setup_clients" - }, - { - "type": "CALLS", - "target": "search_datasets" - }, - { - "type": "CALLS", - "target": "print_search_results" - }, - { - "type": "CALLS", - "target": "save_results_to_file" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_dataset_structure", - "type": "Module", - "start_line": 1, - "end_line": 64, - "tags": { - "SEMANTICS": "superset, dataset, structure, debug, json", - "PURPOSE": "\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438\u0437 Superset. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 API.", - "LAYER": "App", - "PUBLIC_API": "get_and_save_dataset" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils.init_clients" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils.logger" - } - ], - "children": [ - { - "name": "get_and_save_dataset", - "type": "Function", - "start_line": 18, - "end_line": 53, - "tags": { - "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438\u0437 Superset \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0435\u0435 \u0432 JSON-\u0444\u0430\u0439\u043b.", - "PARAM": "output_path (str) - \u041f\u0443\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f JSON-\u0444\u0430\u0439\u043b\u0430." - }, - "relations": [ - { - "type": "CALLS", - "target": "setup_clients" - }, - { - "type": "CALLS", - "target": "superset_client.get_dataset" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "debug_db_api", - "type": "Module", - "start_line": 1, - "end_line": 79, - "tags": { - "SEMANTICS": "debug, api, database, script", - "PURPOSE": "\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u0442\u0432\u0435\u0442\u0430 API \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445.", - "LAYER": "App", - "PUBLIC_API": "debug_database_api" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "debug_database_api", - "type": "Function", - "start_line": 18, - "end_line": 74, - "tags": { - "PURPOSE": "\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u0442\u0432\u0435\u0442\u0430 API \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445." - }, - "relations": [ - { - "type": "CALLS", - "target": "setup_clients" - }, - { - "type": "CALLS", - "target": "client.get_databases" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "run_mapper", - "type": "Module", - "start_line": 1, - "end_line": 72, - "tags": { - "SEMANTICS": "runner, configuration, cli, main", - "PURPOSE": "\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f CLI-\u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432.", - "LAYER": "App", - "PUBLIC_API": "main" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils.dataset_mapper" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "main", - "type": "Function", - "start_line": 18, - "end_line": 67, - "tags": { - "PURPOSE": "\u041f\u0430\u0440\u0441\u0438\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0430." - }, - "relations": [ - { - "type": "CREATES_INSTANCE_OF", - "target": "DatasetMapper" - }, - { - "type": "CALLS", - "target": "setup_clients" - }, - { - "type": "CALLS", - "target": "DatasetMapper.run_mapping" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "migration_script", "type": "Module", @@ -876,118 +588,6 @@ "issues": [] } }, - { - "name": "backup_script", - "type": "Module", - "start_line": 1, - "end_line": 163, - "tags": { - "SEMANTICS": "backup, superset, automation, dashboard", - "PURPOSE": "\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 Superset.", - "LAYER": "App", - "PUBLIC_API": "BackupConfig, backup_dashboards, main" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "BackupConfig", - "type": "DataClass", - "start_line": 30, - "end_line": 39, - "tags": { - "PURPOSE": "\u0425\u0440\u0430\u043d\u0438\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0431\u044d\u043a\u0430\u043f\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backup_dashboards", - "type": "Function", - "start_line": 41, - "end_line": 114, - "tags": { - "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0431\u044d\u043a\u0430\u043f \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430.", - "PRE": "`backup_root` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0431\u044d\u043a\u0430\u043f\u0430.", - "POST": "\u0414\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f. \u041e\u0448\u0438\u0431\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043b\u043e\u0433\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.", - "PARAM": "config (BackupConfig) - \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0431\u044d\u043a\u0430\u043f\u0430.", - "RETURN": "bool - `True` \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u0431\u044b\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0431\u0435\u0437 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, `False` \u0438\u043d\u0430\u0447\u0435." - }, - "relations": [ - { - "type": "CALLS", - "target": "client.get_dashboards" - }, - { - "type": "CALLS", - "target": "client.export_dashboard" - }, - { - "type": "CALLS", - "target": "save_and_unpack_dashboard" - }, - { - "type": "CALLS", - "target": "archive_exports" - }, - { - "type": "CALLS", - "target": "consolidate_archive_folders" - }, - { - "type": "CALLS", - "target": "remove_empty_directories" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "main", - "type": "Function", - "start_line": 116, - "end_line": 158, - "tags": { - "PURPOSE": "\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.", - "RETURN": "int - \u041a\u043e\u0434 \u0432\u044b\u0445\u043e\u0434\u0430 (0 - \u0443\u0441\u043f\u0435\u0445, 1 - \u043e\u0448\u0438\u0431\u043a\u0430)." - }, - "relations": [ - { - "type": "CALLS", - "target": "setup_clients" - }, - { - "type": "CALLS", - "target": "backup_dashboards" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "superset_tool.exceptions", "type": "Module", @@ -1256,18 +856,127 @@ } }, { - "name": "superset_tool", + "name": "superset_tool.models", "type": "Module", "start_line": 1, - "end_line": 14, + "end_line": 87, "tags": { - "SEMANTICS": "package, root", - "PURPOSE": "Root package for superset_tool.", - "LAYER": "Domain", - "PUBLIC_API": "SupersetClient, SupersetConfig" + "SEMANTICS": "pydantic, model, config, validation, data-structure", + "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 Pydantic-\u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445.", + "LAYER": "Infra", + "PUBLIC_API": "SupersetConfig, DatabaseConfig" }, - "relations": [], - "children": [], + "relations": [ + { + "type": "DEPENDS_ON", + "target": "pydantic" + }, + { + "type": "DEPENDS_ON", + "target": "superset_tool.utils.logger" + } + ], + "children": [ + { + "name": "SupersetConfig", + "type": "Class", + "start_line": 17, + "end_line": 61, + "tags": { + "PURPOSE": "\u041c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443 Superset API." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "pydantic.BaseModel" + } + ], + "children": [ + { + "name": "SupersetConfig.validate_auth", + "type": "Function", + "start_line": 28, + "end_line": 40, + "tags": { + "PURPOSE": "\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044c `auth` \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f.", + "PRE": "`v` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 `v`, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (`provider`, `username`, `password`, `refresh`) \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.", + "THROW": "ValueError - \u0415\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f.", + "PARAM": "v (Dict[str, str]) - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f auth." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SupersetConfig.normalize_base_url", + "type": "Function", + "start_line": 42, + "end_line": 57, + "tags": { + "PURPOSE": "\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u0442 `base_url`, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f `/api/v1`, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.", + "PRE": "`v` \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 `v`.", + "THROW": "ValueError - \u0415\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442 URL \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.", + "PARAM": "v (str) - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f base_url." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DatabaseConfig", + "type": "Class", + "start_line": 63, + "end_line": 85, + "tags": { + "PURPOSE": "\u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "pydantic.BaseModel" + } + ], + "children": [ + { + "name": "DatabaseConfig.validate_config", + "type": "Function", + "start_line": 70, + "end_line": 81, + "tags": { + "PURPOSE": "\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044c `database_config` \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043b\u044e\u0447\u0438 'old' \u0438 'new'.", + "PRE": "`v` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 `v`, \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447\u0438 'old' \u0438 'new' \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.", + "THROW": "ValueError - \u0415\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438.", + "PARAM": "v (Dict[str, Dict[str, Any]]) - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f database_config." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -1827,121 +1536,73 @@ } }, { - "name": "superset_tool.models", + "name": "superset_tool", "type": "Module", "start_line": 1, - "end_line": 87, + "end_line": 14, "tags": { - "SEMANTICS": "pydantic, model, config, validation, data-structure", - "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 Pydantic-\u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445.", + "SEMANTICS": "package, root", + "PURPOSE": "Root package for superset_tool.", + "LAYER": "Domain", + "PUBLIC_API": "SupersetClient, SupersetConfig" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "superset_tool.utils.init_clients", + "type": "Module", + "start_line": 1, + "end_line": 110, + "tags": { + "SEMANTICS": "utility, factory, client, initialization, configuration", + "PURPOSE": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u044b Superset \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 (DEV, PROD, SBX, PREPROD), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `keyring` \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u043e\u043b\u044f\u043c.", "LAYER": "Infra", - "PUBLIC_API": "SupersetConfig, DatabaseConfig" + "PUBLIC_API": "setup_clients" }, "relations": [ { "type": "DEPENDS_ON", - "target": "pydantic" + "target": "superset_tool.models" }, { "type": "DEPENDS_ON", - "target": "superset_tool.utils.logger" + "target": "superset_tool.client" + }, + { + "type": "DEPENDS_ON", + "target": "keyring" } ], "children": [ { - "name": "SupersetConfig", - "type": "Class", - "start_line": 17, - "end_line": 61, + "name": "setup_clients", + "type": "Function", + "start_line": 20, + "end_line": 108, "tags": { - "PURPOSE": "\u041c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443 Superset API." + "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 `SupersetClient`.", + "PRE": "`logger` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c `SupersetLogger`.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438.", + "THROW": "Exception - \u041f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.", + "PARAM": "custom_envs (List[Dict[str, Any]]) - \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439.", + "RETURN": "Dict[str, SupersetClient] - \u0421\u043b\u043e\u0432\u0430\u0440\u044c, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 - \u0438\u043c\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 - `SupersetClient`." }, "relations": [ { - "type": "INHERITS_FROM", - "target": "pydantic.BaseModel" - } - ], - "children": [ - { - "name": "SupersetConfig.validate_auth", - "type": "Function", - "start_line": 28, - "end_line": 40, - "tags": { - "PURPOSE": "\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044c `auth` \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f.", - "PRE": "`v` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 `v`, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (`provider`, `username`, `password`, `refresh`) \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.", - "THROW": "ValueError - \u0415\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f.", - "PARAM": "v (Dict[str, str]) - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f auth." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } + "type": "CREATES_INSTANCE_OF", + "target": "SupersetConfig" }, { - "name": "SupersetConfig.normalize_base_url", - "type": "Function", - "start_line": 42, - "end_line": 57, - "tags": { - "PURPOSE": "\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u0442 `base_url`, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f `/api/v1`, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.", - "PRE": "`v` \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 `v`.", - "THROW": "ValueError - \u0415\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442 URL \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.", - "PARAM": "v (str) - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f base_url." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DatabaseConfig", - "type": "Class", - "start_line": 63, - "end_line": 85, - "tags": { - "PURPOSE": "\u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432." - }, - "relations": [ - { - "type": "INHERITS_FROM", - "target": "pydantic.BaseModel" - } - ], - "children": [ - { - "name": "DatabaseConfig.validate_config", - "type": "Function", - "start_line": 70, - "end_line": 81, - "tags": { - "PURPOSE": "\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044c `database_config` \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043b\u044e\u0447\u0438 'old' \u0438 'new'.", - "PRE": "`v` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 `v`, \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447\u0438 'old' \u0438 'new' \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.", - "THROW": "ValueError - \u0415\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438.", - "PARAM": "v (Dict[str, Dict[str, Any]]) - \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f database_config." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } + "type": "CREATES_INSTANCE_OF", + "target": "SupersetClient" } ], + "children": [], "compliance": { "valid": true, "issues": [] @@ -2123,6 +1784,290 @@ "issues": [] } }, + { + "name": "superset_tool.utils.fileio", + "type": "Module", + "start_line": 1, + "end_line": 458, + "tags": { + "SEMANTICS": "file, io, zip, yaml, temp, archive, utility", + "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 ZIP, \u0444\u0430\u0439\u043b\u0430\u043c\u0438 YAML \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439.", + "LAYER": "Infra", + "PUBLIC_API": "create_temp_file, remove_empty_directories, read_dashboard_from_disk, calculate_crc32, RetentionPolicy, archive_exports, save_and_unpack_dashboard, update_yamls, create_dashboard_export, sanitize_filename, get_filename_from_headers, consolidate_archive_folders" + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "superset_tool.exceptions" + }, + { + "type": "DEPENDS_ON", + "target": "superset_tool.utils.logger" + }, + { + "type": "DEPENDS_ON", + "target": "pyyaml" + } + ], + "children": [ + { + "name": "create_temp_file", + "type": "Function", + "start_line": 29, + "end_line": 67, + "tags": { + "PURPOSE": "\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", + "YIELDS": "Path - \u041f\u0443\u0442\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443.", + "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "remove_empty_directories", + "type": "Function", + "start_line": 69, + "end_line": 91, + "tags": { + "PURPOSE": "\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", + "RETURN": "int - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "read_dashboard_from_disk", + "type": "Function", + "start_line": 93, + "end_line": 108, + "tags": { + "PURPOSE": "\u0427\u0438\u0442\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", + "RETURN": "Tuple[bytes, str] - \u041a\u043e\u0440\u0442\u0435\u0436 (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430).", + "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "calculate_crc32", + "type": "Function", + "start_line": 110, + "end_line": 119, + "tags": { + "PURPOSE": "\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 CRC32 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.", + "PARAM": "file_path (Path) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.", + "RETURN": "str - 8-\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 CRC32.", + "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "RetentionPolicy", + "type": "DataClass", + "start_line": 121, + "end_line": 128, + "tags": { + "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 (\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435, \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435)." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "archive_exports", + "type": "Function", + "start_line": 130, + "end_line": 210, + "tags": { + "PURPOSE": "\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430." + }, + "relations": [ + { + "type": "CALLS", + "target": "apply_retention_policy" + }, + { + "type": "CALLS", + "target": "calculate_crc32" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "apply_retention_policy", + "type": "Function", + "start_line": 212, + "end_line": 243, + "tags": { + "PURPOSE": "(Helper) \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0442\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.", + "PARAM": "logger (SupersetLogger) - \u041b\u043e\u0433\u0433\u0435\u0440.", + "RETURN": "set - \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "save_and_unpack_dashboard", + "type": "Function", + "start_line": 245, + "end_line": 273, + "tags": { + "PURPOSE": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", + "RETURN": "Tuple[Path, Optional[Path]] - \u041f\u0443\u0442\u044c \u043a ZIP-\u0444\u0430\u0439\u043b\u0443 \u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e, \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439.", + "THROW": "InvalidZipFormatError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 ZIP." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_yamls", + "type": "Function", + "start_line": 275, + "end_line": 294, + "tags": { + "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 YAML-\u0444\u0430\u0439\u043b\u0430\u0445, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f regex.", + "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 `path` \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430." + }, + "relations": [ + { + "type": "CALLS", + "target": "_update_yaml_file" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_update_yaml_file", + "type": "Function", + "start_line": 296, + "end_line": 355, + "tags": { + "PURPOSE": "(Helper) \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d YAML \u0444\u0430\u0439\u043b.", + "PARAM": "logger (SupersetLogger) - \u041b\u043e\u0433\u0433\u0435\u0440." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "create_dashboard_export", + "type": "Function", + "start_line": 357, + "end_line": 382, + "tags": { + "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 ZIP-\u0430\u0440\u0445\u0438\u0432 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", + "RETURN": "bool - `True` \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435, `False` \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "sanitize_filename", + "type": "Function", + "start_line": 384, + "end_line": 390, + "tags": { + "PURPOSE": "\u041e\u0447\u0438\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.", + "PARAM": "filename (str) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.", + "RETURN": "str - \u041e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_filename_from_headers", + "type": "Function", + "start_line": 392, + "end_line": 401, + "tags": { + "PURPOSE": "\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 'Content-Disposition'.", + "PARAM": "headers (dict) - \u0421\u043b\u043e\u0432\u0430\u0440\u044c HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.", + "RETURN": "Optional[str] - \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 `None`." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "consolidate_archive_folders", + "type": "Function", + "start_line": 403, + "end_line": 456, + "tags": { + "PURPOSE": "\u041a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0430\u0433\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438.", + "THROW": "TypeError, ValueError - \u0415\u0441\u043b\u0438 `root_directory` \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.", + "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "superset_tool.utils.network", "type": "Module", @@ -2629,336 +2574,105 @@ } }, { - "name": "superset_tool.utils.init_clients", - "type": "Module", - "start_line": 1, - "end_line": 110, + "name": "handleSort", + "type": "Function", + "start_line": 65, + "end_line": null, "tags": { - "SEMANTICS": "utility, factory, client, initialization, configuration", - "PURPOSE": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u044b Superset \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 (DEV, PROD, SBX, PREPROD), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f `keyring` \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u043e\u043b\u044f\u043c.", - "LAYER": "Infra", - "PUBLIC_API": "setup_clients" + "PURPOSE": "Toggles sort direction or changes sort column." }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.models" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "keyring" - } - ], + "relations": [], "children": [ { - "name": "setup_clients", + "name": "handleSelectionChange", "type": "Function", - "start_line": 20, - "end_line": 108, + "start_line": 68, + "end_line": null, "tags": { - "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 `SupersetClient`.", - "PRE": "`logger` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c `SupersetLogger`.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438.", - "THROW": "Exception - \u041f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.", - "PARAM": "custom_envs (List[Dict[str, Any]]) - \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439.", - "RETURN": "Dict[str, SupersetClient] - \u0421\u043b\u043e\u0432\u0430\u0440\u044c, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 - \u0438\u043c\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 - `SupersetClient`." + "PURPOSE": "Handles individual checkbox changes." }, - "relations": [ + "relations": [], + "children": [ { - "type": "CREATES_INSTANCE_OF", - "target": "SupersetConfig" - }, - { - "type": "CREATES_INSTANCE_OF", - "target": "SupersetClient" + "name": "handleSelectAll", + "type": "Function", + "start_line": 71, + "end_line": null, + "tags": { + "PURPOSE": "Handles select all checkbox." + }, + "relations": [], + "children": [ + { + "name": "goToPage", + "type": "Function", + "start_line": 74, + "end_line": null, + "tags": { + "PURPOSE": "Changes current page." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 74)", + "Unclosed Anchor: [DEF:goToPage:Function] started at line 74", + "Unclosed Anchor: [DEF:goToPage:Function] started at line 74", + "Unclosed Anchor: [DEF:goToPage:Function] started at line 74", + "Unclosed Anchor: [DEF:goToPage:Function] started at line 74" + ] + } + } + ], + "compliance": { + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 71)", + "Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71", + "Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71", + "Unclosed Anchor: [DEF:handleSelectAll:Function] started at line 71" + ] + } } ], - "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 68)", + "Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68", + "Unclosed Anchor: [DEF:handleSelectionChange:Function] started at line 68" + ] } } ], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 65)", + "Unclosed Anchor: [DEF:handleSort:Function] started at line 65" + ] } }, { - "name": "superset_tool.utils.fileio", + "name": "main", "type": "Module", "start_line": 1, - "end_line": 458, + "end_line": 18, "tags": { - "SEMANTICS": "file, io, zip, yaml, temp, archive, utility", - "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 ZIP, \u0444\u0430\u0439\u043b\u0430\u043c\u0438 YAML \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439.", - "LAYER": "Infra", - "PUBLIC_API": "create_temp_file, remove_empty_directories, read_dashboard_from_disk, calculate_crc32, RetentionPolicy, archive_exports, save_and_unpack_dashboard, update_yamls, create_dashboard_export, sanitize_filename, get_filename_from_headers, consolidate_archive_folders" + "SEMANTICS": "entrypoint, svelte, init", + "PURPOSE": "Entry point for the Svelte application.", + "LAYER": "UI-Entry" }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "superset_tool.exceptions" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils.logger" - }, - { - "type": "DEPENDS_ON", - "target": "pyyaml" - } - ], + "relations": [], "children": [ { - "name": "create_temp_file", - "type": "Function", - "start_line": 29, - "end_line": 67, + "name": "app_instance", + "type": "Data", + "start_line": 9, + "end_line": 15, "tags": { - "PURPOSE": "\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "YIELDS": "Path - \u041f\u0443\u0442\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443.", - "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "remove_empty_directories", - "type": "Function", - "start_line": 69, - "end_line": 91, - "tags": { - "PURPOSE": "\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "RETURN": "int - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "read_dashboard_from_disk", - "type": "Function", - "start_line": 93, - "end_line": 108, - "tags": { - "PURPOSE": "\u0427\u0438\u0442\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "RETURN": "Tuple[bytes, str] - \u041a\u043e\u0440\u0442\u0435\u0436 (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430).", - "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "calculate_crc32", - "type": "Function", - "start_line": 110, - "end_line": 119, - "tags": { - "PURPOSE": "\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 CRC32 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.", - "PARAM": "file_path (Path) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.", - "RETURN": "str - 8-\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 CRC32.", - "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "RetentionPolicy", - "type": "DataClass", - "start_line": 121, - "end_line": 128, - "tags": { - "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 (\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435, \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435)." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "archive_exports", - "type": "Function", - "start_line": 130, - "end_line": 210, - "tags": { - "PURPOSE": "\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430." - }, - "relations": [ - { - "type": "CALLS", - "target": "apply_retention_policy" - }, - { - "type": "CALLS", - "target": "calculate_crc32" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "apply_retention_policy", - "type": "Function", - "start_line": 212, - "end_line": 243, - "tags": { - "PURPOSE": "(Helper) \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0442\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.", - "PARAM": "logger (SupersetLogger) - \u041b\u043e\u0433\u0433\u0435\u0440.", - "RETURN": "set - \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "save_and_unpack_dashboard", - "type": "Function", - "start_line": 245, - "end_line": 273, - "tags": { - "PURPOSE": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "RETURN": "Tuple[Path, Optional[Path]] - \u041f\u0443\u0442\u044c \u043a ZIP-\u0444\u0430\u0439\u043b\u0443 \u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e, \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439.", - "THROW": "InvalidZipFormatError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 ZIP." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "update_yamls", - "type": "Function", - "start_line": 275, - "end_line": 294, - "tags": { - "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 YAML-\u0444\u0430\u0439\u043b\u0430\u0445, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f regex.", - "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 `path` \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430." - }, - "relations": [ - { - "type": "CALLS", - "target": "_update_yaml_file" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_update_yaml_file", - "type": "Function", - "start_line": 296, - "end_line": 355, - "tags": { - "PURPOSE": "(Helper) \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d YAML \u0444\u0430\u0439\u043b.", - "PARAM": "logger (SupersetLogger) - \u041b\u043e\u0433\u0433\u0435\u0440." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "create_dashboard_export", - "type": "Function", - "start_line": 357, - "end_line": 382, - "tags": { - "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 ZIP-\u0430\u0440\u0445\u0438\u0432 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430.", - "RETURN": "bool - `True` \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435, `False` \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "sanitize_filename", - "type": "Function", - "start_line": 384, - "end_line": 390, - "tags": { - "PURPOSE": "\u041e\u0447\u0438\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.", - "PARAM": "filename (str) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.", - "RETURN": "str - \u041e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_filename_from_headers", - "type": "Function", - "start_line": 392, - "end_line": 401, - "tags": { - "PURPOSE": "\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 'Content-Disposition'.", - "PARAM": "headers (dict) - \u0421\u043b\u043e\u0432\u0430\u0440\u044c HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.", - "RETURN": "Optional[str] - \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 `None`." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "consolidate_archive_folders", - "type": "Function", - "start_line": 403, - "end_line": 456, - "tags": { - "PURPOSE": "\u041a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0430\u0433\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438.", - "THROW": "TypeError, ValueError - \u0415\u0441\u043b\u0438 `root_directory` \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.", - "PARAM": "logger (Optional[SupersetLogger]) - \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043b\u043e\u0433\u0433\u0435\u0440\u0430." + "PURPOSE": "Initialized Svelte app instance." }, "relations": [], "children": [], @@ -3025,1015 +2739,6 @@ "issues": [] } }, - { - "name": "main", - "type": "Module", - "start_line": 1, - "end_line": 18, - "tags": { - "SEMANTICS": "entrypoint, svelte, init", - "PURPOSE": "Entry point for the Svelte application.", - "LAYER": "UI-Entry" - }, - "relations": [], - "children": [ - { - "name": "app_instance", - "type": "Data", - "start_line": 9, - "end_line": 15, - "tags": { - "PURPOSE": "Initialized Svelte app instance." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DashboardGrid", - "type": "Component", - "start_line": 1, - "end_line": 205, - "tags": { - "SEMANTICS": "dashboard, grid, selection, pagination", - "PURPOSE": "Displays a grid of dashboards with selection and pagination.", - "LAYER": "Component", - "RELATION": "USED_BY -> frontend/src/routes/migration/+page.svelte", - "INVARIANT": "Selected IDs must be a subset of available dashboards." - }, - "relations": [], - "children": [ - { - "name": "handleSort", - "type": "Function", - "start_line": 62, - "end_line": 72, - "tags": { - "PURPOSE": "Toggles sort direction or changes sort column." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSelectionChange", - "type": "Function", - "start_line": 74, - "end_line": 86, - "tags": { - "PURPOSE": "Handles individual checkbox changes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSelectAll", - "type": "Function", - "start_line": 88, - "end_line": 104, - "tags": { - "PURPOSE": "Handles select all checkbox." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "goToPage", - "type": "Function", - "start_line": 106, - "end_line": 113, - "tags": { - "PURPOSE": "Changes current page." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskHistory", - "type": "Component", - "start_line": 1, - "end_line": 197, - "tags": { - "SEMANTICS": "task, history, list, status, monitoring", - "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/lib/api.js (inferred)" - }, - "relations": [], - "children": [ - { - "name": "fetchTasks", - "type": "Function", - "start_line": 18, - "end_line": 46, - "tags": { - "PURPOSE": "Fetches the list of recent tasks from the API." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "clearTasks", - "type": "Function", - "start_line": 48, - "end_line": 65, - "tags": { - "PURPOSE": "Clears tasks from the history, optionally filtered by status." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "selectTask", - "type": "Function", - "start_line": 67, - "end_line": 85, - "tags": { - "PURPOSE": "Selects a task and fetches its full details." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getStatusColor", - "type": "Function", - "start_line": 87, - "end_line": 99, - "tags": { - "PURPOSE": "Returns the CSS color class for a given task status." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onMount", - "type": "Function", - "start_line": 101, - "end_line": 107, - "tags": { - "PURPOSE": "Initializes the component by fetching tasks and starting polling." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onDestroy", - "type": "Function", - "start_line": 109, - "end_line": 114, - "tags": { - "PURPOSE": "Cleans up the polling interval when the component is destroyed." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MappingTable", - "type": "Component", - "start_line": 1, - "end_line": 94, - "tags": { - "SEMANTICS": "mapping, table, database, editor", - "PURPOSE": "Displays and allows editing of database mappings.", - "LAYER": "Feature", - "RELATION": "BINDS_TO -> mappings state", - "INVARIANT": "Each source database can be mapped to one target database." - }, - "relations": [], - "children": [ - { - "name": "updateMapping", - "type": "Function", - "start_line": 25, - "end_line": 32, - "tags": { - "PURPOSE": "Updates a mapping for a specific source database." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getSuggestion", - "type": "Function", - "start_line": 34, - "end_line": 41, - "tags": { - "PURPOSE": "Finds a suggestion for a source database." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "EnvSelector", - "type": "Component", - "start_line": 1, - "end_line": 58, - "tags": { - "SEMANTICS": "environment, selector, dropdown, migration", - "PURPOSE": "Provides a UI component for selecting source and target environments.", - "LAYER": "Feature", - "RELATION": "BINDS_TO -> environments store", - "INVARIANT": "Source and target environments must be selectable from the list of configured environments." - }, - "relations": [], - "children": [ - { - "name": "handleSelect", - "type": "Function", - "start_line": 24, - "end_line": 34, - "tags": { - "PURPOSE": "Dispatches the selection change event.", - "PARAM": "{Event} event - The change event from the select element." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskList", - "type": "Component", - "start_line": 1, - "end_line": 103, - "tags": { - "SEMANTICS": "tasks, list, status, history", - "PURPOSE": "Displays a list of tasks with their status and execution details.", - "LAYER": "Component", - "RELATION": "USES -> api.js" - }, - "relations": [], - "children": [ - { - "name": "getStatusColor", - "type": "Function", - "start_line": 18, - "end_line": 31, - "tags": { - "PURPOSE": "Returns the CSS color class for a given task status." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "formatTime", - "type": "Function", - "start_line": 33, - "end_line": 43, - "tags": { - "PURPOSE": "Formats a date string using date-fns." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleTaskClick", - "type": "Function", - "start_line": 45, - "end_line": 50, - "tags": { - "PURPOSE": "Dispatches a select event when a task is clicked." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DynamicForm", - "type": "Component", - "start_line": 1, - "end_line": 88, - "tags": { - "SEMANTICS": "form, schema, dynamic, json-schema", - "PURPOSE": "Generates a form dynamically based on a JSON schema.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> svelte:createEventDispatcher", - "PROPS": "", - "EVENTS": "" - }, - "relations": [], - "children": [ - { - "name": "handleSubmit", - "type": "Function", - "start_line": 23, - "end_line": 31, - "tags": { - "PURPOSE": "Dispatches the submit event with the form data." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "initializeForm", - "type": "Function", - "start_line": 33, - "end_line": 44, - "tags": { - "PURPOSE": "Initialize form data with default values from the schema." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Footer", - "type": "Component", - "start_line": 1, - "end_line": 10, - "tags": { - "SEMANTICS": "footer, layout, copyright", - "PURPOSE": "Displays the application footer with copyright information.", - "LAYER": "UI" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Navbar", - "type": "Component", - "start_line": 1, - "end_line": 46, - "tags": { - "SEMANTICS": "navbar, navigation, header, layout", - "PURPOSE": "Main navigation bar for the application.", - "LAYER": "UI", - "RELATION": "USES -> $app/stores" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskRunner", - "type": "Component", - "start_line": 1, - "end_line": 379, - "tags": { - "SEMANTICS": "task, runner, logs, websocket", - "PURPOSE": "Connects to a WebSocket to display real-time logs for a running task.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", - "PROPS": "None", - "EVENTS": "None" - }, - "relations": [], - "children": [ - { - "name": "connect", - "type": "Function", - "start_line": 38, - "end_line": 130, - "tags": { - "PURPOSE": "Establishes WebSocket connection with exponential backoff." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "fetchTargetDatabases", - "type": "Function", - "start_line": 132, - "end_line": 152, - "tags": { - "PURPOSE": "Fetches the list of databases in the target environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleMappingResolve", - "type": "Function", - "start_line": 154, - "end_line": 195, - "tags": { - "PURPOSE": "Handles the resolution of a missing database mapping." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handlePasswordResume", - "type": "Function", - "start_line": 197, - "end_line": 217, - "tags": { - "PURPOSE": "Handles the submission of database passwords to resume a task." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "startDataTimeout", - "type": "Function", - "start_line": 219, - "end_line": 229, - "tags": { - "PURPOSE": "Starts a timeout to detect when the log stream has stalled." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resetDataTimeout", - "type": "Function", - "start_line": 231, - "end_line": 238, - "tags": { - "PURPOSE": "Resets the data stall timeout." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onMount", - "type": "Function", - "start_line": 240, - "end_line": 265, - "tags": { - "PURPOSE": "Initializes the component and subscribes to task selection changes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onDestroy", - "type": "Function", - "start_line": 267, - "end_line": 279, - "tags": { - "PURPOSE": "Close WebSocket connection when the component is destroyed." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskLogViewer", - "type": "Component", - "start_line": 1, - "end_line": 171, - "tags": { - "SEMANTICS": "task, log, viewer, modal", - "PURPOSE": "Displays detailed logs for a specific task in a modal.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/lib/api.js (inferred)" - }, - "relations": [], - "children": [ - { - "name": "fetchLogs", - "type": "Function", - "start_line": 25, - "end_line": 40, - "tags": { - "PURPOSE": "Fetches logs for the current task." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "scrollToBottom", - "type": "Function", - "start_line": 42, - "end_line": 51, - "tags": { - "PURPOSE": "Scrolls the log container to the bottom." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleScroll", - "type": "Function", - "start_line": 53, - "end_line": 62, - "tags": { - "PURPOSE": "Updates auto-scroll preference based on scroll position." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "close", - "type": "Function", - "start_line": 64, - "end_line": 70, - "tags": { - "PURPOSE": "Closes the log viewer modal." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getLogLevelColor", - "type": "Function", - "start_line": 72, - "end_line": 83, - "tags": { - "PURPOSE": "Returns the CSS color class for a given log level." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onDestroy", - "type": "Function", - "start_line": 100, - "end_line": 105, - "tags": { - "PURPOSE": "Cleans up the polling interval." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "PasswordPrompt", - "type": "Component", - "start_line": 1, - "end_line": 129, - "tags": { - "SEMANTICS": "password, prompt, modal, input, security", - "PURPOSE": "A modal component to prompt the user for database passwords when a migration task is paused.", - "LAYER": "UI", - "RELATION": "EMITS -> resume, cancel" - }, - "relations": [], - "children": [ - { - "name": "handleSubmit", - "type": "Function", - "start_line": 21, - "end_line": 37, - "tags": { - "PURPOSE": "Validates and dispatches the passwords to resume the task." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleCancel", - "type": "Function", - "start_line": 39, - "end_line": 45, - "tags": { - "PURPOSE": "Cancels the password prompt." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MissingMappingModal", - "type": "Component", - "start_line": 1, - "end_line": 114, - "tags": { - "SEMANTICS": "modal, mapping, prompt, migration", - "PURPOSE": "Prompts the user to provide a database mapping when one is missing during migration.", - "LAYER": "Feature", - "RELATION": "DISPATCHES -> resolve", - "INVARIANT": "Modal blocks migration progress until resolved or cancelled." - }, - "relations": [], - "children": [ - { - "name": "resolve", - "type": "Function", - "start_line": 26, - "end_line": 37, - "tags": { - "PURPOSE": "Dispatches the resolution event with the selected mapping." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "cancel", - "type": "Function", - "start_line": 39, - "end_line": 45, - "tags": { - "PURPOSE": "Cancels the mapping resolution modal." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Toast", - "type": "Component", - "start_line": 1, - "end_line": 31, - "tags": { - "SEMANTICS": "toast, notification, feedback, ui", - "PURPOSE": "Displays transient notifications (toasts) in the bottom-right corner.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> frontend/src/lib/toasts.js", - "PROPS": "None", - "EVENTS": "None" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Settings", - "type": "Component", - "start_line": 1, - "end_line": 333, - "tags": { - "SEMANTICS": "settings, ui, configuration", - "PURPOSE": "The main settings page for the application, allowing management of environments and global settings.", - "LAYER": "UI", - "RELATION": "USES -> stores.js", - "PROPS": "None", - "EVENTS": "None", - "INVARIANT": "Settings changes must be saved to the backend." - }, - "relations": [], - "children": [ - { - "name": "loadSettings", - "type": "Function", - "start_line": 50, - "end_line": 65, - "tags": { - "PURPOSE": "Loads settings from the backend." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSaveGlobal", - "type": "Function", - "start_line": 67, - "end_line": 82, - "tags": { - "PURPOSE": "Saves global settings to the backend." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleAddOrUpdateEnv", - "type": "Function", - "start_line": 84, - "end_line": 106, - "tags": { - "PURPOSE": "Adds or updates an environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleDeleteEnv", - "type": "Function", - "start_line": 108, - "end_line": 127, - "tags": { - "PURPOSE": "Deletes an environment.", - "PARAM": "{string} id - The ID of the environment to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleTestEnv", - "type": "Function", - "start_line": 129, - "end_line": 150, - "tags": { - "PURPOSE": "Tests the connection to an environment.", - "PARAM": "{string} id - The ID of the environment to test." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "editEnv", - "type": "Function", - "start_line": 152, - "end_line": 161, - "tags": { - "PURPOSE": "Sets the form to edit an existing environment.", - "PARAM": "{Object} env - The environment object to edit." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resetEnvForm", - "type": "Function", - "start_line": 163, - "end_line": 182, - "tags": { - "PURPOSE": "Resets the environment form." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Dashboard", - "type": "Component", - "start_line": 1, - "end_line": 60, - "tags": { - "SEMANTICS": "dashboard, plugins, tools, list", - "PURPOSE": "Displays the list of available plugins and allows selecting one.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", - "PROPS": "None", - "EVENTS": "None" - }, - "relations": [], - "children": [ - { - "name": "onMount", - "type": "Function", - "start_line": 17, - "end_line": 25, - "tags": { - "PURPOSE": "Fetch plugins when the component mounts." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "selectPlugin", - "type": "Function", - "start_line": 27, - "end_line": 36, - "tags": { - "PURPOSE": "Selects a plugin to display its form.", - "PARAM": "{Object} plugin - The plugin object to select." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "stores_module", "type": "Module", @@ -4546,15 +3251,14 @@ } }, { - "name": "Dependencies", - "type": "Module", + "name": "SearchPage", + "type": "Component", "start_line": 1, - "end_line": 50, + "end_line": 26, "tags": { - "SEMANTICS": "dependency, injection, singleton, factory", - "PURPOSE": "Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports.", - "LAYER": "Core", - "RELATION": "Used by the main app and API routers to get access to shared instances." + "SEMANTICS": "search, page, tool", + "PURPOSE": "Page for the dataset search tool.", + "LAYER": "UI" }, "relations": [], "children": [], @@ -4563,11 +3267,1308 @@ "issues": [] } }, + { + "name": "MapperPage", + "type": "Component", + "start_line": 1, + "end_line": 26, + "tags": { + "SEMANTICS": "mapper, page, tool", + "PURPOSE": "Page for the dataset column mapper tool.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugPage", + "type": "Component", + "start_line": 1, + "end_line": 26, + "tags": { + "SEMANTICS": "debug, page, tool", + "PURPOSE": "Page for system diagnostics and debugging.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionsSettingsPage", + "type": "Component", + "start_line": 1, + "end_line": 34, + "tags": { + "SEMANTICS": "settings, connections, page", + "PURPOSE": "Page for managing database connection configurations.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Dashboard", + "type": "Component", + "start_line": 1, + "end_line": 60, + "tags": { + "SEMANTICS": "dashboard, plugins, tools, list", + "PURPOSE": "Displays the list of available plugins and allows selecting one.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", + "PROPS": "None", + "EVENTS": "None" + }, + "relations": [], + "children": [ + { + "name": "onMount", + "type": "Function", + "start_line": 17, + "end_line": 25, + "tags": { + "PURPOSE": "Fetch plugins when the component mounts." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "selectPlugin", + "type": "Function", + "start_line": 27, + "end_line": 36, + "tags": { + "PURPOSE": "Selects a plugin to display its form.", + "PARAM": "{Object} plugin - The plugin object to select." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Settings", + "type": "Component", + "start_line": 1, + "end_line": 333, + "tags": { + "SEMANTICS": "settings, ui, configuration", + "PURPOSE": "The main settings page for the application, allowing management of environments and global settings.", + "LAYER": "UI", + "RELATION": "USES -> stores.js", + "PROPS": "None", + "EVENTS": "None", + "INVARIANT": "Settings changes must be saved to the backend." + }, + "relations": [], + "children": [ + { + "name": "loadSettings", + "type": "Function", + "start_line": 50, + "end_line": 65, + "tags": { + "PURPOSE": "Loads settings from the backend." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSaveGlobal", + "type": "Function", + "start_line": 67, + "end_line": 82, + "tags": { + "PURPOSE": "Saves global settings to the backend." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleAddOrUpdateEnv", + "type": "Function", + "start_line": 84, + "end_line": 106, + "tags": { + "PURPOSE": "Adds or updates an environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDeleteEnv", + "type": "Function", + "start_line": 108, + "end_line": 127, + "tags": { + "PURPOSE": "Deletes an environment.", + "PARAM": "{string} id - The ID of the environment to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleTestEnv", + "type": "Function", + "start_line": 129, + "end_line": 150, + "tags": { + "PURPOSE": "Tests the connection to an environment.", + "PARAM": "{string} id - The ID of the environment to test." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "editEnv", + "type": "Function", + "start_line": 152, + "end_line": 161, + "tags": { + "PURPOSE": "Sets the form to edit an existing environment.", + "PARAM": "{Object} env - The environment object to edit." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resetEnvForm", + "type": "Function", + "start_line": 163, + "end_line": 182, + "tags": { + "PURPOSE": "Resets the environment form." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "PasswordPrompt", + "type": "Component", + "start_line": 1, + "end_line": 129, + "tags": { + "SEMANTICS": "password, prompt, modal, input, security", + "PURPOSE": "A modal component to prompt the user for database passwords when a migration task is paused.", + "LAYER": "UI", + "RELATION": "EMITS -> resume, cancel" + }, + "relations": [], + "children": [ + { + "name": "handleSubmit", + "type": "Function", + "start_line": 21, + "end_line": 37, + "tags": { + "PURPOSE": "Validates and dispatches the passwords to resume the task." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleCancel", + "type": "Function", + "start_line": 39, + "end_line": 45, + "tags": { + "PURPOSE": "Cancels the password prompt." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MappingTable", + "type": "Component", + "start_line": 1, + "end_line": 94, + "tags": { + "SEMANTICS": "mapping, table, database, editor", + "PURPOSE": "Displays and allows editing of database mappings.", + "LAYER": "Feature", + "RELATION": "BINDS_TO -> mappings state", + "INVARIANT": "Each source database can be mapped to one target database." + }, + "relations": [], + "children": [ + { + "name": "updateMapping", + "type": "Function", + "start_line": 25, + "end_line": 32, + "tags": { + "PURPOSE": "Updates a mapping for a specific source database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getSuggestion", + "type": "Function", + "start_line": 34, + "end_line": 41, + "tags": { + "PURPOSE": "Finds a suggestion for a source database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskLogViewer", + "type": "Component", + "start_line": 1, + "end_line": 171, + "tags": { + "SEMANTICS": "task, log, viewer, modal", + "PURPOSE": "Displays detailed logs for a specific task in a modal.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/lib/api.js (inferred)" + }, + "relations": [], + "children": [ + { + "name": "fetchLogs", + "type": "Function", + "start_line": 25, + "end_line": 40, + "tags": { + "PURPOSE": "Fetches logs for the current task." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "scrollToBottom", + "type": "Function", + "start_line": 42, + "end_line": 51, + "tags": { + "PURPOSE": "Scrolls the log container to the bottom." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleScroll", + "type": "Function", + "start_line": 53, + "end_line": 62, + "tags": { + "PURPOSE": "Updates auto-scroll preference based on scroll position." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "close", + "type": "Function", + "start_line": 64, + "end_line": 70, + "tags": { + "PURPOSE": "Closes the log viewer modal." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getLogLevelColor", + "type": "Function", + "start_line": 72, + "end_line": 83, + "tags": { + "PURPOSE": "Returns the CSS color class for a given log level." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onDestroy", + "type": "Function", + "start_line": 100, + "end_line": 105, + "tags": { + "PURPOSE": "Cleans up the polling interval." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Footer", + "type": "Component", + "start_line": 1, + "end_line": 10, + "tags": { + "SEMANTICS": "footer, layout, copyright", + "PURPOSE": "Displays the application footer with copyright information.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MissingMappingModal", + "type": "Component", + "start_line": 1, + "end_line": 114, + "tags": { + "SEMANTICS": "modal, mapping, prompt, migration", + "PURPOSE": "Prompts the user to provide a database mapping when one is missing during migration.", + "LAYER": "Feature", + "RELATION": "DISPATCHES -> resolve", + "INVARIANT": "Modal blocks migration progress until resolved or cancelled." + }, + "relations": [], + "children": [ + { + "name": "resolve", + "type": "Function", + "start_line": 26, + "end_line": 37, + "tags": { + "PURPOSE": "Dispatches the resolution event with the selected mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "cancel", + "type": "Function", + "start_line": 39, + "end_line": 45, + "tags": { + "PURPOSE": "Cancels the mapping resolution modal." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DashboardGrid", + "type": "Component", + "start_line": 1, + "end_line": 205, + "tags": { + "SEMANTICS": "dashboard, grid, selection, pagination", + "PURPOSE": "Displays a grid of dashboards with selection and pagination.", + "LAYER": "Component", + "RELATION": "USED_BY -> frontend/src/routes/migration/+page.svelte", + "INVARIANT": "Selected IDs must be a subset of available dashboards." + }, + "relations": [], + "children": [ + { + "name": "handleSort", + "type": "Function", + "start_line": 62, + "end_line": 72, + "tags": { + "PURPOSE": "Toggles sort direction or changes sort column." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSelectionChange", + "type": "Function", + "start_line": 74, + "end_line": 86, + "tags": { + "PURPOSE": "Handles individual checkbox changes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSelectAll", + "type": "Function", + "start_line": 88, + "end_line": 104, + "tags": { + "PURPOSE": "Handles select all checkbox." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "goToPage", + "type": "Function", + "start_line": 106, + "end_line": 113, + "tags": { + "PURPOSE": "Changes current page." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Navbar", + "type": "Component", + "start_line": 1, + "end_line": 59, + "tags": { + "SEMANTICS": "navbar, navigation, header, layout", + "PURPOSE": "Main navigation bar for the application.", + "LAYER": "UI", + "RELATION": "USES -> $app/stores" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskHistory", + "type": "Component", + "start_line": 1, + "end_line": 197, + "tags": { + "SEMANTICS": "task, history, list, status, monitoring", + "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/lib/api.js (inferred)" + }, + "relations": [], + "children": [ + { + "name": "fetchTasks", + "type": "Function", + "start_line": 18, + "end_line": 46, + "tags": { + "PURPOSE": "Fetches the list of recent tasks from the API." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "clearTasks", + "type": "Function", + "start_line": 48, + "end_line": 65, + "tags": { + "PURPOSE": "Clears tasks from the history, optionally filtered by status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "selectTask", + "type": "Function", + "start_line": 67, + "end_line": 85, + "tags": { + "PURPOSE": "Selects a task and fetches its full details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getStatusColor", + "type": "Function", + "start_line": 87, + "end_line": 99, + "tags": { + "PURPOSE": "Returns the CSS color class for a given task status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onMount", + "type": "Function", + "start_line": 101, + "end_line": 107, + "tags": { + "PURPOSE": "Initializes the component by fetching tasks and starting polling." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onDestroy", + "type": "Function", + "start_line": 109, + "end_line": 114, + "tags": { + "PURPOSE": "Cleans up the polling interval when the component is destroyed." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Toast", + "type": "Component", + "start_line": 1, + "end_line": 31, + "tags": { + "SEMANTICS": "toast, notification, feedback, ui", + "PURPOSE": "Displays transient notifications (toasts) in the bottom-right corner.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> frontend/src/lib/toasts.js", + "PROPS": "None", + "EVENTS": "None" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskRunner", + "type": "Component", + "start_line": 1, + "end_line": 379, + "tags": { + "SEMANTICS": "task, runner, logs, websocket", + "PURPOSE": "Connects to a WebSocket to display real-time logs for a running task.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", + "PROPS": "None", + "EVENTS": "None" + }, + "relations": [], + "children": [ + { + "name": "connect", + "type": "Function", + "start_line": 38, + "end_line": 130, + "tags": { + "PURPOSE": "Establishes WebSocket connection with exponential backoff." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "fetchTargetDatabases", + "type": "Function", + "start_line": 132, + "end_line": 152, + "tags": { + "PURPOSE": "Fetches the list of databases in the target environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleMappingResolve", + "type": "Function", + "start_line": 154, + "end_line": 195, + "tags": { + "PURPOSE": "Handles the resolution of a missing database mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handlePasswordResume", + "type": "Function", + "start_line": 197, + "end_line": 217, + "tags": { + "PURPOSE": "Handles the submission of database passwords to resume a task." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "startDataTimeout", + "type": "Function", + "start_line": 219, + "end_line": 229, + "tags": { + "PURPOSE": "Starts a timeout to detect when the log stream has stalled." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resetDataTimeout", + "type": "Function", + "start_line": 231, + "end_line": 238, + "tags": { + "PURPOSE": "Resets the data stall timeout." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onMount", + "type": "Function", + "start_line": 240, + "end_line": 265, + "tags": { + "PURPOSE": "Initializes the component and subscribes to task selection changes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onDestroy", + "type": "Function", + "start_line": 267, + "end_line": 279, + "tags": { + "PURPOSE": "Close WebSocket connection when the component is destroyed." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskList", + "type": "Component", + "start_line": 1, + "end_line": 103, + "tags": { + "SEMANTICS": "tasks, list, status, history", + "PURPOSE": "Displays a list of tasks with their status and execution details.", + "LAYER": "Component", + "RELATION": "USES -> api.js" + }, + "relations": [], + "children": [ + { + "name": "getStatusColor", + "type": "Function", + "start_line": 18, + "end_line": 31, + "tags": { + "PURPOSE": "Returns the CSS color class for a given task status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "formatTime", + "type": "Function", + "start_line": 33, + "end_line": 43, + "tags": { + "PURPOSE": "Formats a date string using date-fns." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleTaskClick", + "type": "Function", + "start_line": 45, + "end_line": 50, + "tags": { + "PURPOSE": "Dispatches a select event when a task is clicked." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DynamicForm", + "type": "Component", + "start_line": 1, + "end_line": 88, + "tags": { + "SEMANTICS": "form, schema, dynamic, json-schema", + "PURPOSE": "Generates a form dynamically based on a JSON schema.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> svelte:createEventDispatcher", + "PROPS": "", + "EVENTS": "" + }, + "relations": [], + "children": [ + { + "name": "handleSubmit", + "type": "Function", + "start_line": 23, + "end_line": 31, + "tags": { + "PURPOSE": "Dispatches the submit event with the form data." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "initializeForm", + "type": "Function", + "start_line": 33, + "end_line": 44, + "tags": { + "PURPOSE": "Initialize form data with default values from the schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "EnvSelector", + "type": "Component", + "start_line": 1, + "end_line": 58, + "tags": { + "SEMANTICS": "environment, selector, dropdown, migration", + "PURPOSE": "Provides a UI component for selecting source and target environments.", + "LAYER": "Feature", + "RELATION": "BINDS_TO -> environments store", + "INVARIANT": "Source and target environments must be selectable from the list of configured environments." + }, + "relations": [], + "children": [ + { + "name": "handleSelect", + "type": "Function", + "start_line": 24, + "end_line": 34, + "tags": { + "PURPOSE": "Dispatches the selection change event.", + "PARAM": "{Event} event - The change event from the select element." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionForm", + "type": "Component", + "start_line": 1, + "end_line": 100, + "tags": { + "SEMANTICS": "connection, form, settings", + "PURPOSE": "UI component for creating a new database connection configuration.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/connectionService.js" + }, + "relations": [], + "children": [ + { + "name": "handleSubmit", + "type": "Function", + "start_line": 26, + "end_line": 48, + "tags": { + "PURPOSE": "Submits the connection form to the backend." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionList", + "type": "Component", + "start_line": 1, + "end_line": 84, + "tags": { + "SEMANTICS": "connection, list, settings", + "PURPOSE": "UI component for listing and deleting saved database connection configurations.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/connectionService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchConnections", + "type": "Function", + "start_line": 20, + "end_line": 32, + "tags": { + "PURPOSE": "Fetches the list of connections from the backend." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDelete", + "type": "Function", + "start_line": 34, + "end_line": 47, + "tags": { + "PURPOSE": "Deletes a connection configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MapperTool", + "type": "Component", + "start_line": 1, + "end_line": 161, + "tags": { + "SEMANTICS": "mapper, tool, dataset, postgresql, excel", + "PURPOSE": "UI component for mapping dataset column verbose names using the MapperPlugin.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/connectionService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchData", + "type": "Function", + "start_line": 29, + "end_line": 40, + "tags": { + "PURPOSE": "Fetches environments and saved connections." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleRunMapper", + "type": "Function", + "start_line": 42, + "end_line": 81, + "tags": { + "PURPOSE": "Triggers the MapperPlugin task." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugTool", + "type": "Component", + "start_line": 1, + "end_line": 190, + "tags": { + "SEMANTICS": "debug, tool, api, structure", + "PURPOSE": "UI component for system diagnostics and debugging API responses.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/toolsService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchEnvironments", + "type": "Function", + "start_line": 26, + "end_line": 41, + "tags": { + "PURPOSE": "Fetches available environments.", + "PRE": "API is available.", + "POST": "envs variable is populated.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleRunDebug", + "type": "Function", + "start_line": 43, + "end_line": 84, + "tags": { + "PURPOSE": "Triggers the debug task.", + "PRE": "Required fields are selected.", + "POST": "Task is started and polling begins.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "startPolling", + "type": "Function", + "start_line": 86, + "end_line": 116, + "tags": { + "PURPOSE": "Polls for task completion.", + "PRE": "Task ID is valid.", + "POST": "Polls until success/failure.", + "PARAM": "{string} taskId - ID of the task.", + "RETURNS": "{void}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SearchTool", + "type": "Component", + "start_line": 1, + "end_line": 180, + "tags": { + "SEMANTICS": "search, tool, dataset, regex", + "PURPOSE": "UI component for searching datasets using the SearchPlugin.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/toolsService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchEnvironments", + "type": "Function", + "start_line": 23, + "end_line": 33, + "tags": { + "PURPOSE": "Fetches the list of available environments." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSearch", + "type": "Function", + "start_line": 35, + "end_line": 60, + "tags": { + "PURPOSE": "Triggers the SearchPlugin task." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "startPolling", + "type": "Function", + "start_line": 62, + "end_line": 89, + "tags": { + "PURPOSE": "Polls for task completion and results." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "AppModule", "type": "Module", "start_line": 1, - "end_line": 154, + "end_line": 159, "tags": { "SEMANTICS": "app, main, entrypoint, fastapi", "PURPOSE": "The main entry point for the FastAPI application. It initializes the app, configures CORS, sets up dependencies, includes API routers, and defines the WebSocket endpoint for log streaming.", @@ -4595,8 +4596,8 @@ { "name": "WebSocketEndpoint", "type": "Endpoint", - "start_line": 73, - "end_line": 128, + "start_line": 74, + "end_line": 129, "tags": { "SEMANTICS": "websocket, logs, streaming, real-time", "PURPOSE": "Provides a WebSocket endpoint for clients to connect to and receive real-time log entries for a specific task." @@ -4611,8 +4612,8 @@ { "name": "StaticFiles", "type": "Mount", - "start_line": 130, - "end_line": 153, + "start_line": 131, + "end_line": 158, "tags": { "SEMANTICS": "static, frontend, spa", "PURPOSE": "Mounts the frontend build directory to serve static assets." @@ -4622,8 +4623,8 @@ { "name": "RootEndpoint", "type": "Endpoint", - "start_line": 146, - "end_line": 152, + "start_line": 151, + "end_line": 157, "tags": { "SEMANTICS": "root, healthcheck", "PURPOSE": "A simple root endpoint to confirm that the API is running." @@ -4648,221 +4649,60 @@ } }, { - "name": "backend.src.models.mapping", + "name": "Dependencies", "type": "Module", "start_line": 1, - "end_line": 70, + "end_line": 50, "tags": { - "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite", - "PURPOSE": "Defines the database schema for environment metadata and database mappings using SQLAlchemy.", - "LAYER": "Domain", - "INVARIANT": "All primary keys are UUID strings.", - "CONSTRAINT": "source_env_id and target_env_id must be valid environment IDs." + "SEMANTICS": "dependency, injection, singleton, factory", + "PURPOSE": "Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports.", + "LAYER": "Core", + "RELATION": "Used by the main app and API routers to get access to shared instances." }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "sqlalchemy" - } - ], - "children": [ - { - "name": "MigrationStatus", - "type": "Class", - "start_line": 21, - "end_line": 29, - "tags": { - "PURPOSE": "Enumeration of possible migration job statuses." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Environment", - "type": "Class", - "start_line": 31, - "end_line": 40, - "tags": { - "PURPOSE": "Represents a Superset instance environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DatabaseMapping", - "type": "Class", - "start_line": 42, - "end_line": 55, - "tags": { - "PURPOSE": "Represents a mapping between source and target databases." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MigrationJob", - "type": "Class", - "start_line": 57, - "end_line": 68, - "tags": { - "PURPOSE": "Represents a single migration execution job." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], + "relations": [], + "children": [], "compliance": { "valid": true, "issues": [] } }, { - "name": "backend.src.models.dashboard", + "name": "backend.src.core.superset_client", "type": "Module", "start_line": 1, - "end_line": 28, + "end_line": 105, "tags": { - "SEMANTICS": "dashboard, model, metadata, migration", - "PURPOSE": "Defines data models for dashboard metadata and selection.", - "LAYER": "Model" + "SEMANTICS": "superset, api, client, database, metadata", + "PURPOSE": "Extends the base SupersetClient with database-specific metadata fetching.", + "LAYER": "Core", + "INVARIANT": "All database metadata requests must include UUID and name." }, "relations": [ { - "type": "USED_BY", - "target": "backend.src.api.routes.migration" + "type": "INHERITS_FROM", + "target": "superset_tool.client.SupersetClient" } ], "children": [ { - "name": "DashboardMetadata", + "name": "SupersetClient", "type": "Class", - "start_line": 10, - "end_line": 17, + "start_line": 16, + "end_line": 103, "tags": { - "PURPOSE": "Represents a dashboard available for migration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DashboardSelection", - "type": "Class", - "start_line": 19, - "end_line": 26, - "tags": { - "PURPOSE": "Represents the user's selection of dashboards to migrate." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.models.task", - "type": "Module", - "start_line": 1, - "end_line": 34, - "tags": { - "SEMANTICS": "database, task, record, sqlalchemy, sqlite", - "PURPOSE": "Defines the database schema for task execution records.", - "LAYER": "Domain", - "INVARIANT": "All primary keys are UUID strings." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "sqlalchemy" - } - ], - "children": [ - { - "name": "TaskRecord", - "type": "Class", - "start_line": 17, - "end_line": 32, - "tags": { - "PURPOSE": "Represents a persistent record of a task execution." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.services.mapping_service", - "type": "Module", - "start_line": 1, - "end_line": 69, - "tags": { - "SEMANTICS": "service, mapping, fuzzy-matching, superset", - "PURPOSE": "Orchestrates database fetching and fuzzy matching suggestions.", - "LAYER": "Service", - "INVARIANT": "Suggestions are based on database names." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "backend.src.core.superset_client" - }, - { - "type": "DEPENDS_ON", - "target": "backend.src.core.utils.matching" - } - ], - "children": [ - { - "name": "MappingService", - "type": "Class", - "start_line": 18, - "end_line": 67, - "tags": { - "PURPOSE": "Service for handling database mapping logic." + "PURPOSE": "Extended SupersetClient for migration-specific operations." }, "relations": [], "children": [ { - "name": "MappingService.__init__", + "name": "SupersetClient.get_databases_summary", "type": "Function", - "start_line": 22, - "end_line": 26, + "start_line": 20, + "end_line": 38, "tags": { - "PURPOSE": "Initializes the mapping service with a config manager." + "PURPOSE": "Fetch a summary of databases including uuid, name, and engine.", + "POST": "Returns a list of database dictionaries with 'engine' field.", + "RETURN": "List[Dict] - Summary of databases." }, "relations": [], "children": [], @@ -4872,12 +4712,14 @@ } }, { - "name": "MappingService._get_client", + "name": "SupersetClient.get_database_by_uuid", "type": "Function", - "start_line": 28, - "end_line": 47, + "start_line": 40, + "end_line": 53, "tags": { - "PURPOSE": "Helper to get an initialized SupersetClient for an environment." + "PURPOSE": "Find a database by its UUID.", + "PARAM": "db_uuid (str) - The UUID of the database.", + "RETURN": "Optional[Dict] - Database info if found, else None." }, "relations": [], "children": [], @@ -4887,14 +4729,47 @@ } }, { - "name": "MappingService.get_suggestions", + "name": "SupersetClient.get_dashboards_summary", "type": "Function", - "start_line": 49, - "end_line": 65, + "start_line": 55, + "end_line": 79, "tags": { - "PURPOSE": "Fetches databases from both environments and returns fuzzy matching suggestions.", - "PARAM": "target_env_id (str) - Target environment ID.", - "RETURN": "List[Dict] - Suggested mappings." + "PURPOSE": "Fetches dashboard metadata optimized for the grid.", + "POST": "Returns a list of dashboard dictionaries.", + "RETURN": "List[Dict]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SupersetClient.get_dataset", + "type": "Function", + "start_line": 81, + "end_line": 90, + "tags": { + "PURPOSE": "Fetch full dataset structure including columns and metrics.", + "PARAM": "dataset_id (int) - The ID of the dataset.", + "RETURN": "Dict - The dataset metadata." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SupersetClient.update_dataset", + "type": "Function", + "start_line": 92, + "end_line": 101, + "tags": { + "PURPOSE": "Update dataset metadata.", + "PARAM": "data (Dict) - The payload for update." }, "relations": [], "children": [], @@ -5171,42 +5046,36 @@ } }, { - "name": "backend.src.core.superset_client", + "name": "SchedulerModule", "type": "Module", "start_line": 1, - "end_line": 83, + "end_line": 104, "tags": { - "SEMANTICS": "superset, api, client, database, metadata", - "PURPOSE": "Extends the base SupersetClient with database-specific metadata fetching.", + "SEMANTICS": "scheduler, apscheduler, cron, backup", + "PURPOSE": "Manages scheduled tasks using APScheduler.", "LAYER": "Core", - "INVARIANT": "All database metadata requests must include UUID and name." + "RELATION": "Uses TaskManager to run scheduled backups." }, - "relations": [ - { - "type": "INHERITS_FROM", - "target": "superset_tool.client.SupersetClient" - } - ], + "relations": [], "children": [ { - "name": "SupersetClient", + "name": "SchedulerService", "type": "Class", "start_line": 16, - "end_line": 81, + "end_line": 103, "tags": { - "PURPOSE": "Extended SupersetClient for migration-specific operations." + "SEMANTICS": "scheduler, service, apscheduler", + "PURPOSE": "Provides a service to manage scheduled backup tasks." }, "relations": [], "children": [ { - "name": "SupersetClient.get_databases_summary", + "name": "SchedulerService.start", "type": "Function", - "start_line": 20, - "end_line": 38, + "start_line": 27, + "end_line": 35, "tags": { - "PURPOSE": "Fetch a summary of databases including uuid, name, and engine.", - "POST": "Returns a list of database dictionaries with 'engine' field.", - "RETURN": "List[Dict] - Summary of databases." + "PURPOSE": "Starts the background scheduler and loads initial schedules." }, "relations": [], "children": [], @@ -5216,14 +5085,12 @@ } }, { - "name": "SupersetClient.get_database_by_uuid", + "name": "SchedulerService.stop", "type": "Function", - "start_line": 40, - "end_line": 53, + "start_line": 37, + "end_line": 44, "tags": { - "PURPOSE": "Find a database by its UUID.", - "PARAM": "db_uuid (str) - The UUID of the database.", - "RETURN": "Optional[Dict] - Database info if found, else None." + "PURPOSE": "Stops the background scheduler." }, "relations": [], "children": [], @@ -5233,14 +5100,44 @@ } }, { - "name": "SupersetClient.get_dashboards_summary", + "name": "SchedulerService.load_schedules", "type": "Function", - "start_line": 55, - "end_line": 79, + "start_line": 46, + "end_line": 57, "tags": { - "PURPOSE": "Fetches dashboard metadata optimized for the grid.", - "POST": "Returns a list of dashboard dictionaries.", - "RETURN": "List[Dict]" + "PURPOSE": "Loads backup schedules from configuration and registers them." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SchedulerService.add_backup_job", + "type": "Function", + "start_line": 59, + "end_line": 77, + "tags": { + "PURPOSE": "Adds a scheduled backup job for an environment.", + "PARAM": "cron_expression (str) - The cron expression for the schedule." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SchedulerService._trigger_backup", + "type": "Function", + "start_line": 79, + "end_line": 101, + "tags": { + "PURPOSE": "Triggered by the scheduler to start a backup task.", + "PARAM": "env_id (str) - The ID of the environment." }, "relations": [], "children": [], @@ -5262,66 +5159,255 @@ } }, { - "name": "backend.src.core.migration_engine", + "name": "ConfigModels", "type": "Module", "start_line": 1, - "end_line": 98, + "end_line": 60, "tags": { - "SEMANTICS": "migration, engine, zip, yaml, transformation", - "PURPOSE": "Handles the interception and transformation of Superset asset ZIP archives.", - "LAYER": "Core", - "INVARIANT": "ZIP structure must be preserved after transformation." + "SEMANTICS": "config, models, pydantic", + "PURPOSE": "Defines the data models for application configuration using Pydantic.", + "LAYER": "Core" }, "relations": [ { - "type": "DEPENDS_ON", - "target": "PyYAML" + "type": "READS_FROM", + "target": "config.json" + }, + { + "type": "USED_BY", + "target": "ConfigManager" } ], "children": [ { - "name": "MigrationEngine", - "type": "Class", - "start_line": 22, - "end_line": 96, + "name": "Schedule", + "type": "DataClass", + "start_line": 11, + "end_line": 16, "tags": { - "PURPOSE": "Engine for transforming Superset export ZIPs." + "PURPOSE": "Represents a backup schedule configuration." }, "relations": [], - "children": [ - { - "name": "MigrationEngine.transform_zip", - "type": "Function", - "start_line": 26, - "end_line": 76, - "tags": { - "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages.", - "PARAM": "strip_databases (bool) - Whether to remove the databases directory from the archive.", - "RETURN": "bool - True if successful." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MigrationEngine._transform_yaml", - "type": "Function", - "start_line": 78, - "end_line": 94, - "tags": { - "PURPOSE": "Replaces database_uuid in a single YAML file." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Environment", + "type": "DataClass", + "start_line": 18, + "end_line": 28, + "tags": { + "PURPOSE": "Represents a Superset environment configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "LoggingConfig", + "type": "DataClass", + "start_line": 30, + "end_line": 38, + "tags": { + "PURPOSE": "Defines the configuration for the application's logging system." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GlobalSettings", + "type": "DataClass", + "start_line": 40, + "end_line": 51, + "tags": { + "PURPOSE": "Represents global application settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "AppConfig", + "type": "DataClass", + "start_line": 53, + "end_line": 58, + "tags": { + "PURPOSE": "The root configuration model containing all application settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.core.database", + "type": "Module", + "start_line": 1, + "end_line": 78, + "tags": { + "SEMANTICS": "database, sqlite, sqlalchemy, session, persistence", + "PURPOSE": "Configures the SQLite database connection and session management.", + "LAYER": "Core", + "INVARIANT": "A single engine instance is used for the entire application." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + }, + { + "type": "USES", + "target": "backend.src.models.mapping" + } + ], + "children": [ + { + "name": "DATABASE_URL", + "type": "Constant", + "start_line": 21, + "end_line": 23, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TASKS_DATABASE_URL", + "type": "Constant", + "start_line": 25, + "end_line": 27, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "engine", + "type": "Variable", + "start_line": 29, + "end_line": 31, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "tasks_engine", + "type": "Variable", + "start_line": 33, + "end_line": 35, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SessionLocal", + "type": "Class", + "start_line": 37, + "end_line": 40, + "tags": { + "PURPOSE": "A session factory for the main mappings database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TasksSessionLocal", + "type": "Class", + "start_line": 42, + "end_line": 45, + "tags": { + "PURPOSE": "A session factory for the tasks execution database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "init_db", + "type": "Function", + "start_line": 47, + "end_line": 52, + "tags": { + "PURPOSE": "Initializes the database by creating all tables." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_db", + "type": "Function", + "start_line": 54, + "end_line": 64, + "tags": { + "PURPOSE": "Dependency for getting a database session.", + "POST": "Session is closed after use.", + "RETURN": "Generator[Session, None, None]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_tasks_db", + "type": "Function", + "start_line": 66, + "end_line": 76, + "tags": { + "PURPOSE": "Dependency for getting a tasks database session.", + "POST": "Session is closed after use.", + "RETURN": "Generator[Session, None, None]" + }, + "relations": [], + "children": [], "compliance": { "valid": true, "issues": [] @@ -5448,380 +5534,6 @@ "issues": [] } }, - { - "name": "backend.src.core.database", - "type": "Module", - "start_line": 1, - "end_line": 77, - "tags": { - "SEMANTICS": "database, sqlite, sqlalchemy, session, persistence", - "PURPOSE": "Configures the SQLite database connection and session management.", - "LAYER": "Core", - "INVARIANT": "A single engine instance is used for the entire application." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "sqlalchemy" - }, - { - "type": "USES", - "target": "backend.src.models.mapping" - } - ], - "children": [ - { - "name": "DATABASE_URL", - "type": "Constant", - "start_line": 20, - "end_line": 22, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TASKS_DATABASE_URL", - "type": "Constant", - "start_line": 24, - "end_line": 26, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "engine", - "type": "Variable", - "start_line": 28, - "end_line": 30, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "tasks_engine", - "type": "Variable", - "start_line": 32, - "end_line": 34, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SessionLocal", - "type": "Class", - "start_line": 36, - "end_line": 39, - "tags": { - "PURPOSE": "A session factory for the main mappings database." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TasksSessionLocal", - "type": "Class", - "start_line": 41, - "end_line": 44, - "tags": { - "PURPOSE": "A session factory for the tasks execution database." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "init_db", - "type": "Function", - "start_line": 46, - "end_line": 51, - "tags": { - "PURPOSE": "Initializes the database by creating all tables." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_db", - "type": "Function", - "start_line": 53, - "end_line": 63, - "tags": { - "PURPOSE": "Dependency for getting a database session.", - "POST": "Session is closed after use.", - "RETURN": "Generator[Session, None, None]" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_tasks_db", - "type": "Function", - "start_line": 65, - "end_line": 75, - "tags": { - "PURPOSE": "Dependency for getting a tasks database session.", - "POST": "Session is closed after use.", - "RETURN": "Generator[Session, None, None]" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConfigModels", - "type": "Module", - "start_line": 1, - "end_line": 60, - "tags": { - "SEMANTICS": "config, models, pydantic", - "PURPOSE": "Defines the data models for application configuration using Pydantic.", - "LAYER": "Core" - }, - "relations": [ - { - "type": "READS_FROM", - "target": "config.json" - }, - { - "type": "USED_BY", - "target": "ConfigManager" - } - ], - "children": [ - { - "name": "Schedule", - "type": "DataClass", - "start_line": 11, - "end_line": 16, - "tags": { - "PURPOSE": "Represents a backup schedule configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Environment", - "type": "DataClass", - "start_line": 18, - "end_line": 28, - "tags": { - "PURPOSE": "Represents a Superset environment configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "LoggingConfig", - "type": "DataClass", - "start_line": 30, - "end_line": 38, - "tags": { - "PURPOSE": "Defines the configuration for the application's logging system." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GlobalSettings", - "type": "DataClass", - "start_line": 40, - "end_line": 51, - "tags": { - "PURPOSE": "Represents global application settings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "AppConfig", - "type": "DataClass", - "start_line": 53, - "end_line": 58, - "tags": { - "PURPOSE": "The root configuration model containing all application settings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SchedulerModule", - "type": "Module", - "start_line": 1, - "end_line": 104, - "tags": { - "SEMANTICS": "scheduler, apscheduler, cron, backup", - "PURPOSE": "Manages scheduled tasks using APScheduler.", - "LAYER": "Core", - "RELATION": "Uses TaskManager to run scheduled backups." - }, - "relations": [], - "children": [ - { - "name": "SchedulerService", - "type": "Class", - "start_line": 16, - "end_line": 103, - "tags": { - "SEMANTICS": "scheduler, service, apscheduler", - "PURPOSE": "Provides a service to manage scheduled backup tasks." - }, - "relations": [], - "children": [ - { - "name": "SchedulerService.start", - "type": "Function", - "start_line": 27, - "end_line": 35, - "tags": { - "PURPOSE": "Starts the background scheduler and loads initial schedules." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SchedulerService.stop", - "type": "Function", - "start_line": 37, - "end_line": 44, - "tags": { - "PURPOSE": "Stops the background scheduler." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SchedulerService.load_schedules", - "type": "Function", - "start_line": 46, - "end_line": 57, - "tags": { - "PURPOSE": "Loads backup schedules from configuration and registers them." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SchedulerService.add_backup_job", - "type": "Function", - "start_line": 59, - "end_line": 77, - "tags": { - "PURPOSE": "Adds a scheduled backup job for an environment.", - "PARAM": "cron_expression (str) - The cron expression for the schedule." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SchedulerService._trigger_backup", - "type": "Function", - "start_line": 79, - "end_line": 101, - "tags": { - "PURPOSE": "Triggered by the scheduler to start a backup task.", - "PARAM": "env_id (str) - The ID of the environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "PluginLoader", "type": "Class", @@ -5954,6 +5666,78 @@ "issues": [] } }, + { + "name": "backend.src.core.migration_engine", + "type": "Module", + "start_line": 1, + "end_line": 98, + "tags": { + "SEMANTICS": "migration, engine, zip, yaml, transformation", + "PURPOSE": "Handles the interception and transformation of Superset asset ZIP archives.", + "LAYER": "Core", + "INVARIANT": "ZIP structure must be preserved after transformation." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "PyYAML" + } + ], + "children": [ + { + "name": "MigrationEngine", + "type": "Class", + "start_line": 22, + "end_line": 96, + "tags": { + "PURPOSE": "Engine for transforming Superset export ZIPs." + }, + "relations": [], + "children": [ + { + "name": "MigrationEngine.transform_zip", + "type": "Function", + "start_line": 26, + "end_line": 76, + "tags": { + "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages.", + "PARAM": "strip_databases (bool) - Whether to remove the databases directory from the archive.", + "RETURN": "bool - True if successful." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MigrationEngine._transform_yaml", + "type": "Function", + "start_line": 78, + "end_line": 94, + "tags": { + "PURPOSE": "Replaces database_uuid in a single YAML file." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "PluginBase", "type": "Class", @@ -6034,6 +5818,108 @@ "issues": [] } }, + { + "name": "TaskPersistenceModule", + "type": "Module", + "start_line": 1, + "end_line": 143, + "tags": { + "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage", + "PURPOSE": "Handles the persistence of tasks using SQLAlchemy and the tasks.db database.", + "LAYER": "Core", + "RELATION": "Used by TaskManager to save and load tasks.", + "INVARIANT": "Database schema must match the TaskRecord model structure." + }, + "relations": [], + "children": [ + { + "name": "TaskPersistenceService", + "type": "Class", + "start_line": 20, + "end_line": 142, + "tags": { + "SEMANTICS": "persistence, service, database, sqlalchemy", + "PURPOSE": "Provides methods to save and load tasks from the tasks.db database using SQLAlchemy." + }, + "relations": [], + "children": [ + { + "name": "TaskPersistenceService.persist_task", + "type": "Function", + "start_line": 28, + "end_line": 69, + "tags": { + "PURPOSE": "Persists or updates a single task in the database.", + "PARAM": "task (Task) - The task object to persist." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskPersistenceService.persist_tasks", + "type": "Function", + "start_line": 71, + "end_line": 77, + "tags": { + "PURPOSE": "Persists multiple tasks.", + "PARAM": "tasks (List[Task]) - The list of tasks to persist." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskPersistenceService.load_tasks", + "type": "Function", + "start_line": 79, + "end_line": 122, + "tags": { + "PURPOSE": "Loads tasks from the database.", + "PARAM": "status (Optional[TaskStatus]) - Filter by status.", + "RETURN": "List[Task] - The loaded tasks." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskPersistenceService.delete_tasks", + "type": "Function", + "start_line": 124, + "end_line": 140, + "tags": { + "PURPOSE": "Deletes specific tasks from the database.", + "PARAM": "task_ids (List[str]) - List of task IDs to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "TaskManagerModule", "type": "Module", @@ -6374,18 +6260,88 @@ } }, { - "name": "TaskManagerPackage", + "name": "TaskManagerModels", "type": "Module", "start_line": 1, - "end_line": 12, + "end_line": 68, "tags": { - "SEMANTICS": "task, manager, package, exports", - "PURPOSE": "Exports the public API of the task manager package.", + "SEMANTICS": "task, models, pydantic, enum, state", + "PURPOSE": "Defines the data models and enumerations used by the Task Manager.", "LAYER": "Core", - "RELATION": "Aggregates models and manager." + "RELATION": "Used by TaskManager and API routes.", + "INVARIANT": "Task IDs are immutable once created.", + "CONSTRAINT": "Must use Pydantic for data validation." }, "relations": [], - "children": [], + "children": [ + { + "name": "TaskStatus", + "type": "Enum", + "start_line": 18, + "end_line": 28, + "tags": { + "SEMANTICS": "task, status, state, enum", + "PURPOSE": "Defines the possible states a task can be in during its lifecycle." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "LogEntry", + "type": "Class", + "start_line": 30, + "end_line": 38, + "tags": { + "SEMANTICS": "log, entry, record, pydantic", + "PURPOSE": "A Pydantic model representing a single, structured log entry associated with a task." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Task", + "type": "Class", + "start_line": 40, + "end_line": 66, + "tags": { + "SEMANTICS": "task, job, execution, state, pydantic", + "PURPOSE": "A Pydantic model representing a single execution instance of a plugin, including its status, parameters, and logs." + }, + "relations": [], + "children": [ + { + "name": "Task.__init__", + "type": "Function", + "start_line": 56, + "end_line": 65, + "tags": { + "PURPOSE": "Initializes the Task model and validates input_request for AWAITING_INPUT status.", + "PRE": "If status is AWAITING_INPUT, input_request must be provided.", + "POST": "Task instance is created or ValueError is raised.", + "PARAM": "**data - Keyword arguments for model initialization." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -6442,298 +6398,18 @@ } }, { - "name": "TaskManagerModels", + "name": "TaskManagerPackage", "type": "Module", "start_line": 1, - "end_line": 67, + "end_line": 12, "tags": { - "SEMANTICS": "task, models, pydantic, enum, state", - "PURPOSE": "Defines the data models and enumerations used by the Task Manager.", + "SEMANTICS": "task, manager, package, exports", + "PURPOSE": "Exports the public API of the task manager package.", "LAYER": "Core", - "RELATION": "Used by TaskManager and API routes.", - "INVARIANT": "Task IDs are immutable once created.", - "CONSTRAINT": "Must use Pydantic for data validation." + "RELATION": "Aggregates models and manager." }, "relations": [], - "children": [ - { - "name": "TaskStatus", - "type": "Enum", - "start_line": 18, - "end_line": 28, - "tags": { - "SEMANTICS": "task, status, state, enum", - "PURPOSE": "Defines the possible states a task can be in during its lifecycle." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "LogEntry", - "type": "Class", - "start_line": 30, - "end_line": 38, - "tags": { - "SEMANTICS": "log, entry, record, pydantic", - "PURPOSE": "A Pydantic model representing a single, structured log entry associated with a task." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Task", - "type": "Class", - "start_line": 40, - "end_line": 65, - "tags": { - "SEMANTICS": "task, job, execution, state, pydantic", - "PURPOSE": "A Pydantic model representing a single execution instance of a plugin, including its status, parameters, and logs." - }, - "relations": [], - "children": [ - { - "name": "Task.__init__", - "type": "Function", - "start_line": 55, - "end_line": 64, - "tags": { - "PURPOSE": "Initializes the Task model and validates input_request for AWAITING_INPUT status.", - "PRE": "If status is AWAITING_INPUT, input_request must be provided.", - "POST": "Task instance is created or ValueError is raised.", - "PARAM": "**data - Keyword arguments for model initialization." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskPersistenceModule", - "type": "Module", - "start_line": 1, - "end_line": 141, - "tags": { - "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage", - "PURPOSE": "Handles the persistence of tasks using SQLAlchemy and the tasks.db database.", - "LAYER": "Core", - "RELATION": "Used by TaskManager to save and load tasks.", - "INVARIANT": "Database schema must match the TaskRecord model structure." - }, - "relations": [], - "children": [ - { - "name": "TaskPersistenceService", - "type": "Class", - "start_line": 20, - "end_line": 140, - "tags": { - "SEMANTICS": "persistence, service, database, sqlalchemy", - "PURPOSE": "Provides methods to save and load tasks from the tasks.db database using SQLAlchemy." - }, - "relations": [], - "children": [ - { - "name": "TaskPersistenceService.persist_task", - "type": "Function", - "start_line": 28, - "end_line": 68, - "tags": { - "PURPOSE": "Persists or updates a single task in the database.", - "PARAM": "task (Task) - The task object to persist." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskPersistenceService.persist_tasks", - "type": "Function", - "start_line": 70, - "end_line": 76, - "tags": { - "PURPOSE": "Persists multiple tasks.", - "PARAM": "tasks (List[Task]) - The list of tasks to persist." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskPersistenceService.load_tasks", - "type": "Function", - "start_line": 78, - "end_line": 120, - "tags": { - "PURPOSE": "Loads tasks from the database.", - "PARAM": "status (Optional[TaskStatus]) - Filter by status.", - "RETURN": "List[Task] - The loaded tasks." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskPersistenceService.delete_tasks", - "type": "Function", - "start_line": 122, - "end_line": 138, - "tags": { - "PURPOSE": "Deletes specific tasks from the database.", - "PARAM": "task_ids (List[str]) - List of task IDs to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "BackupPlugin", - "type": "Module", - "start_line": 1, - "end_line": 149, - "tags": { - "SEMANTICS": "backup, superset, automation, dashboard, plugin", - "PURPOSE": "A plugin that provides functionality to back up Superset dashboards.", - "LAYER": "App" - }, - "relations": [ - { - "type": "IMPLEMENTS", - "target": "PluginBase" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "BackupPlugin", - "type": "Class", - "start_line": 28, - "end_line": 148, - "tags": { - "PURPOSE": "Implementation of the backup plugin logic." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MigrationPlugin", - "type": "Module", - "start_line": 1, - "end_line": 300, - "tags": { - "SEMANTICS": "migration, superset, automation, dashboard, plugin", - "PURPOSE": "A plugin that provides functionality to migrate Superset dashboards between environments.", - "LAYER": "App" - }, - "relations": [ - { - "type": "IMPLEMENTS", - "target": "PluginBase" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "MigrationPlugin", - "type": "Class", - "start_line": 24, - "end_line": 299, - "tags": { - "PURPOSE": "Implementation of the migration plugin logic." - }, - "relations": [], - "children": [ - { - "name": "MigrationPlugin.execute", - "type": "Action", - "start_line": 105, - "end_line": 292, - "tags": { - "PURPOSE": "Execute the migration logic with proper task logging." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], + "children": [], "compliance": { "valid": true, "issues": [] @@ -6757,6 +6433,428 @@ "issues": [] } }, + { + "name": "ConnectionsRouter", + "type": "Module", + "start_line": 1, + "end_line": 100, + "tags": { + "SEMANTICS": "api, router, connections, database", + "PURPOSE": "Defines the FastAPI router for managing external database connections.", + "LAYER": "UI (API)", + "RELATION": "Depends on SQLAlchemy session.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "ConnectionSchema", + "type": "Class", + "start_line": 21, + "end_line": 35, + "tags": { + "PURPOSE": "Pydantic model for connection response." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionCreate", + "type": "Class", + "start_line": 37, + "end_line": 47, + "tags": { + "PURPOSE": "Pydantic model for creating a connection." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "list_connections", + "type": "Function", + "start_line": 49, + "end_line": 60, + "tags": { + "PURPOSE": "Lists all saved connections.", + "PRE": "Database session is active.", + "POST": "Returns list of connection configs.", + "PARAM": "db (Session) - Database session.", + "RETURN": "List[ConnectionSchema] - List of connections." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "create_connection", + "type": "Function", + "start_line": 62, + "end_line": 78, + "tags": { + "PURPOSE": "Creates a new connection configuration.", + "PRE": "Connection name is unique.", + "POST": "Connection is saved to DB.", + "PARAM": "db (Session) - Database session.", + "RETURN": "ConnectionSchema - Created connection." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_connection", + "type": "Function", + "start_line": 80, + "end_line": 98, + "tags": { + "PURPOSE": "Deletes a connection configuration.", + "PRE": "Connection ID exists.", + "POST": "Connection is removed from DB.", + "PARAM": "db (Session) - Database session.", + "RETURN": "None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.api.routes.environments", + "type": "Module", + "start_line": 1, + "end_line": 124, + "tags": { + "SEMANTICS": "api, environments, superset, databases", + "PURPOSE": "API endpoints for listing environments and their databases.", + "LAYER": "API", + "INVARIANT": "Environment IDs must exist in the configuration." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.dependencies" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.core.superset_client" + } + ], + "children": [ + { + "name": "ScheduleSchema", + "type": "DataClass", + "start_line": 23, + "end_line": 27, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "EnvironmentResponse", + "type": "DataClass", + "start_line": 29, + "end_line": 35, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DatabaseResponse", + "type": "DataClass", + "start_line": 37, + "end_line": 42, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_environments", + "type": "Function", + "start_line": 44, + "end_line": 64, + "tags": { + "PURPOSE": "List all configured environments.", + "RETURN": "List[EnvironmentResponse]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_environment_schedule", + "type": "Function", + "start_line": 66, + "end_line": 92, + "tags": { + "PURPOSE": "Update backup schedule for an environment.", + "PARAM": "schedule (ScheduleSchema) - The new schedule." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_environment_databases", + "type": "Function", + "start_line": 94, + "end_line": 122, + "tags": { + "PURPOSE": "Fetch the list of databases from a specific environment.", + "PARAM": "id (str) - The environment ID.", + "RETURN": "List[Dict] - List of databases." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.api.routes.migration", + "type": "Module", + "start_line": 1, + "end_line": 76, + "tags": { + "SEMANTICS": "api, migration, dashboards", + "PURPOSE": "API endpoints for migration operations.", + "LAYER": "API" + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.dependencies" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.models.dashboard" + } + ], + "children": [ + { + "name": "get_dashboards", + "type": "Function", + "start_line": 17, + "end_line": 40, + "tags": { + "PURPOSE": "Fetch all dashboards from the specified environment for the grid.", + "PRE": "Environment ID must be valid.", + "POST": "Returns a list of dashboard metadata.", + "PARAM": "env_id (str) - The ID of the environment to fetch from.", + "RETURN": "List[DashboardMetadata]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute_migration", + "type": "Function", + "start_line": 42, + "end_line": 74, + "tags": { + "PURPOSE": "Execute the migration of selected dashboards.", + "PRE": "Selection must be valid and environments must exist.", + "POST": "Starts the migration task and returns the task ID.", + "PARAM": "selection (DashboardSelection) - The dashboards to migrate.", + "RETURN": "Dict - {\"task_id\": str, \"message\": str}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "PluginsRouter", + "type": "Module", + "start_line": 1, + "end_line": 22, + "tags": { + "SEMANTICS": "api, router, plugins, list", + "PURPOSE": "Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.", + "LAYER": "UI (API)", + "RELATION": "Depends on the PluginLoader and PluginConfig. It is included by the main app." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.api.routes.mappings", + "type": "Module", + "start_line": 1, + "end_line": 110, + "tags": { + "SEMANTICS": "api, mappings, database, fuzzy-matching", + "PURPOSE": "API endpoints for managing database mappings and getting suggestions.", + "LAYER": "API", + "INVARIANT": "Mappings are persisted in the SQLite database." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.dependencies" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.core.database" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.services.mapping_service" + } + ], + "children": [ + { + "name": "MappingCreate", + "type": "DataClass", + "start_line": 24, + "end_line": 32, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MappingResponse", + "type": "DataClass", + "start_line": 34, + "end_line": 46, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SuggestRequest", + "type": "DataClass", + "start_line": 48, + "end_line": 52, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_mappings", + "type": "Function", + "start_line": 54, + "end_line": 68, + "tags": { + "PURPOSE": "List all saved database mappings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "create_mapping", + "type": "Function", + "start_line": 70, + "end_line": 93, + "tags": { + "PURPOSE": "Create or update a database mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "suggest_mappings_api", + "type": "Function", + "start_line": 95, + "end_line": 108, + "tags": { + "PURPOSE": "Get suggested mappings based on fuzzy matching." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "SettingsRouter", "type": "Module", @@ -6938,107 +7036,344 @@ } }, { - "name": "backend.src.api.routes.environments", + "name": "backend.src.models.task", "type": "Module", "start_line": 1, - "end_line": 124, + "end_line": 35, "tags": { - "SEMANTICS": "api, environments, superset, databases", - "PURPOSE": "API endpoints for listing environments and their databases.", - "LAYER": "API", - "INVARIANT": "Environment IDs must exist in the configuration." + "SEMANTICS": "database, task, record, sqlalchemy, sqlite", + "PURPOSE": "Defines the database schema for task execution records.", + "LAYER": "Domain", + "INVARIANT": "All primary keys are UUID strings." }, "relations": [ { "type": "DEPENDS_ON", - "target": "backend.src.dependencies" + "target": "sqlalchemy" + } + ], + "children": [ + { + "name": "TaskRecord", + "type": "Class", + "start_line": 17, + "end_line": 33, + "tags": { + "PURPOSE": "Represents a persistent record of a task execution." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.connection", + "type": "Module", + "start_line": 1, + "end_line": 34, + "tags": { + "SEMANTICS": "database, connection, configuration, sqlalchemy, sqlite", + "PURPOSE": "Defines the database schema for external database connection configurations.", + "LAYER": "Domain", + "INVARIANT": "All primary keys are UUID strings." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + } + ], + "children": [ + { + "name": "ConnectionConfig", + "type": "Class", + "start_line": 17, + "end_line": 32, + "tags": { + "PURPOSE": "Stores credentials for external databases used for column mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.mapping", + "type": "Module", + "start_line": 1, + "end_line": 70, + "tags": { + "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite", + "PURPOSE": "Defines the database schema for environment metadata and database mappings using SQLAlchemy.", + "LAYER": "Domain", + "INVARIANT": "All primary keys are UUID strings.", + "CONSTRAINT": "source_env_id and target_env_id must be valid environment IDs." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + } + ], + "children": [ + { + "name": "MigrationStatus", + "type": "Class", + "start_line": 21, + "end_line": 29, + "tags": { + "PURPOSE": "Enumeration of possible migration job statuses." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } }, + { + "name": "Environment", + "type": "Class", + "start_line": 31, + "end_line": 40, + "tags": { + "PURPOSE": "Represents a Superset instance environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DatabaseMapping", + "type": "Class", + "start_line": 42, + "end_line": 55, + "tags": { + "PURPOSE": "Represents a mapping between source and target databases." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MigrationJob", + "type": "Class", + "start_line": 57, + "end_line": 68, + "tags": { + "PURPOSE": "Represents a single migration execution job." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.dashboard", + "type": "Module", + "start_line": 1, + "end_line": 28, + "tags": { + "SEMANTICS": "dashboard, model, metadata, migration", + "PURPOSE": "Defines data models for dashboard metadata and selection.", + "LAYER": "Model" + }, + "relations": [ + { + "type": "USED_BY", + "target": "backend.src.api.routes.migration" + } + ], + "children": [ + { + "name": "DashboardMetadata", + "type": "Class", + "start_line": 10, + "end_line": 17, + "tags": { + "PURPOSE": "Represents a dashboard available for migration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DashboardSelection", + "type": "Class", + "start_line": 19, + "end_line": 26, + "tags": { + "PURPOSE": "Represents the user's selection of dashboards to migrate." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.services.mapping_service", + "type": "Module", + "start_line": 1, + "end_line": 69, + "tags": { + "SEMANTICS": "service, mapping, fuzzy-matching, superset", + "PURPOSE": "Orchestrates database fetching and fuzzy matching suggestions.", + "LAYER": "Service", + "INVARIANT": "Suggestions are based on database names." + }, + "relations": [ { "type": "DEPENDS_ON", "target": "backend.src.core.superset_client" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.core.utils.matching" } ], "children": [ { - "name": "ScheduleSchema", - "type": "DataClass", - "start_line": 23, - "end_line": 27, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "EnvironmentResponse", - "type": "DataClass", - "start_line": 29, - "end_line": 35, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DatabaseResponse", - "type": "DataClass", - "start_line": 37, - "end_line": 42, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_environments", - "type": "Function", - "start_line": 44, - "end_line": 64, + "name": "MappingService", + "type": "Class", + "start_line": 18, + "end_line": 67, "tags": { - "PURPOSE": "List all configured environments.", - "RETURN": "List[EnvironmentResponse]" + "PURPOSE": "Service for handling database mapping logic." }, "relations": [], - "children": [], + "children": [ + { + "name": "MappingService.__init__", + "type": "Function", + "start_line": 22, + "end_line": 26, + "tags": { + "PURPOSE": "Initializes the mapping service with a config manager." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MappingService._get_client", + "type": "Function", + "start_line": 28, + "end_line": 47, + "tags": { + "PURPOSE": "Helper to get an initialized SupersetClient for an environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MappingService.get_suggestions", + "type": "Function", + "start_line": 49, + "end_line": 65, + "tags": { + "PURPOSE": "Fetches databases from both environments and returns fuzzy matching suggestions.", + "PARAM": "target_env_id (str) - Target environment ID.", + "RETURN": "List[Dict] - Suggested mappings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], "compliance": { "valid": true, "issues": [] } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "BackupPlugin", + "type": "Module", + "start_line": 1, + "end_line": 149, + "tags": { + "SEMANTICS": "backup, superset, automation, dashboard, plugin", + "PURPOSE": "A plugin that provides functionality to back up Superset dashboards.", + "LAYER": "App" + }, + "relations": [ + { + "type": "IMPLEMENTS", + "target": "PluginBase" }, { - "name": "update_environment_schedule", - "type": "Function", - "start_line": 66, - "end_line": 92, - "tags": { - "PURPOSE": "Update backup schedule for an environment.", - "PARAM": "schedule (ScheduleSchema) - The new schedule." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } + "type": "DEPENDS_ON", + "target": "superset_tool.client" }, { - "name": "get_environment_databases", - "type": "Function", - "start_line": 94, - "end_line": 122, + "type": "DEPENDS_ON", + "target": "superset_tool.utils" + } + ], + "children": [ + { + "name": "BackupPlugin", + "type": "Class", + "start_line": 28, + "end_line": 148, "tags": { - "PURPOSE": "Fetch the list of databases from a specific environment.", - "PARAM": "id (str) - The environment ID.", - "RETURN": "List[Dict] - List of databases." + "PURPOSE": "Implementation of the backup plugin logic." }, "relations": [], "children": [], @@ -7054,77 +7389,98 @@ } }, { - "name": "PluginsRouter", + "name": "DebugPluginModule", "type": "Module", "start_line": 1, - "end_line": 22, + "end_line": 149, "tags": { - "SEMANTICS": "api, router, plugins, list", - "PURPOSE": "Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.", - "LAYER": "UI (API)", - "RELATION": "Depends on the PluginLoader and PluginConfig. It is included by the main app." + "SEMANTICS": "plugin, debug, api, database, superset", + "PURPOSE": "Implements a plugin for system diagnostics and debugging Superset API responses.", + "LAYER": "Plugins", + "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.", + "CONSTRAINT": "Must use belief_scope for logging." }, "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.api.routes.migration", - "type": "Module", - "start_line": 1, - "end_line": 76, - "tags": { - "SEMANTICS": "api, migration, dashboards", - "PURPOSE": "API endpoints for migration operations.", - "LAYER": "API" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "backend.src.dependencies" - }, - { - "type": "DEPENDS_ON", - "target": "backend.src.models.dashboard" - } - ], "children": [ { - "name": "get_dashboards", - "type": "Function", - "start_line": 17, - "end_line": 40, + "name": "DebugPlugin", + "type": "Class", + "start_line": 15, + "end_line": 148, "tags": { - "PURPOSE": "Fetch all dashboards from the specified environment for the grid.", - "PRE": "Environment ID must be valid.", - "POST": "Returns a list of dashboard metadata.", - "PARAM": "env_id (str) - The ID of the environment to fetch from.", - "RETURN": "List[DashboardMetadata]" + "PURPOSE": "Plugin for system diagnostics and debugging." }, "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "execute_migration", - "type": "Function", - "start_line": 42, - "end_line": 74, - "tags": { - "PURPOSE": "Execute the migration of selected dashboards.", - "PRE": "Selection must be valid and environments must exist.", - "POST": "Starts the migration task and returns the task ID.", - "PARAM": "selection (DashboardSelection) - The dashboards to migrate.", - "RETURN": "Dict - {\"task_id\": str, \"message\": str}" - }, - "relations": [], - "children": [], + "children": [ + { + "name": "DebugPlugin.get_schema", + "type": "Function", + "start_line": 38, + "end_line": 73, + "tags": { + "PURPOSE": "Returns the JSON schema for the debug plugin parameters." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugPlugin.execute", + "type": "Function", + "start_line": 75, + "end_line": 87, + "tags": { + "PURPOSE": "Executes the debug logic." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugPlugin._test_db_api", + "type": "Function", + "start_line": 89, + "end_line": 120, + "tags": { + "PURPOSE": "Tests database API connectivity for source and target environments.", + "PRE": "source_env and target_env params exist.", + "POST": "Returns DB counts for both envs.", + "PARAM": "params (Dict) - Plugin parameters.", + "RETURN": "Dict - Comparison results." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugPlugin._get_dataset_structure", + "type": "Function", + "start_line": 122, + "end_line": 146, + "tags": { + "PURPOSE": "Retrieves the structure of a dataset.", + "PRE": "env and dataset_id params exist.", + "POST": "Returns dataset JSON structure.", + "PARAM": "params (Dict) - Plugin parameters.", + "RETURN": "Dict - Dataset structure." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -7137,110 +7493,207 @@ } }, { - "name": "backend.src.api.routes.mappings", + "name": "SearchPluginModule", "type": "Module", "start_line": 1, - "end_line": 110, + "end_line": 161, "tags": { - "SEMANTICS": "api, mappings, database, fuzzy-matching", - "PURPOSE": "API endpoints for managing database mappings and getting suggestions.", - "LAYER": "API", - "INVARIANT": "Mappings are persisted in the SQLite database." + "SEMANTICS": "plugin, search, datasets, regex, superset", + "PURPOSE": "Implements a plugin for searching text patterns across all datasets in a specific Superset environment.", + "LAYER": "Plugins", + "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "SearchPlugin", + "type": "Class", + "start_line": 16, + "end_line": 160, + "tags": { + "PURPOSE": "Plugin for searching text patterns in Superset datasets." + }, + "relations": [], + "children": [ + { + "name": "SearchPlugin.get_schema", + "type": "Function", + "start_line": 39, + "end_line": 58, + "tags": { + "PURPOSE": "Returns the JSON schema for the search plugin parameters." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SearchPlugin.execute", + "type": "Function", + "start_line": 60, + "end_line": 127, + "tags": { + "PURPOSE": "Executes the dataset search logic.", + "PRE": "Params contain valid 'env' and 'query'.", + "POST": "Returns a dictionary with count and results list." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SearchPlugin._get_context", + "type": "Function", + "start_line": 129, + "end_line": 158, + "tags": { + "PURPOSE": "Extracts a small context around the match for display." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MapperPluginModule", + "type": "Module", + "start_line": 1, + "end_line": 164, + "tags": { + "SEMANTICS": "plugin, mapper, datasets, postgresql, excel", + "PURPOSE": "Implements a plugin for mapping dataset columns using external database connections or Excel files.", + "LAYER": "Plugins", + "RELATION": "Inherits from PluginBase. Uses DatasetMapper from superset_tool.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "MapperPlugin", + "type": "Class", + "start_line": 19, + "end_line": 163, + "tags": { + "PURPOSE": "Plugin for mapping dataset columns verbose names." + }, + "relations": [], + "children": [ + { + "name": "MapperPlugin.get_schema", + "type": "Function", + "start_line": 42, + "end_line": 88, + "tags": { + "PURPOSE": "Returns the JSON schema for the mapper plugin parameters." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MapperPlugin.execute", + "type": "Function", + "start_line": 90, + "end_line": 161, + "tags": { + "PURPOSE": "Executes the dataset mapping logic.", + "PRE": "Params contain valid 'env', 'dataset_id', and 'source'.", + "POST": "Updates the dataset in Superset." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MigrationPlugin", + "type": "Module", + "start_line": 1, + "end_line": 300, + "tags": { + "SEMANTICS": "migration, superset, automation, dashboard, plugin", + "PURPOSE": "A plugin that provides functionality to migrate Superset dashboards between environments.", + "LAYER": "App" }, "relations": [ { - "type": "DEPENDS_ON", - "target": "backend.src.dependencies" + "type": "IMPLEMENTS", + "target": "PluginBase" }, { "type": "DEPENDS_ON", - "target": "backend.src.core.database" + "target": "superset_tool.client" }, { "type": "DEPENDS_ON", - "target": "backend.src.services.mapping_service" + "target": "superset_tool.utils" } ], "children": [ { - "name": "MappingCreate", - "type": "DataClass", + "name": "MigrationPlugin", + "type": "Class", "start_line": 24, - "end_line": 32, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MappingResponse", - "type": "DataClass", - "start_line": 34, - "end_line": 46, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SuggestRequest", - "type": "DataClass", - "start_line": 48, - "end_line": 52, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_mappings", - "type": "Function", - "start_line": 54, - "end_line": 68, + "end_line": 299, "tags": { - "PURPOSE": "List all saved database mappings." + "PURPOSE": "Implementation of the migration plugin logic." }, "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "create_mapping", - "type": "Function", - "start_line": 70, - "end_line": 93, - "tags": { - "PURPOSE": "Create or update a database mapping." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "suggest_mappings_api", - "type": "Function", - "start_line": 95, - "end_line": 108, - "tags": { - "PURPOSE": "Get suggested mappings based on fuzzy matching." - }, - "relations": [], - "children": [], + "children": [ + { + "name": "MigrationPlugin.execute", + "type": "Action", + "start_line": 105, + "end_line": 292, + "tags": { + "PURPOSE": "Execute the migration logic with proper task logging." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], "compliance": { "valid": true, "issues": [] diff --git a/specs/project_map.md b/specs/project_map.md index b1ad279..92a3341 100644 --- a/specs/project_map.md +++ b/specs/project_map.md @@ -37,52 +37,6 @@ - 📝 Generates the token-optimized project map. - ƒ **_write_entity_md** (`Function`) - 📝 Recursive helper to write entity tree to Markdown. -- 📦 **search_script** (`Module`) - - 📝 Предоставляет утилиты для поиска по текстовым паттернам в метаданных датасетов Superset. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - ƒ **search_datasets** (`Function`) - - 📝 Выполняет поиск по строковому паттерну в метаданных всех датасетов. - - 🔗 CALLS -> `client.get_datasets` - - ƒ **save_results_to_file** (`Function`) - - 📝 Сохраняет результаты поиска в текстовый файл. - - ƒ **print_search_results** (`Function`) - - 📝 Форматирует результаты поиска для читаемого вывода в консоль. - - ƒ **main** (`Function`) - - 📝 Основная точка входа для запуска скрипта поиска. - - 🔗 CALLS -> `setup_clients` - - 🔗 CALLS -> `search_datasets` - - 🔗 CALLS -> `print_search_results` - - 🔗 CALLS -> `save_results_to_file` -- 📦 **get_dataset_structure** (`Module`) - - 📝 Этот модуль предназначен для получения и сохранения структуры данных датасета из Superset. Он используется для отладки и анализа данных, возвращаемых API. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils.init_clients` - - 🔗 DEPENDS_ON -> `superset_tool.utils.logger` - - ƒ **get_and_save_dataset** (`Function`) - - 📝 Получает структуру датасета из Superset и сохраняет ее в JSON-файл. - - 🔗 CALLS -> `setup_clients` - - 🔗 CALLS -> `superset_client.get_dataset` -- 📦 **debug_db_api** (`Module`) - - 📝 Скрипт для отладки структуры ответа API баз данных. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - ƒ **debug_database_api** (`Function`) - - 📝 Отладка структуры ответа API баз данных. - - 🔗 CALLS -> `setup_clients` - - 🔗 CALLS -> `client.get_databases` -- 📦 **run_mapper** (`Module`) - - 📝 Этот модуль является CLI-точкой входа для запуска процесса меппинга метаданных датасетов. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.utils.dataset_mapper` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - ƒ **main** (`Function`) - - 📝 Парсит аргументы командной строки и запускает процесс меппинга. - - 🔗 CALLS -> `setup_clients` - - 🔗 CALLS -> `DatasetMapper.run_mapping` - 📦 **migration_script** (`Module`) - 📝 Предоставляет интерактивный CLI для миграции дашбордов Superset между окружениями с возможностью восстановления после ошибок. - 🏗️ Layer: App @@ -132,25 +86,6 @@ - 🔗 CALLS -> `create_dashboard_export` - 🔗 CALLS -> `self.to_c.import_dashboard` - 🔗 CALLS -> `self._batch_delete_by_ids` -- 📦 **backup_script** (`Module`) - - 📝 Этот модуль отвечает за автоматизированное резервное копирование дашбордов Superset. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - 📦 **BackupConfig** (`DataClass`) - - 📝 Хранит конфигурацию для процесса бэкапа. - - ƒ **backup_dashboards** (`Function`) - - 📝 Выполняет бэкап всех доступных дашбордов для заданного клиента и окружения, пропуская ошибки экспорта. - - 🔗 CALLS -> `client.get_dashboards` - - 🔗 CALLS -> `client.export_dashboard` - - 🔗 CALLS -> `save_and_unpack_dashboard` - - 🔗 CALLS -> `archive_exports` - - 🔗 CALLS -> `consolidate_archive_folders` - - 🔗 CALLS -> `remove_empty_directories` - - ƒ **main** (`Function`) - - 📝 Основная точка входа для запуска процесса резервного копирования. - - 🔗 CALLS -> `setup_clients` - - 🔗 CALLS -> `backup_dashboards` - 📦 **superset_tool.exceptions** (`Module`) - 📝 Определяет иерархию пользовательских исключений для всего инструмента, обеспечивая единую точку обработки ошибок. - 🏗️ Layer: Infra @@ -190,9 +125,23 @@ - ℂ **ConfigurationError** (`Class`) - 📝 Ошибки, связанные с неверной конфигурацией инструмента. - 🔗 INHERITS_FROM -> `SupersetToolError` -- 📦 **superset_tool** (`Module`) - - 📝 Root package for superset_tool. - - 🏗️ Layer: Domain +- 📦 **superset_tool.models** (`Module`) + - 📝 Определяет Pydantic-модели для конфигурации инструмента, обеспечивая валидацию данных. + - 🏗️ Layer: Infra + - 🔗 DEPENDS_ON -> `pydantic` + - 🔗 DEPENDS_ON -> `superset_tool.utils.logger` + - ℂ **SupersetConfig** (`Class`) + - 📝 Модель конфигурации для подключения к одному экземпляру Superset API. + - 🔗 INHERITS_FROM -> `pydantic.BaseModel` + - ƒ **SupersetConfig.validate_auth** (`Function`) + - 📝 Проверяет, что словарь `auth` содержит все необходимые для аутентификации поля. + - ƒ **SupersetConfig.normalize_base_url** (`Function`) + - 📝 Нормализует `base_url`, добавляя `/api/v1`, если он отсутствует. + - ℂ **DatabaseConfig** (`Class`) + - 📝 Модель для параметров трансформации баз данных при миграции дашбордов. + - 🔗 INHERITS_FROM -> `pydantic.BaseModel` + - ƒ **DatabaseConfig.validate_config** (`Function`) + - 📝 Проверяет, что словарь `database_config` содержит ключи 'old' и 'new'. - 📦 **superset_tool.client** (`Module`) - 📝 Предоставляет высокоуровневый клиент для взаимодействия с Superset REST API, инкапсулируя логику запросов, обработку ошибок и пагинацию. - 🏗️ Layer: Domain @@ -259,23 +208,17 @@ - ƒ **SupersetClient.update_dataset** (`Function`) - 📝 Обновляет данные датасета по его ID. - 🔗 CALLS -> `self.network.request` -- 📦 **superset_tool.models** (`Module`) - - 📝 Определяет Pydantic-модели для конфигурации инструмента, обеспечивая валидацию данных. +- 📦 **superset_tool** (`Module`) + - 📝 Root package for superset_tool. + - 🏗️ Layer: Domain +- 📦 **superset_tool.utils.init_clients** (`Module`) + - 📝 Централизованно инициализирует клиенты Superset для различных окружений (DEV, PROD, SBX, PREPROD), используя `keyring` для безопасного доступа к паролям. - 🏗️ Layer: Infra - - 🔗 DEPENDS_ON -> `pydantic` - - 🔗 DEPENDS_ON -> `superset_tool.utils.logger` - - ℂ **SupersetConfig** (`Class`) - - 📝 Модель конфигурации для подключения к одному экземпляру Superset API. - - 🔗 INHERITS_FROM -> `pydantic.BaseModel` - - ƒ **SupersetConfig.validate_auth** (`Function`) - - 📝 Проверяет, что словарь `auth` содержит все необходимые для аутентификации поля. - - ƒ **SupersetConfig.normalize_base_url** (`Function`) - - 📝 Нормализует `base_url`, добавляя `/api/v1`, если он отсутствует. - - ℂ **DatabaseConfig** (`Class`) - - 📝 Модель для параметров трансформации баз данных при миграции дашбордов. - - 🔗 INHERITS_FROM -> `pydantic.BaseModel` - - ƒ **DatabaseConfig.validate_config** (`Function`) - - 📝 Проверяет, что словарь `database_config` содержит ключи 'old' и 'new'. + - 🔗 DEPENDS_ON -> `superset_tool.models` + - 🔗 DEPENDS_ON -> `superset_tool.client` + - 🔗 DEPENDS_ON -> `keyring` + - ƒ **setup_clients** (`Function`) + - 📝 Инициализирует и возвращает словарь клиентов `SupersetClient`. - 📦 **superset_tool.utils.logger** (`Module`) - 📝 Предоставляет универсальную обёртку над стандартным `logging.Logger` для унифицированного создания и управления логгерами с выводом в консоль и/или файл. - 🏗️ Layer: Infra @@ -297,6 +240,43 @@ - 📝 Записывает сообщение уровня CRITICAL. - ƒ **SupersetLogger.exception** (`Function`) - 📝 Записывает сообщение уровня ERROR вместе с трассировкой стека текущего исключения. +- 📦 **superset_tool.utils.fileio** (`Module`) + - 📝 Предоставляет набор утилит для управления файловыми операциями, включая работу с временными файлами, архивами ZIP, файлами YAML и очистку директорий. + - 🏗️ Layer: Infra + - 🔗 DEPENDS_ON -> `superset_tool.exceptions` + - 🔗 DEPENDS_ON -> `superset_tool.utils.logger` + - 🔗 DEPENDS_ON -> `pyyaml` + - ƒ **create_temp_file** (`Function`) + - 📝 Контекстный менеджер для создания временного файла или директории с гарантированным удалением. + - ƒ **remove_empty_directories** (`Function`) + - 📝 Рекурсивно удаляет все пустые поддиректории, начиная с указанного пути. + - ƒ **read_dashboard_from_disk** (`Function`) + - 📝 Читает бинарное содержимое файла с диска. + - ƒ **calculate_crc32** (`Function`) + - 📝 Вычисляет контрольную сумму CRC32 для файла. + - 📦 **RetentionPolicy** (`DataClass`) + - 📝 Определяет политику хранения для архивов (ежедневные, еженедельные, ежемесячные). + - ƒ **archive_exports** (`Function`) + - 📝 Управляет архивом экспортированных файлов, применяя политику хранения и дедупликацию. + - 🔗 CALLS -> `apply_retention_policy` + - 🔗 CALLS -> `calculate_crc32` + - ƒ **apply_retention_policy** (`Function`) + - 📝 (Helper) Применяет политику хранения к списку файлов, возвращая те, что нужно сохранить. + - ƒ **save_and_unpack_dashboard** (`Function`) + - 📝 Сохраняет бинарное содержимое ZIP-архива на диск и опционально распаковывает его. + - ƒ **update_yamls** (`Function`) + - 📝 Обновляет конфигурации в YAML-файлах, заменяя значения или применяя regex. + - 🔗 CALLS -> `_update_yaml_file` + - ƒ **_update_yaml_file** (`Function`) + - 📝 (Helper) Обновляет один YAML файл. + - ƒ **create_dashboard_export** (`Function`) + - 📝 Создает ZIP-архив из указанных исходных путей. + - ƒ **sanitize_filename** (`Function`) + - 📝 Очищает строку от символов, недопустимых в именах файлов. + - ƒ **get_filename_from_headers** (`Function`) + - 📝 Извлекает имя файла из HTTP заголовка 'Content-Disposition'. + - ƒ **consolidate_archive_folders** (`Function`) + - 📝 Консолидирует директории архивов на основе общего слага в имени. - 📦 **superset_tool.utils.network** (`Module`) - 📝 Инкапсулирует низкоуровневую HTTP-логику для взаимодействия с Superset API, включая аутентификацию, управление сессией, retry-логику и обработку ошибок. - 🏗️ Layer: Infra @@ -365,51 +345,17 @@ - 📦 **superset_tool.utils** (`Module`) - 📝 Utility package for superset_tool. - 🏗️ Layer: Infra -- 📦 **superset_tool.utils.init_clients** (`Module`) - - 📝 Централизованно инициализирует клиенты Superset для различных окружений (DEV, PROD, SBX, PREPROD), используя `keyring` для безопасного доступа к паролям. - - 🏗️ Layer: Infra - - 🔗 DEPENDS_ON -> `superset_tool.models` - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `keyring` - - ƒ **setup_clients** (`Function`) - - 📝 Инициализирует и возвращает словарь клиентов `SupersetClient`. -- 📦 **superset_tool.utils.fileio** (`Module`) - - 📝 Предоставляет набор утилит для управления файловыми операциями, включая работу с временными файлами, архивами ZIP, файлами YAML и очистку директорий. - - 🏗️ Layer: Infra - - 🔗 DEPENDS_ON -> `superset_tool.exceptions` - - 🔗 DEPENDS_ON -> `superset_tool.utils.logger` - - 🔗 DEPENDS_ON -> `pyyaml` - - ƒ **create_temp_file** (`Function`) - - 📝 Контекстный менеджер для создания временного файла или директории с гарантированным удалением. - - ƒ **remove_empty_directories** (`Function`) - - 📝 Рекурсивно удаляет все пустые поддиректории, начиная с указанного пути. - - ƒ **read_dashboard_from_disk** (`Function`) - - 📝 Читает бинарное содержимое файла с диска. - - ƒ **calculate_crc32** (`Function`) - - 📝 Вычисляет контрольную сумму CRC32 для файла. - - 📦 **RetentionPolicy** (`DataClass`) - - 📝 Определяет политику хранения для архивов (ежедневные, еженедельные, ежемесячные). - - ƒ **archive_exports** (`Function`) - - 📝 Управляет архивом экспортированных файлов, применяя политику хранения и дедупликацию. - - 🔗 CALLS -> `apply_retention_policy` - - 🔗 CALLS -> `calculate_crc32` - - ƒ **apply_retention_policy** (`Function`) - - 📝 (Helper) Применяет политику хранения к списку файлов, возвращая те, что нужно сохранить. - - ƒ **save_and_unpack_dashboard** (`Function`) - - 📝 Сохраняет бинарное содержимое ZIP-архива на диск и опционально распаковывает его. - - ƒ **update_yamls** (`Function`) - - 📝 Обновляет конфигурации в YAML-файлах, заменяя значения или применяя regex. - - 🔗 CALLS -> `_update_yaml_file` - - ƒ **_update_yaml_file** (`Function`) - - 📝 (Helper) Обновляет один YAML файл. - - ƒ **create_dashboard_export** (`Function`) - - 📝 Создает ZIP-архив из указанных исходных путей. - - ƒ **sanitize_filename** (`Function`) - - 📝 Очищает строку от символов, недопустимых в именах файлов. - - ƒ **get_filename_from_headers** (`Function`) - - 📝 Извлекает имя файла из HTTP заголовка 'Content-Disposition'. - - ƒ **consolidate_archive_folders** (`Function`) - - 📝 Консолидирует директории архивов на основе общего слага в имени. +- ƒ **handleSort** (`Function`) + - 📝 Toggles sort direction or changes sort column. + - ƒ **handleSelectionChange** (`Function`) + - 📝 Handles individual checkbox changes. + - ƒ **handleSelectAll** (`Function`) + - 📝 Handles select all checkbox. +- 📦 **main** (`Module`) + - 📝 Entry point for the Svelte application. + - 🏗️ Layer: UI-Entry + - 📦 **app_instance** (`Data`) + - 📝 Initialized Svelte app instance. - 🧩 **App** (`Component`) - 📝 The root component of the frontend application. Manages navigation and layout. - 🏗️ Layer: UI @@ -417,146 +363,6 @@ - 📝 Handles form submission for task creation. - ƒ **navigate** (`Function`) - 📝 Changes the current page and resets state. -- 📦 **main** (`Module`) - - 📝 Entry point for the Svelte application. - - 🏗️ Layer: UI-Entry - - 📦 **app_instance** (`Data`) - - 📝 Initialized Svelte app instance. -- 🧩 **DashboardGrid** (`Component`) - - 📝 Displays a grid of dashboards with selection and pagination. - - 🏗️ Layer: Component - - ƒ **handleSort** (`Function`) - - 📝 Toggles sort direction or changes sort column. - - ƒ **handleSelectionChange** (`Function`) - - 📝 Handles individual checkbox changes. - - ƒ **handleSelectAll** (`Function`) - - 📝 Handles select all checkbox. - - ƒ **goToPage** (`Function`) - - 📝 Changes current page. -- 🧩 **TaskHistory** (`Component`) - - 📝 Displays a list of recent tasks with their status and allows selecting them for viewing logs. - - 🏗️ Layer: UI - - ƒ **fetchTasks** (`Function`) - - 📝 Fetches the list of recent tasks from the API. - - ƒ **clearTasks** (`Function`) - - 📝 Clears tasks from the history, optionally filtered by status. - - ƒ **selectTask** (`Function`) - - 📝 Selects a task and fetches its full details. - - ƒ **getStatusColor** (`Function`) - - 📝 Returns the CSS color class for a given task status. - - ƒ **onMount** (`Function`) - - 📝 Initializes the component by fetching tasks and starting polling. - - ƒ **onDestroy** (`Function`) - - 📝 Cleans up the polling interval when the component is destroyed. -- 🧩 **MappingTable** (`Component`) - - 📝 Displays and allows editing of database mappings. - - 🏗️ Layer: Feature - - ƒ **updateMapping** (`Function`) - - 📝 Updates a mapping for a specific source database. - - ƒ **getSuggestion** (`Function`) - - 📝 Finds a suggestion for a source database. -- 🧩 **EnvSelector** (`Component`) - - 📝 Provides a UI component for selecting source and target environments. - - 🏗️ Layer: Feature - - ƒ **handleSelect** (`Function`) - - 📝 Dispatches the selection change event. -- 🧩 **TaskList** (`Component`) - - 📝 Displays a list of tasks with their status and execution details. - - 🏗️ Layer: Component - - ƒ **getStatusColor** (`Function`) - - 📝 Returns the CSS color class for a given task status. - - ƒ **formatTime** (`Function`) - - 📝 Formats a date string using date-fns. - - ƒ **handleTaskClick** (`Function`) - - 📝 Dispatches a select event when a task is clicked. -- 🧩 **DynamicForm** (`Component`) - - 📝 Generates a form dynamically based on a JSON schema. - - 🏗️ Layer: UI - - ƒ **handleSubmit** (`Function`) - - 📝 Dispatches the submit event with the form data. - - ƒ **initializeForm** (`Function`) - - 📝 Initialize form data with default values from the schema. -- 🧩 **Footer** (`Component`) - - 📝 Displays the application footer with copyright information. - - 🏗️ Layer: UI -- 🧩 **Navbar** (`Component`) - - 📝 Main navigation bar for the application. - - 🏗️ Layer: UI -- 🧩 **TaskRunner** (`Component`) - - 📝 Connects to a WebSocket to display real-time logs for a running task. - - 🏗️ Layer: UI - - ƒ **connect** (`Function`) - - 📝 Establishes WebSocket connection with exponential backoff. - - ƒ **fetchTargetDatabases** (`Function`) - - 📝 Fetches the list of databases in the target environment. - - ƒ **handleMappingResolve** (`Function`) - - 📝 Handles the resolution of a missing database mapping. - - ƒ **handlePasswordResume** (`Function`) - - 📝 Handles the submission of database passwords to resume a task. - - ƒ **startDataTimeout** (`Function`) - - 📝 Starts a timeout to detect when the log stream has stalled. - - ƒ **resetDataTimeout** (`Function`) - - 📝 Resets the data stall timeout. - - ƒ **onMount** (`Function`) - - 📝 Initializes the component and subscribes to task selection changes. - - ƒ **onDestroy** (`Function`) - - 📝 Close WebSocket connection when the component is destroyed. -- 🧩 **TaskLogViewer** (`Component`) - - 📝 Displays detailed logs for a specific task in a modal. - - 🏗️ Layer: UI - - ƒ **fetchLogs** (`Function`) - - 📝 Fetches logs for the current task. - - ƒ **scrollToBottom** (`Function`) - - 📝 Scrolls the log container to the bottom. - - ƒ **handleScroll** (`Function`) - - 📝 Updates auto-scroll preference based on scroll position. - - ƒ **close** (`Function`) - - 📝 Closes the log viewer modal. - - ƒ **getLogLevelColor** (`Function`) - - 📝 Returns the CSS color class for a given log level. - - ƒ **onDestroy** (`Function`) - - 📝 Cleans up the polling interval. -- 🧩 **PasswordPrompt** (`Component`) - - 📝 A modal component to prompt the user for database passwords when a migration task is paused. - - 🏗️ Layer: UI - - ƒ **handleSubmit** (`Function`) - - 📝 Validates and dispatches the passwords to resume the task. - - ƒ **handleCancel** (`Function`) - - 📝 Cancels the password prompt. -- 🧩 **MissingMappingModal** (`Component`) - - 📝 Prompts the user to provide a database mapping when one is missing during migration. - - 🏗️ Layer: Feature - - ƒ **resolve** (`Function`) - - 📝 Dispatches the resolution event with the selected mapping. - - ƒ **cancel** (`Function`) - - 📝 Cancels the mapping resolution modal. -- 🧩 **Toast** (`Component`) - - 📝 Displays transient notifications (toasts) in the bottom-right corner. - - 🏗️ Layer: UI -- 🧩 **Settings** (`Component`) - - 📝 The main settings page for the application, allowing management of environments and global settings. - - 🏗️ Layer: UI - - ƒ **loadSettings** (`Function`) - - 📝 Loads settings from the backend. - - ƒ **handleSaveGlobal** (`Function`) - - 📝 Saves global settings to the backend. - - ƒ **handleAddOrUpdateEnv** (`Function`) - - 📝 Adds or updates an environment. - - ƒ **handleDeleteEnv** (`Function`) - - 📝 Deletes an environment. - - ƒ **handleTestEnv** (`Function`) - - 📝 Tests the connection to an environment. - - ƒ **editEnv** (`Function`) - - 📝 Sets the form to edit an existing environment. - - ƒ **resetEnvForm** (`Function`) - - 📝 Resets the environment form. -- 🧩 **Dashboard** (`Component`) - - 📝 Displays the list of available plugins and allows selecting one. - - 🏗️ Layer: UI - - ƒ **onMount** (`Function`) - - 📝 Fetch plugins when the component mounts. - - ƒ **selectPlugin** (`Function`) - - 📝 Selects a plugin to display its form. - 📦 **stores_module** (`Module`) - 📝 Global state management using Svelte stores. - 🏗️ Layer: UI-State @@ -626,9 +432,190 @@ - 📝 Fetches databases from both environments and gets suggestions. - ƒ **handleUpdate** (`Function`) - 📝 Saves a mapping to the backend. -- 📦 **Dependencies** (`Module`) - - 📝 Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports. - - 🏗️ Layer: Core +- 🧩 **SearchPage** (`Component`) + - 📝 Page for the dataset search tool. + - 🏗️ Layer: UI +- 🧩 **MapperPage** (`Component`) + - 📝 Page for the dataset column mapper tool. + - 🏗️ Layer: UI +- 🧩 **DebugPage** (`Component`) + - 📝 Page for system diagnostics and debugging. + - 🏗️ Layer: UI +- 🧩 **ConnectionsSettingsPage** (`Component`) + - 📝 Page for managing database connection configurations. + - 🏗️ Layer: UI +- 🧩 **Dashboard** (`Component`) + - 📝 Displays the list of available plugins and allows selecting one. + - 🏗️ Layer: UI + - ƒ **onMount** (`Function`) + - 📝 Fetch plugins when the component mounts. + - ƒ **selectPlugin** (`Function`) + - 📝 Selects a plugin to display its form. +- 🧩 **Settings** (`Component`) + - 📝 The main settings page for the application, allowing management of environments and global settings. + - 🏗️ Layer: UI + - ƒ **loadSettings** (`Function`) + - 📝 Loads settings from the backend. + - ƒ **handleSaveGlobal** (`Function`) + - 📝 Saves global settings to the backend. + - ƒ **handleAddOrUpdateEnv** (`Function`) + - 📝 Adds or updates an environment. + - ƒ **handleDeleteEnv** (`Function`) + - 📝 Deletes an environment. + - ƒ **handleTestEnv** (`Function`) + - 📝 Tests the connection to an environment. + - ƒ **editEnv** (`Function`) + - 📝 Sets the form to edit an existing environment. + - ƒ **resetEnvForm** (`Function`) + - 📝 Resets the environment form. +- 🧩 **PasswordPrompt** (`Component`) + - 📝 A modal component to prompt the user for database passwords when a migration task is paused. + - 🏗️ Layer: UI + - ƒ **handleSubmit** (`Function`) + - 📝 Validates and dispatches the passwords to resume the task. + - ƒ **handleCancel** (`Function`) + - 📝 Cancels the password prompt. +- 🧩 **MappingTable** (`Component`) + - 📝 Displays and allows editing of database mappings. + - 🏗️ Layer: Feature + - ƒ **updateMapping** (`Function`) + - 📝 Updates a mapping for a specific source database. + - ƒ **getSuggestion** (`Function`) + - 📝 Finds a suggestion for a source database. +- 🧩 **TaskLogViewer** (`Component`) + - 📝 Displays detailed logs for a specific task in a modal. + - 🏗️ Layer: UI + - ƒ **fetchLogs** (`Function`) + - 📝 Fetches logs for the current task. + - ƒ **scrollToBottom** (`Function`) + - 📝 Scrolls the log container to the bottom. + - ƒ **handleScroll** (`Function`) + - 📝 Updates auto-scroll preference based on scroll position. + - ƒ **close** (`Function`) + - 📝 Closes the log viewer modal. + - ƒ **getLogLevelColor** (`Function`) + - 📝 Returns the CSS color class for a given log level. + - ƒ **onDestroy** (`Function`) + - 📝 Cleans up the polling interval. +- 🧩 **Footer** (`Component`) + - 📝 Displays the application footer with copyright information. + - 🏗️ Layer: UI +- 🧩 **MissingMappingModal** (`Component`) + - 📝 Prompts the user to provide a database mapping when one is missing during migration. + - 🏗️ Layer: Feature + - ƒ **resolve** (`Function`) + - 📝 Dispatches the resolution event with the selected mapping. + - ƒ **cancel** (`Function`) + - 📝 Cancels the mapping resolution modal. +- 🧩 **DashboardGrid** (`Component`) + - 📝 Displays a grid of dashboards with selection and pagination. + - 🏗️ Layer: Component + - ƒ **handleSort** (`Function`) + - 📝 Toggles sort direction or changes sort column. + - ƒ **handleSelectionChange** (`Function`) + - 📝 Handles individual checkbox changes. + - ƒ **handleSelectAll** (`Function`) + - 📝 Handles select all checkbox. + - ƒ **goToPage** (`Function`) + - 📝 Changes current page. +- 🧩 **Navbar** (`Component`) + - 📝 Main navigation bar for the application. + - 🏗️ Layer: UI +- 🧩 **TaskHistory** (`Component`) + - 📝 Displays a list of recent tasks with their status and allows selecting them for viewing logs. + - 🏗️ Layer: UI + - ƒ **fetchTasks** (`Function`) + - 📝 Fetches the list of recent tasks from the API. + - ƒ **clearTasks** (`Function`) + - 📝 Clears tasks from the history, optionally filtered by status. + - ƒ **selectTask** (`Function`) + - 📝 Selects a task and fetches its full details. + - ƒ **getStatusColor** (`Function`) + - 📝 Returns the CSS color class for a given task status. + - ƒ **onMount** (`Function`) + - 📝 Initializes the component by fetching tasks and starting polling. + - ƒ **onDestroy** (`Function`) + - 📝 Cleans up the polling interval when the component is destroyed. +- 🧩 **Toast** (`Component`) + - 📝 Displays transient notifications (toasts) in the bottom-right corner. + - 🏗️ Layer: UI +- 🧩 **TaskRunner** (`Component`) + - 📝 Connects to a WebSocket to display real-time logs for a running task. + - 🏗️ Layer: UI + - ƒ **connect** (`Function`) + - 📝 Establishes WebSocket connection with exponential backoff. + - ƒ **fetchTargetDatabases** (`Function`) + - 📝 Fetches the list of databases in the target environment. + - ƒ **handleMappingResolve** (`Function`) + - 📝 Handles the resolution of a missing database mapping. + - ƒ **handlePasswordResume** (`Function`) + - 📝 Handles the submission of database passwords to resume a task. + - ƒ **startDataTimeout** (`Function`) + - 📝 Starts a timeout to detect when the log stream has stalled. + - ƒ **resetDataTimeout** (`Function`) + - 📝 Resets the data stall timeout. + - ƒ **onMount** (`Function`) + - 📝 Initializes the component and subscribes to task selection changes. + - ƒ **onDestroy** (`Function`) + - 📝 Close WebSocket connection when the component is destroyed. +- 🧩 **TaskList** (`Component`) + - 📝 Displays a list of tasks with their status and execution details. + - 🏗️ Layer: Component + - ƒ **getStatusColor** (`Function`) + - 📝 Returns the CSS color class for a given task status. + - ƒ **formatTime** (`Function`) + - 📝 Formats a date string using date-fns. + - ƒ **handleTaskClick** (`Function`) + - 📝 Dispatches a select event when a task is clicked. +- 🧩 **DynamicForm** (`Component`) + - 📝 Generates a form dynamically based on a JSON schema. + - 🏗️ Layer: UI + - ƒ **handleSubmit** (`Function`) + - 📝 Dispatches the submit event with the form data. + - ƒ **initializeForm** (`Function`) + - 📝 Initialize form data with default values from the schema. +- 🧩 **EnvSelector** (`Component`) + - 📝 Provides a UI component for selecting source and target environments. + - 🏗️ Layer: Feature + - ƒ **handleSelect** (`Function`) + - 📝 Dispatches the selection change event. +- 🧩 **ConnectionForm** (`Component`) + - 📝 UI component for creating a new database connection configuration. + - 🏗️ Layer: UI + - ƒ **handleSubmit** (`Function`) + - 📝 Submits the connection form to the backend. +- 🧩 **ConnectionList** (`Component`) + - 📝 UI component for listing and deleting saved database connection configurations. + - 🏗️ Layer: UI + - ƒ **fetchConnections** (`Function`) + - 📝 Fetches the list of connections from the backend. + - ƒ **handleDelete** (`Function`) + - 📝 Deletes a connection configuration. +- 🧩 **MapperTool** (`Component`) + - 📝 UI component for mapping dataset column verbose names using the MapperPlugin. + - 🏗️ Layer: UI + - ƒ **fetchData** (`Function`) + - 📝 Fetches environments and saved connections. + - ƒ **handleRunMapper** (`Function`) + - 📝 Triggers the MapperPlugin task. +- 🧩 **DebugTool** (`Component`) + - 📝 UI component for system diagnostics and debugging API responses. + - 🏗️ Layer: UI + - ƒ **fetchEnvironments** (`Function`) + - 📝 Fetches available environments. + - ƒ **handleRunDebug** (`Function`) + - 📝 Triggers the debug task. + - ƒ **startPolling** (`Function`) + - 📝 Polls for task completion. +- 🧩 **SearchTool** (`Component`) + - 📝 UI component for searching datasets using the SearchPlugin. + - 🏗️ Layer: UI + - ƒ **fetchEnvironments** (`Function`) + - 📝 Fetches the list of available environments. + - ƒ **handleSearch** (`Function`) + - 📝 Triggers the SearchPlugin task. + - ƒ **startPolling** (`Function`) + - 📝 Polls for task completion and results. - 📦 **AppModule** (`Module`) - 📝 The main entry point for the FastAPI application. It initializes the app, configures CORS, sets up dependencies, includes API routers, and defines the WebSocket endpoint for log streaming. - 🏗️ Layer: UI (API) @@ -640,44 +627,25 @@ - 📝 Mounts the frontend build directory to serve static assets. - 📦 **RootEndpoint** (`Endpoint`) - 📝 A simple root endpoint to confirm that the API is running. -- 📦 **backend.src.models.mapping** (`Module`) - - 📝 Defines the database schema for environment metadata and database mappings using SQLAlchemy. - - 🏗️ Layer: Domain - - 🔗 DEPENDS_ON -> `sqlalchemy` - - ℂ **MigrationStatus** (`Class`) - - 📝 Enumeration of possible migration job statuses. - - ℂ **Environment** (`Class`) - - 📝 Represents a Superset instance environment. - - ℂ **DatabaseMapping** (`Class`) - - 📝 Represents a mapping between source and target databases. - - ℂ **MigrationJob** (`Class`) - - 📝 Represents a single migration execution job. -- 📦 **backend.src.models.dashboard** (`Module`) - - 📝 Defines data models for dashboard metadata and selection. - - 🏗️ Layer: Model - - ℂ **DashboardMetadata** (`Class`) - - 📝 Represents a dashboard available for migration. - - ℂ **DashboardSelection** (`Class`) - - 📝 Represents the user's selection of dashboards to migrate. -- 📦 **backend.src.models.task** (`Module`) - - 📝 Defines the database schema for task execution records. - - 🏗️ Layer: Domain - - 🔗 DEPENDS_ON -> `sqlalchemy` - - ℂ **TaskRecord** (`Class`) - - 📝 Represents a persistent record of a task execution. -- 📦 **backend.src.services.mapping_service** (`Module`) - - 📝 Orchestrates database fetching and fuzzy matching suggestions. - - 🏗️ Layer: Service - - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` - - 🔗 DEPENDS_ON -> `backend.src.core.utils.matching` - - ℂ **MappingService** (`Class`) - - 📝 Service for handling database mapping logic. - - ƒ **MappingService.__init__** (`Function`) - - 📝 Initializes the mapping service with a config manager. - - ƒ **MappingService._get_client** (`Function`) - - 📝 Helper to get an initialized SupersetClient for an environment. - - ƒ **MappingService.get_suggestions** (`Function`) - - 📝 Fetches databases from both environments and returns fuzzy matching suggestions. +- 📦 **Dependencies** (`Module`) + - 📝 Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports. + - 🏗️ Layer: Core +- 📦 **backend.src.core.superset_client** (`Module`) + - 📝 Extends the base SupersetClient with database-specific metadata fetching. + - 🏗️ Layer: Core + - 🔗 INHERITS_FROM -> `superset_tool.client.SupersetClient` + - ℂ **SupersetClient** (`Class`) + - 📝 Extended SupersetClient for migration-specific operations. + - ƒ **SupersetClient.get_databases_summary** (`Function`) + - 📝 Fetch a summary of databases including uuid, name, and engine. + - ƒ **SupersetClient.get_database_by_uuid** (`Function`) + - 📝 Find a database by its UUID. + - ƒ **SupersetClient.get_dashboards_summary** (`Function`) + - 📝 Fetches dashboard metadata optimized for the grid. + - ƒ **SupersetClient.get_dataset** (`Function`) + - 📝 Fetch full dataset structure including columns and metrics. + - ƒ **SupersetClient.update_dataset** (`Function`) + - 📝 Update dataset metadata. - 📦 **ConfigManagerModule** (`Module`) - 📝 Manages application configuration, including loading/saving to JSON and CRUD for environments. - 🏗️ Layer: Core @@ -709,43 +677,34 @@ - 📝 Updates an existing environment. - ƒ **delete_environment** (`Function`) - 📝 Deletes an environment by ID. -- 📦 **backend.src.core.superset_client** (`Module`) - - 📝 Extends the base SupersetClient with database-specific metadata fetching. +- 📦 **SchedulerModule** (`Module`) + - 📝 Manages scheduled tasks using APScheduler. - 🏗️ Layer: Core - - 🔗 INHERITS_FROM -> `superset_tool.client.SupersetClient` - - ℂ **SupersetClient** (`Class`) - - 📝 Extended SupersetClient for migration-specific operations. - - ƒ **SupersetClient.get_databases_summary** (`Function`) - - 📝 Fetch a summary of databases including uuid, name, and engine. - - ƒ **SupersetClient.get_database_by_uuid** (`Function`) - - 📝 Find a database by its UUID. - - ƒ **SupersetClient.get_dashboards_summary** (`Function`) - - 📝 Fetches dashboard metadata optimized for the grid. -- 📦 **backend.src.core.migration_engine** (`Module`) - - 📝 Handles the interception and transformation of Superset asset ZIP archives. + - ℂ **SchedulerService** (`Class`) + - 📝 Provides a service to manage scheduled backup tasks. + - ƒ **SchedulerService.start** (`Function`) + - 📝 Starts the background scheduler and loads initial schedules. + - ƒ **SchedulerService.stop** (`Function`) + - 📝 Stops the background scheduler. + - ƒ **SchedulerService.load_schedules** (`Function`) + - 📝 Loads backup schedules from configuration and registers them. + - ƒ **SchedulerService.add_backup_job** (`Function`) + - 📝 Adds a scheduled backup job for an environment. + - ƒ **SchedulerService._trigger_backup** (`Function`) + - 📝 Triggered by the scheduler to start a backup task. +- 📦 **ConfigModels** (`Module`) + - 📝 Defines the data models for application configuration using Pydantic. - 🏗️ Layer: Core - - 🔗 DEPENDS_ON -> `PyYAML` - - ℂ **MigrationEngine** (`Class`) - - 📝 Engine for transforming Superset export ZIPs. - - ƒ **MigrationEngine.transform_zip** (`Function`) - - 📝 Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages. - - ƒ **MigrationEngine._transform_yaml** (`Function`) - - 📝 Replaces database_uuid in a single YAML file. -- 📦 **LoggerModule** (`Module`) - - 📝 Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets. - - 🏗️ Layer: Core - - ℂ **BeliefFormatter** (`Class`) - - 📝 Custom logging formatter that adds belief state prefixes to log messages. - - ℂ **LogEntry** (`Class`) - - 📝 A Pydantic model representing a single, structured log entry. This is a re-definition for consistency, as it's also defined in task_manager.py. - - ƒ **BeliefScope** (`Function`) - - 📝 Context manager for structured Belief State logging. - - ƒ **ConfigureLogger** (`Function`) - - 📝 Configures the logger with the provided logging settings. - - ℂ **WebSocketLogHandler** (`Class`) - - 📝 A custom logging handler that captures log records into a buffer. It is designed to be extended for real-time log streaming over WebSockets. - - 📦 **Logger** (`Global`) - - 📝 The global logger instance for the application, configured with both a console handler and the custom WebSocket handler. + - 📦 **Schedule** (`DataClass`) + - 📝 Represents a backup schedule configuration. + - 📦 **Environment** (`DataClass`) + - 📝 Represents a Superset environment configuration. + - 📦 **LoggingConfig** (`DataClass`) + - 📝 Defines the configuration for the application's logging system. + - 📦 **GlobalSettings** (`DataClass`) + - 📝 Represents global application settings. + - 📦 **AppConfig** (`DataClass`) + - 📝 The root configuration model containing all application settings. - 📦 **backend.src.core.database** (`Module`) - 📝 Configures the SQLite database connection and session management. - 🏗️ Layer: Core @@ -764,34 +723,21 @@ - 📝 Dependency for getting a database session. - ƒ **get_tasks_db** (`Function`) - 📝 Dependency for getting a tasks database session. -- 📦 **ConfigModels** (`Module`) - - 📝 Defines the data models for application configuration using Pydantic. +- 📦 **LoggerModule** (`Module`) + - 📝 Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets. - 🏗️ Layer: Core - - 📦 **Schedule** (`DataClass`) - - 📝 Represents a backup schedule configuration. - - 📦 **Environment** (`DataClass`) - - 📝 Represents a Superset environment configuration. - - 📦 **LoggingConfig** (`DataClass`) - - 📝 Defines the configuration for the application's logging system. - - 📦 **GlobalSettings** (`DataClass`) - - 📝 Represents global application settings. - - 📦 **AppConfig** (`DataClass`) - - 📝 The root configuration model containing all application settings. -- 📦 **SchedulerModule** (`Module`) - - 📝 Manages scheduled tasks using APScheduler. - - 🏗️ Layer: Core - - ℂ **SchedulerService** (`Class`) - - 📝 Provides a service to manage scheduled backup tasks. - - ƒ **SchedulerService.start** (`Function`) - - 📝 Starts the background scheduler and loads initial schedules. - - ƒ **SchedulerService.stop** (`Function`) - - 📝 Stops the background scheduler. - - ƒ **SchedulerService.load_schedules** (`Function`) - - 📝 Loads backup schedules from configuration and registers them. - - ƒ **SchedulerService.add_backup_job** (`Function`) - - 📝 Adds a scheduled backup job for an environment. - - ƒ **SchedulerService._trigger_backup** (`Function`) - - 📝 Triggered by the scheduler to start a backup task. + - ℂ **BeliefFormatter** (`Class`) + - 📝 Custom logging formatter that adds belief state prefixes to log messages. + - ℂ **LogEntry** (`Class`) + - 📝 A Pydantic model representing a single, structured log entry. This is a re-definition for consistency, as it's also defined in task_manager.py. + - ƒ **BeliefScope** (`Function`) + - 📝 Context manager for structured Belief State logging. + - ƒ **ConfigureLogger** (`Function`) + - 📝 Configures the logger with the provided logging settings. + - ℂ **WebSocketLogHandler** (`Class`) + - 📝 A custom logging handler that captures log records into a buffer. It is designed to be extended for real-time log streaming over WebSockets. + - 📦 **Logger** (`Global`) + - 📝 The global logger instance for the application, configured with both a console handler and the custom WebSocket handler. - ℂ **PluginLoader** (`Class`) - 📝 Scans a specified directory for Python modules, dynamically loads them, and registers any classes that are valid implementations of the PluginBase interface. - 🏗️ Layer: Core @@ -809,6 +755,16 @@ - 📝 Returns a list of all registered plugin configurations. - ƒ **PluginLoader.has_plugin** (`Function`) - 📝 Checks if a plugin with the given ID is registered. +- 📦 **backend.src.core.migration_engine** (`Module`) + - 📝 Handles the interception and transformation of Superset asset ZIP archives. + - 🏗️ Layer: Core + - 🔗 DEPENDS_ON -> `PyYAML` + - ℂ **MigrationEngine** (`Class`) + - 📝 Engine for transforming Superset export ZIPs. + - ƒ **MigrationEngine.transform_zip** (`Function`) + - 📝 Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages. + - ƒ **MigrationEngine._transform_yaml** (`Function`) + - 📝 Replaces database_uuid in a single YAML file. - ℂ **PluginBase** (`Class`) - 📝 Defines the abstract base class that all plugins must implement to be recognized by the system. It enforces a common structure for plugin metadata and execution. - 🏗️ Layer: Core @@ -821,6 +777,19 @@ - 🔗 DEPENDS_ON -> `rapidfuzz` - ƒ **suggest_mappings** (`Function`) - 📝 Suggests mappings between source and target databases using fuzzy matching. +- 📦 **TaskPersistenceModule** (`Module`) + - 📝 Handles the persistence of tasks using SQLAlchemy and the tasks.db database. + - 🏗️ Layer: Core + - ℂ **TaskPersistenceService** (`Class`) + - 📝 Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. + - ƒ **TaskPersistenceService.persist_task** (`Function`) + - 📝 Persists or updates a single task in the database. + - ƒ **TaskPersistenceService.persist_tasks** (`Function`) + - 📝 Persists multiple tasks. + - ƒ **TaskPersistenceService.load_tasks** (`Function`) + - 📝 Loads tasks from the database. + - ƒ **TaskPersistenceService.delete_tasks** (`Function`) + - 📝 Deletes specific tasks from the database. - 📦 **TaskManagerModule** (`Module`) - 📝 Manages the lifecycle of tasks, including their creation, execution, and state tracking. It uses a thread pool to run plugins asynchronously. - 🏗️ Layer: Core @@ -860,16 +829,6 @@ - 📝 Resume a task that is awaiting input with provided passwords. - ƒ **TaskManager.clear_tasks** (`Function`) - 📝 Clears tasks based on status filter. -- 📦 **TaskManagerPackage** (`Module`) - - 📝 Exports the public API of the task manager package. - - 🏗️ Layer: Core -- 📦 **TaskCleanupModule** (`Module`) - - 📝 Implements task cleanup and retention policies. - - 🏗️ Layer: Core - - ℂ **TaskCleanupService** (`Class`) - - 📝 Provides methods to clean up old task records. - - ƒ **TaskCleanupService.run_cleanup** (`Function`) - - 📝 Deletes tasks older than the configured retention period. - 📦 **TaskManagerModels** (`Module`) - 📝 Defines the data models and enumerations used by the Task Manager. - 🏗️ Layer: Core @@ -881,38 +840,73 @@ - 📝 A Pydantic model representing a single execution instance of a plugin, including its status, parameters, and logs. - ƒ **Task.__init__** (`Function`) - 📝 Initializes the Task model and validates input_request for AWAITING_INPUT status. -- 📦 **TaskPersistenceModule** (`Module`) - - 📝 Handles the persistence of tasks using SQLAlchemy and the tasks.db database. +- 📦 **TaskCleanupModule** (`Module`) + - 📝 Implements task cleanup and retention policies. + - 🏗️ Layer: Core + - ℂ **TaskCleanupService** (`Class`) + - 📝 Provides methods to clean up old task records. + - ƒ **TaskCleanupService.run_cleanup** (`Function`) + - 📝 Deletes tasks older than the configured retention period. +- 📦 **TaskManagerPackage** (`Module`) + - 📝 Exports the public API of the task manager package. - 🏗️ Layer: Core - - ℂ **TaskPersistenceService** (`Class`) - - 📝 Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. - - ƒ **TaskPersistenceService.persist_task** (`Function`) - - 📝 Persists or updates a single task in the database. - - ƒ **TaskPersistenceService.persist_tasks** (`Function`) - - 📝 Persists multiple tasks. - - ƒ **TaskPersistenceService.load_tasks** (`Function`) - - 📝 Loads tasks from the database. - - ƒ **TaskPersistenceService.delete_tasks** (`Function`) - - 📝 Deletes specific tasks from the database. -- 📦 **BackupPlugin** (`Module`) - - 📝 A plugin that provides functionality to back up Superset dashboards. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - ℂ **BackupPlugin** (`Class`) - - 📝 Implementation of the backup plugin logic. -- 📦 **MigrationPlugin** (`Module`) - - 📝 A plugin that provides functionality to migrate Superset dashboards between environments. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - ℂ **MigrationPlugin** (`Class`) - - 📝 Implementation of the migration plugin logic. - - 📦 **MigrationPlugin.execute** (`Action`) - - 📝 Execute the migration logic with proper task logging. - 📦 **AuthModule** (`Module`) - 📝 Implements ADFS authentication using Authlib for FastAPI. It provides a dependency to protect endpoints. - 🏗️ Layer: UI (API) +- 📦 **ConnectionsRouter** (`Module`) + - 📝 Defines the FastAPI router for managing external database connections. + - 🏗️ Layer: UI (API) + - ℂ **ConnectionSchema** (`Class`) + - 📝 Pydantic model for connection response. + - ℂ **ConnectionCreate** (`Class`) + - 📝 Pydantic model for creating a connection. + - ƒ **list_connections** (`Function`) + - 📝 Lists all saved connections. + - ƒ **create_connection** (`Function`) + - 📝 Creates a new connection configuration. + - ƒ **delete_connection** (`Function`) + - 📝 Deletes a connection configuration. +- 📦 **backend.src.api.routes.environments** (`Module`) + - 📝 API endpoints for listing environments and their databases. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.dependencies` + - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` + - 📦 **ScheduleSchema** (`DataClass`) + - 📦 **EnvironmentResponse** (`DataClass`) + - 📦 **DatabaseResponse** (`DataClass`) + - ƒ **get_environments** (`Function`) + - 📝 List all configured environments. + - ƒ **update_environment_schedule** (`Function`) + - 📝 Update backup schedule for an environment. + - ƒ **get_environment_databases** (`Function`) + - 📝 Fetch the list of databases from a specific environment. +- 📦 **backend.src.api.routes.migration** (`Module`) + - 📝 API endpoints for migration operations. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.dependencies` + - 🔗 DEPENDS_ON -> `backend.src.models.dashboard` + - ƒ **get_dashboards** (`Function`) + - 📝 Fetch all dashboards from the specified environment for the grid. + - ƒ **execute_migration** (`Function`) + - 📝 Execute the migration of selected dashboards. +- 📦 **PluginsRouter** (`Module`) + - 📝 Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins. + - 🏗️ Layer: UI (API) +- 📦 **backend.src.api.routes.mappings** (`Module`) + - 📝 API endpoints for managing database mappings and getting suggestions. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.dependencies` + - 🔗 DEPENDS_ON -> `backend.src.core.database` + - 🔗 DEPENDS_ON -> `backend.src.services.mapping_service` + - 📦 **MappingCreate** (`DataClass`) + - 📦 **MappingResponse** (`DataClass`) + - 📦 **SuggestRequest** (`DataClass`) + - ƒ **get_mappings** (`Function`) + - 📝 List all saved database mappings. + - ƒ **create_mapping** (`Function`) + - 📝 Create or update a database mapping. + - ƒ **suggest_mappings_api** (`Function`) + - 📝 Get suggested mappings based on fuzzy matching. - 📦 **SettingsRouter** (`Module`) - 📝 Provides API endpoints for managing application settings and Superset environments. - 🏗️ Layer: UI (API) @@ -937,44 +931,96 @@ - 📦 **TasksRouter** (`Module`) - 📝 Defines the FastAPI router for task-related endpoints, allowing clients to create, list, and get the status of tasks. - 🏗️ Layer: UI (API) -- 📦 **backend.src.api.routes.environments** (`Module`) - - 📝 API endpoints for listing environments and their databases. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.dependencies` +- 📦 **backend.src.models.task** (`Module`) + - 📝 Defines the database schema for task execution records. + - 🏗️ Layer: Domain + - 🔗 DEPENDS_ON -> `sqlalchemy` + - ℂ **TaskRecord** (`Class`) + - 📝 Represents a persistent record of a task execution. +- 📦 **backend.src.models.connection** (`Module`) + - 📝 Defines the database schema for external database connection configurations. + - 🏗️ Layer: Domain + - 🔗 DEPENDS_ON -> `sqlalchemy` + - ℂ **ConnectionConfig** (`Class`) + - 📝 Stores credentials for external databases used for column mapping. +- 📦 **backend.src.models.mapping** (`Module`) + - 📝 Defines the database schema for environment metadata and database mappings using SQLAlchemy. + - 🏗️ Layer: Domain + - 🔗 DEPENDS_ON -> `sqlalchemy` + - ℂ **MigrationStatus** (`Class`) + - 📝 Enumeration of possible migration job statuses. + - ℂ **Environment** (`Class`) + - 📝 Represents a Superset instance environment. + - ℂ **DatabaseMapping** (`Class`) + - 📝 Represents a mapping between source and target databases. + - ℂ **MigrationJob** (`Class`) + - 📝 Represents a single migration execution job. +- 📦 **backend.src.models.dashboard** (`Module`) + - 📝 Defines data models for dashboard metadata and selection. + - 🏗️ Layer: Model + - ℂ **DashboardMetadata** (`Class`) + - 📝 Represents a dashboard available for migration. + - ℂ **DashboardSelection** (`Class`) + - 📝 Represents the user's selection of dashboards to migrate. +- 📦 **backend.src.services.mapping_service** (`Module`) + - 📝 Orchestrates database fetching and fuzzy matching suggestions. + - 🏗️ Layer: Service - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` - - 📦 **ScheduleSchema** (`DataClass`) - - 📦 **EnvironmentResponse** (`DataClass`) - - 📦 **DatabaseResponse** (`DataClass`) - - ƒ **get_environments** (`Function`) - - 📝 List all configured environments. - - ƒ **update_environment_schedule** (`Function`) - - 📝 Update backup schedule for an environment. - - ƒ **get_environment_databases** (`Function`) - - 📝 Fetch the list of databases from a specific environment. -- 📦 **PluginsRouter** (`Module`) - - 📝 Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins. - - 🏗️ Layer: UI (API) -- 📦 **backend.src.api.routes.migration** (`Module`) - - 📝 API endpoints for migration operations. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.dependencies` - - 🔗 DEPENDS_ON -> `backend.src.models.dashboard` - - ƒ **get_dashboards** (`Function`) - - 📝 Fetch all dashboards from the specified environment for the grid. - - ƒ **execute_migration** (`Function`) - - 📝 Execute the migration of selected dashboards. -- 📦 **backend.src.api.routes.mappings** (`Module`) - - 📝 API endpoints for managing database mappings and getting suggestions. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.dependencies` - - 🔗 DEPENDS_ON -> `backend.src.core.database` - - 🔗 DEPENDS_ON -> `backend.src.services.mapping_service` - - 📦 **MappingCreate** (`DataClass`) - - 📦 **MappingResponse** (`DataClass`) - - 📦 **SuggestRequest** (`DataClass`) - - ƒ **get_mappings** (`Function`) - - 📝 List all saved database mappings. - - ƒ **create_mapping** (`Function`) - - 📝 Create or update a database mapping. - - ƒ **suggest_mappings_api** (`Function`) - - 📝 Get suggested mappings based on fuzzy matching. + - 🔗 DEPENDS_ON -> `backend.src.core.utils.matching` + - ℂ **MappingService** (`Class`) + - 📝 Service for handling database mapping logic. + - ƒ **MappingService.__init__** (`Function`) + - 📝 Initializes the mapping service with a config manager. + - ƒ **MappingService._get_client** (`Function`) + - 📝 Helper to get an initialized SupersetClient for an environment. + - ƒ **MappingService.get_suggestions** (`Function`) + - 📝 Fetches databases from both environments and returns fuzzy matching suggestions. +- 📦 **BackupPlugin** (`Module`) + - 📝 A plugin that provides functionality to back up Superset dashboards. + - 🏗️ Layer: App + - 🔗 DEPENDS_ON -> `superset_tool.client` + - 🔗 DEPENDS_ON -> `superset_tool.utils` + - ℂ **BackupPlugin** (`Class`) + - 📝 Implementation of the backup plugin logic. +- 📦 **DebugPluginModule** (`Module`) + - 📝 Implements a plugin for system diagnostics and debugging Superset API responses. + - 🏗️ Layer: Plugins + - ℂ **DebugPlugin** (`Class`) + - 📝 Plugin for system diagnostics and debugging. + - ƒ **DebugPlugin.get_schema** (`Function`) + - 📝 Returns the JSON schema for the debug plugin parameters. + - ƒ **DebugPlugin.execute** (`Function`) + - 📝 Executes the debug logic. + - ƒ **DebugPlugin._test_db_api** (`Function`) + - 📝 Tests database API connectivity for source and target environments. + - ƒ **DebugPlugin._get_dataset_structure** (`Function`) + - 📝 Retrieves the structure of a dataset. +- 📦 **SearchPluginModule** (`Module`) + - 📝 Implements a plugin for searching text patterns across all datasets in a specific Superset environment. + - 🏗️ Layer: Plugins + - ℂ **SearchPlugin** (`Class`) + - 📝 Plugin for searching text patterns in Superset datasets. + - ƒ **SearchPlugin.get_schema** (`Function`) + - 📝 Returns the JSON schema for the search plugin parameters. + - ƒ **SearchPlugin.execute** (`Function`) + - 📝 Executes the dataset search logic. + - ƒ **SearchPlugin._get_context** (`Function`) + - 📝 Extracts a small context around the match for display. +- 📦 **MapperPluginModule** (`Module`) + - 📝 Implements a plugin for mapping dataset columns using external database connections or Excel files. + - 🏗️ Layer: Plugins + - ℂ **MapperPlugin** (`Class`) + - 📝 Plugin for mapping dataset columns verbose names. + - ƒ **MapperPlugin.get_schema** (`Function`) + - 📝 Returns the JSON schema for the mapper plugin parameters. + - ƒ **MapperPlugin.execute** (`Function`) + - 📝 Executes the dataset mapping logic. +- 📦 **MigrationPlugin** (`Module`) + - 📝 A plugin that provides functionality to migrate Superset dashboards between environments. + - 🏗️ Layer: App + - 🔗 DEPENDS_ON -> `superset_tool.client` + - 🔗 DEPENDS_ON -> `superset_tool.utils` + - ℂ **MigrationPlugin** (`Class`) + - 📝 Implementation of the migration plugin logic. + - 📦 **MigrationPlugin.execute** (`Action`) + - 📝 Execute the migration logic with proper task logging.