# Research: 012-remove-superset-tool ## Unknowns & Clarifications ### 1. Merging `SupersetConfig` into `Environment` - **Decision**: Fields from `SupersetConfig` (auth, verify_ssl, timeout) will be merged into the `Environment` model in `backend/src/core/config_models.py`. - **Rationale**: Centralizes configuration and removes dependency on `superset_tool.models`. - **Alternatives considered**: Keeping them separate, but that defeats the purpose of the refactoring. ### 2. Utility Migration - **Decision**: `superset_tool/utils/` will be flattened into `backend/src/core/utils/`. - **Rationale**: Simplifies the directory structure and aligns with the backend's existing utility pattern. - **Alternatives considered**: Creating a `backend/src/core/utils/superset/` subdirectory, but flattening is preferred for simplicity. ### 3. CLI Deprecation - **Decision**: `migration_script.py`, `run_mapper.py`, and `whiptail_fallback.py` will be deprecated and not migrated. - **Rationale**: The web UI now handles these operations, and maintaining interactive CLI logic in the backend is out of scope. ### 4. Logging Consolidation - **Decision**: Remove `SupersetLogger` and `belief_scope` from `superset_tool` and use `backend/src/core/logger.py`. - **Rationale**: Ensures consistent logging across the entire backend application. ## Dependency Analysis - `backend/requirements.txt` already contains `requests`, `PyYAML`, `pydantic`. - `superset_tool/requirements.txt` is empty, indicating it likely relied on the same environment or was partially integrated. - **Action**: Ensure all `superset_tool` imports are replaced with backend-local equivalents. ## Integration Patterns - `backend/src/core/superset_client.py` currently inherits from `superset_tool.client.SupersetClient`. - **Action**: Move all methods from `superset_tool/client.py` into `backend/src/core/superset_client.py` and remove the inheritance. Refactor `APIClient` (from `superset_tool/utils/network.py`) to be a utility or private helper within the backend.