2.0 KiB
2.0 KiB
Research: 012-remove-superset-tool
Unknowns & Clarifications
1. Merging SupersetConfig into Environment
- Decision: Fields from
SupersetConfig(auth, verify_ssl, timeout) will be merged into theEnvironmentmodel inbackend/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 intobackend/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, andwhiptail_fallback.pywill 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
SupersetLoggerandbelief_scopefromsuperset_tooland usebackend/src/core/logger.py. - Rationale: Ensures consistent logging across the entire backend application.
Dependency Analysis
backend/requirements.txtalready containsrequests,PyYAML,pydantic.superset_tool/requirements.txtis empty, indicating it likely relied on the same environment or was partially integrated.- Action: Ensure all
superset_toolimports are replaced with backend-local equivalents.
Integration Patterns
backend/src/core/superset_client.pycurrently inherits fromsuperset_tool.client.SupersetClient.- Action: Move all methods from
superset_tool/client.pyintobackend/src/core/superset_client.pyand remove the inheritance. RefactorAPIClient(fromsuperset_tool/utils/network.py) to be a utility or private helper within the backend.