semantic checker script update
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
- 🏗️ Layer: DevOps/Tooling
|
||||
- ℂ **SemanticEntity** (`Class`)
|
||||
- 📝 Represents a code entity (Module, Function, Component) found during parsing.
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes a new SemanticEntity instance.
|
||||
- ƒ **to_dict** (`Function`)
|
||||
- 📝 Serializes the entity to a dictionary for JSON output.
|
||||
- ƒ **validate** (`Function`)
|
||||
- 📝 Checks for semantic compliance (closure, mandatory tags).
|
||||
- 📝 Checks for semantic compliance (closure, mandatory tags, belief state).
|
||||
- ƒ **get_score** (`Function`)
|
||||
- 📝 Calculates a compliance score (0.0 to 1.0).
|
||||
- ƒ **get_patterns** (`Function`)
|
||||
@@ -19,6 +21,12 @@
|
||||
- 📝 Parses a single file to extract semantic entities.
|
||||
- ℂ **SemanticMapGenerator** (`Class`)
|
||||
- 📝 Orchestrates the mapping process.
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes the generator with a root directory.
|
||||
- ƒ **_load_gitignore** (`Function`)
|
||||
- 📝 Loads patterns from .gitignore file.
|
||||
- ƒ **_is_ignored** (`Function`)
|
||||
- 📝 Checks if a path should be ignored based on .gitignore or hardcoded defaults.
|
||||
- ƒ **run** (`Function`)
|
||||
- 📝 Main execution flow.
|
||||
- 🔗 CALLS -> `_walk_and_parse`
|
||||
@@ -44,41 +52,41 @@
|
||||
- 🔗 DEPENDS_ON -> `superset_tool.utils`
|
||||
- ℂ **Migration** (`Class`)
|
||||
- 📝 Инкапсулирует логику интерактивной миграции дашбордов с возможностью «удалить‑и‑перезаписать» при ошибке импорта.
|
||||
- ƒ **Migration.__init__** (`Function`)
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Инициализирует сервис миграции, настраивает логгер и начальные состояния.
|
||||
- ƒ **Migration.run** (`Function`)
|
||||
- ƒ **run** (`Function`)
|
||||
- 📝 Точка входа – последовательный запуск всех шагов миграции.
|
||||
- 🔗 CALLS -> `self.ask_delete_on_failure`
|
||||
- 🔗 CALLS -> `self.select_environments`
|
||||
- 🔗 CALLS -> `self.select_dashboards`
|
||||
- 🔗 CALLS -> `self.confirm_db_config_replacement`
|
||||
- 🔗 CALLS -> `self.execute_migration`
|
||||
- ƒ **Migration.ask_delete_on_failure** (`Function`)
|
||||
- ƒ **ask_delete_on_failure** (`Function`)
|
||||
- 📝 Запрашивает у пользователя, следует ли удалять дашборд при ошибке импорта.
|
||||
- 🔗 CALLS -> `yesno`
|
||||
- ƒ **Migration.select_environments** (`Function`)
|
||||
- ƒ **select_environments** (`Function`)
|
||||
- 📝 Позволяет пользователю выбрать исходное и целевое окружения Superset.
|
||||
- 🔗 CALLS -> `setup_clients`
|
||||
- 🔗 CALLS -> `menu`
|
||||
- ƒ **Migration.select_dashboards** (`Function`)
|
||||
- ƒ **select_dashboards** (`Function`)
|
||||
- 📝 Позволяет пользователю выбрать набор дашбордов для миграции.
|
||||
- 🔗 CALLS -> `self.from_c.get_dashboards`
|
||||
- 🔗 CALLS -> `checklist`
|
||||
- ƒ **Migration.confirm_db_config_replacement** (`Function`)
|
||||
- ƒ **confirm_db_config_replacement** (`Function`)
|
||||
- 📝 Запрашивает у пользователя, требуется ли заменить имена БД в YAML-файлах.
|
||||
- 🔗 CALLS -> `yesno`
|
||||
- 🔗 CALLS -> `self._select_databases`
|
||||
- ƒ **Migration._select_databases** (`Function`)
|
||||
- ƒ **_select_databases** (`Function`)
|
||||
- 📝 Позволяет пользователю выбрать исходную и целевую БД через API.
|
||||
- 🔗 CALLS -> `self.from_c.get_databases`
|
||||
- 🔗 CALLS -> `self.to_c.get_databases`
|
||||
- 🔗 CALLS -> `self.from_c.get_database`
|
||||
- 🔗 CALLS -> `self.to_c.get_database`
|
||||
- 🔗 CALLS -> `menu`
|
||||
- ƒ **Migration._batch_delete_by_ids** (`Function`)
|
||||
- ƒ **_batch_delete_by_ids** (`Function`)
|
||||
- 📝 Удаляет набор дашбордов по их ID единым запросом.
|
||||
- 🔗 CALLS -> `self.to_c.network.request`
|
||||
- ƒ **Migration.execute_migration** (`Function`)
|
||||
- ƒ **execute_migration** (`Function`)
|
||||
- 📝 Выполняет экспорт-импорт дашбордов, обрабатывает ошибки и, при необходимости, выполняет процедуру восстановления.
|
||||
- 🔗 CALLS -> `self.from_c.export_dashboard`
|
||||
- 🔗 CALLS -> `create_temp_file`
|
||||
@@ -92,39 +100,48 @@
|
||||
- ℂ **SupersetToolError** (`Class`)
|
||||
- 📝 Базовый класс для всех ошибок, генерируемых инструментом.
|
||||
- 🔗 INHERITS_FROM -> `Exception`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes the base tool error.
|
||||
- ℂ **AuthenticationError** (`Class`)
|
||||
- 📝 Ошибки, связанные с аутентификацией или авторизацией.
|
||||
- 🔗 INHERITS_FROM -> `SupersetToolError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes an authentication error.
|
||||
- ℂ **PermissionDeniedError** (`Class`)
|
||||
- 📝 Ошибка, возникающая при отказе в доступе к ресурсу.
|
||||
- 🔗 INHERITS_FROM -> `AuthenticationError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes a permission denied error.
|
||||
- ℂ **SupersetAPIError** (`Class`)
|
||||
- 📝 Общие ошибки при взаимодействии с Superset API.
|
||||
- 🔗 INHERITS_FROM -> `SupersetToolError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes a Superset API error.
|
||||
- ℂ **ExportError** (`Class`)
|
||||
- 📝 Ошибки, специфичные для операций экспорта.
|
||||
- 🔗 INHERITS_FROM -> `SupersetAPIError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes an export error.
|
||||
- ℂ **DashboardNotFoundError** (`Class`)
|
||||
- 📝 Ошибка, когда запрошенный дашборд или ресурс не найден (404).
|
||||
- 🔗 INHERITS_FROM -> `SupersetAPIError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes a dashboard not found error.
|
||||
- ℂ **DatasetNotFoundError** (`Class`)
|
||||
- 📝 Ошибка, когда запрашиваемый набор данных не существует (404).
|
||||
- 🔗 INHERITS_FROM -> `SupersetAPIError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes a dataset not found error.
|
||||
- ℂ **InvalidZipFormatError** (`Class`)
|
||||
- 📝 Ошибка, указывающая на некорректный формат или содержимое ZIP-архива.
|
||||
- 🔗 INHERITS_FROM -> `SupersetToolError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes an invalid ZIP format error.
|
||||
- ℂ **NetworkError** (`Class`)
|
||||
- 📝 Ошибки, связанные с сетевым соединением.
|
||||
- 🔗 INHERITS_FROM -> `SupersetToolError`
|
||||
- ℂ **FileOperationError** (`Class`)
|
||||
- 📝 Общие ошибки файловых операций (I/O).
|
||||
- 🔗 INHERITS_FROM -> `SupersetToolError`
|
||||
- ℂ **InvalidFileStructureError** (`Class`)
|
||||
- 📝 Ошибка, указывающая на некорректную структуру файлов или директорий.
|
||||
- 🔗 INHERITS_FROM -> `FileOperationError`
|
||||
- ℂ **ConfigurationError** (`Class`)
|
||||
- 📝 Ошибки, связанные с неверной конфигурацией инструмента.
|
||||
- 🔗 INHERITS_FROM -> `SupersetToolError`
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes a network error.
|
||||
- 📦 **superset_tool.models** (`Module`)
|
||||
- 📝 Определяет Pydantic-модели для конфигурации инструмента, обеспечивая валидацию данных.
|
||||
- 🏗️ Layer: Infra
|
||||
@@ -133,14 +150,14 @@
|
||||
- ℂ **SupersetConfig** (`Class`)
|
||||
- 📝 Модель конфигурации для подключения к одному экземпляру Superset API.
|
||||
- 🔗 INHERITS_FROM -> `pydantic.BaseModel`
|
||||
- ƒ **SupersetConfig.validate_auth** (`Function`)
|
||||
- ƒ **validate_auth** (`Function`)
|
||||
- 📝 Проверяет, что словарь `auth` содержит все необходимые для аутентификации поля.
|
||||
- ƒ **SupersetConfig.normalize_base_url** (`Function`)
|
||||
- ƒ **normalize_base_url** (`Function`)
|
||||
- 📝 Нормализует `base_url`, добавляя `/api/v1`, если он отсутствует.
|
||||
- ℂ **DatabaseConfig** (`Class`)
|
||||
- 📝 Модель для параметров трансформации баз данных при миграции дашбордов.
|
||||
- 🔗 INHERITS_FROM -> `pydantic.BaseModel`
|
||||
- ƒ **DatabaseConfig.validate_config** (`Function`)
|
||||
- ƒ **validate_config** (`Function`)
|
||||
- 📝 Проверяет, что словарь `database_config` содержит ключи 'old' и 'new'.
|
||||
- 📦 **superset_tool.client** (`Module`)
|
||||
- 📝 Предоставляет высокоуровневый клиент для взаимодействия с Superset REST API, инкапсулируя логику запросов, обработку ошибок и пагинацию.
|
||||
@@ -150,62 +167,62 @@
|
||||
- 🔗 DEPENDS_ON -> `superset_tool.utils`
|
||||
- ℂ **SupersetClient** (`Class`)
|
||||
- 📝 Класс-обёртка над Superset REST API, предоставляющий методы для работы с дашбордами и датасетами.
|
||||
- ƒ **SupersetClient.__init__** (`Function`)
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Инициализирует клиент, проверяет конфигурацию и создает сетевой клиент.
|
||||
- ƒ **SupersetClient._validate_config** (`Function`)
|
||||
- ƒ **_validate_config** (`Function`)
|
||||
- 📝 Проверяет, что переданный объект конфигурации имеет корректный тип.
|
||||
- ƒ **SupersetClient.headers** (`Function`)
|
||||
- ƒ **headers** (`Function`)
|
||||
- 📝 Возвращает базовые HTTP-заголовки, используемые сетевым клиентом.
|
||||
- ƒ **SupersetClient.get_dashboards** (`Function`)
|
||||
- ƒ **get_dashboards** (`Function`)
|
||||
- 📝 Получает полный список дашбордов, автоматически обрабатывая пагинацию.
|
||||
- 🔗 CALLS -> `self._fetch_total_object_count`
|
||||
- 🔗 CALLS -> `self._fetch_all_pages`
|
||||
- ƒ **SupersetClient.export_dashboard** (`Function`)
|
||||
- ƒ **export_dashboard** (`Function`)
|
||||
- 📝 Экспортирует дашборд в виде ZIP-архива.
|
||||
- 🔗 CALLS -> `self.network.request`
|
||||
- ƒ **SupersetClient.import_dashboard** (`Function`)
|
||||
- ƒ **import_dashboard** (`Function`)
|
||||
- 📝 Импортирует дашборд из ZIP-файла с возможностью автоматического удаления и повторной попытки при ошибке.
|
||||
- 🔗 CALLS -> `self._do_import`
|
||||
- 🔗 CALLS -> `self.delete_dashboard`
|
||||
- 🔗 CALLS -> `self.get_dashboards`
|
||||
- ƒ **SupersetClient._resolve_target_id_for_delete** (`Function`)
|
||||
- ƒ **_resolve_target_id_for_delete** (`Function`)
|
||||
- 📝 Определяет ID дашборда для удаления, используя ID или slug.
|
||||
- ƒ **SupersetClient._do_import** (`Function`)
|
||||
- ƒ **_do_import** (`Function`)
|
||||
- 📝 Выполняет один запрос на импорт без обработки исключений.
|
||||
- ƒ **SupersetClient.delete_dashboard** (`Function`)
|
||||
- ƒ **delete_dashboard** (`Function`)
|
||||
- 📝 Удаляет дашборд по его ID или slug.
|
||||
- 🔗 CALLS -> `self.network.request`
|
||||
- ƒ **SupersetClient._extract_dashboard_id_from_zip** (`Function`)
|
||||
- ƒ **_extract_dashboard_id_from_zip** (`Function`)
|
||||
- 📝 Извлекает ID дашборда из `metadata.yaml` внутри ZIP-архива.
|
||||
- ƒ **SupersetClient._extract_dashboard_slug_from_zip** (`Function`)
|
||||
- ƒ **_extract_dashboard_slug_from_zip** (`Function`)
|
||||
- 📝 Извлекает slug дашборда из `metadata.yaml` внутри ZIP-архива.
|
||||
- ƒ **SupersetClient._validate_export_response** (`Function`)
|
||||
- ƒ **_validate_export_response** (`Function`)
|
||||
- 📝 Проверяет, что HTTP-ответ на экспорт является валидным ZIP-архивом.
|
||||
- ƒ **SupersetClient._resolve_export_filename** (`Function`)
|
||||
- ƒ **_resolve_export_filename** (`Function`)
|
||||
- 📝 Определяет имя файла для экспорта из заголовков или генерирует его.
|
||||
- ƒ **SupersetClient._validate_query_params** (`Function`)
|
||||
- ƒ **_validate_query_params** (`Function`)
|
||||
- 📝 Формирует корректный набор параметров запроса с пагинацией.
|
||||
- ƒ **SupersetClient._fetch_total_object_count** (`Function`)
|
||||
- ƒ **_fetch_total_object_count** (`Function`)
|
||||
- 📝 Получает общее количество объектов по указанному эндпоинту для пагинации.
|
||||
- ƒ **SupersetClient._fetch_all_pages** (`Function`)
|
||||
- ƒ **_fetch_all_pages** (`Function`)
|
||||
- 📝 Итерируется по всем страницам пагинированного API и собирает все данные.
|
||||
- ƒ **SupersetClient._validate_import_file** (`Function`)
|
||||
- ƒ **_validate_import_file** (`Function`)
|
||||
- 📝 Проверяет, что файл существует, является ZIP-архивом и содержит `metadata.yaml`.
|
||||
- ƒ **SupersetClient.get_datasets** (`Function`)
|
||||
- ƒ **get_datasets** (`Function`)
|
||||
- 📝 Получает полный список датасетов, автоматически обрабатывая пагинацию.
|
||||
- 🔗 CALLS -> `self._fetch_total_object_count`
|
||||
- 🔗 CALLS -> `self._fetch_all_pages`
|
||||
- ƒ **SupersetClient.get_databases** (`Function`)
|
||||
- ƒ **get_databases** (`Function`)
|
||||
- 📝 Получает полный список баз данных, автоматически обрабатывая пагинацию.
|
||||
- 🔗 CALLS -> `self._fetch_total_object_count`
|
||||
- 🔗 CALLS -> `self._fetch_all_pages`
|
||||
- ƒ **SupersetClient.get_dataset** (`Function`)
|
||||
- ƒ **get_dataset** (`Function`)
|
||||
- 📝 Получает информацию о конкретном датасете по его ID.
|
||||
- 🔗 CALLS -> `self.network.request`
|
||||
- ƒ **SupersetClient.get_database** (`Function`)
|
||||
- ƒ **get_database** (`Function`)
|
||||
- 📝 Получает информацию о конкретной базе данных по её ID.
|
||||
- 🔗 CALLS -> `self.network.request`
|
||||
- ƒ **SupersetClient.update_dataset** (`Function`)
|
||||
- ƒ **update_dataset** (`Function`)
|
||||
- 📝 Обновляет данные датасета по его ID.
|
||||
- 🔗 CALLS -> `self.network.request`
|
||||
- 📦 **superset_tool** (`Module`)
|
||||
@@ -345,12 +362,6 @@
|
||||
- 📦 **superset_tool.utils** (`Module`)
|
||||
- 📝 Utility package for superset_tool.
|
||||
- 🏗️ Layer: Infra
|
||||
- ƒ **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
|
||||
@@ -782,52 +793,54 @@
|
||||
- 🏗️ Layer: Core
|
||||
- ℂ **TaskPersistenceService** (`Class`)
|
||||
- 📝 Provides methods to save and load tasks from the tasks.db database using SQLAlchemy.
|
||||
- ƒ **TaskPersistenceService.persist_task** (`Function`)
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes the persistence service.
|
||||
- ƒ **persist_task** (`Function`)
|
||||
- 📝 Persists or updates a single task in the database.
|
||||
- ƒ **TaskPersistenceService.persist_tasks** (`Function`)
|
||||
- ƒ **persist_tasks** (`Function`)
|
||||
- 📝 Persists multiple tasks.
|
||||
- ƒ **TaskPersistenceService.load_tasks** (`Function`)
|
||||
- ƒ **load_tasks** (`Function`)
|
||||
- 📝 Loads tasks from the database.
|
||||
- ƒ **TaskPersistenceService.delete_tasks** (`Function`)
|
||||
- ƒ **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
|
||||
- ℂ **TaskManager** (`Class`)
|
||||
- 📝 Manages the lifecycle of tasks, including their creation, execution, and state tracking.
|
||||
- ƒ **TaskManager.__init__** (`Function`)
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initialize the TaskManager with dependencies.
|
||||
- ƒ **TaskManager.create_task** (`Function`)
|
||||
- ƒ **create_task** (`Function`)
|
||||
- 📝 Creates and queues a new task for execution.
|
||||
- ƒ **TaskManager._run_task** (`Function`)
|
||||
- ƒ **_run_task** (`Function`)
|
||||
- 📝 Internal method to execute a task.
|
||||
- ƒ **TaskManager.resolve_task** (`Function`)
|
||||
- ƒ **resolve_task** (`Function`)
|
||||
- 📝 Resumes a task that is awaiting mapping.
|
||||
- ƒ **TaskManager.wait_for_resolution** (`Function`)
|
||||
- ƒ **wait_for_resolution** (`Function`)
|
||||
- 📝 Pauses execution and waits for a resolution signal.
|
||||
- ƒ **TaskManager.wait_for_input** (`Function`)
|
||||
- ƒ **wait_for_input** (`Function`)
|
||||
- 📝 Pauses execution and waits for user input.
|
||||
- ƒ **TaskManager.get_task** (`Function`)
|
||||
- ƒ **get_task** (`Function`)
|
||||
- 📝 Retrieves a task by its ID.
|
||||
- ƒ **TaskManager.get_all_tasks** (`Function`)
|
||||
- ƒ **get_all_tasks** (`Function`)
|
||||
- 📝 Retrieves all registered tasks.
|
||||
- ƒ **TaskManager.get_tasks** (`Function`)
|
||||
- ƒ **get_tasks** (`Function`)
|
||||
- 📝 Retrieves tasks with pagination and optional status filter.
|
||||
- ƒ **TaskManager.get_task_logs** (`Function`)
|
||||
- ƒ **get_task_logs** (`Function`)
|
||||
- 📝 Retrieves logs for a specific task.
|
||||
- ƒ **TaskManager._add_log** (`Function`)
|
||||
- ƒ **_add_log** (`Function`)
|
||||
- 📝 Adds a log entry to a task and notifies subscribers.
|
||||
- ƒ **TaskManager.subscribe_logs** (`Function`)
|
||||
- ƒ **subscribe_logs** (`Function`)
|
||||
- 📝 Subscribes to real-time logs for a task.
|
||||
- ƒ **TaskManager.unsubscribe_logs** (`Function`)
|
||||
- ƒ **unsubscribe_logs** (`Function`)
|
||||
- 📝 Unsubscribes from real-time logs for a task.
|
||||
- ƒ **TaskManager.load_persisted_tasks** (`Function`)
|
||||
- ƒ **load_persisted_tasks** (`Function`)
|
||||
- 📝 Load persisted tasks using persistence service.
|
||||
- ƒ **TaskManager.await_input** (`Function`)
|
||||
- ƒ **await_input** (`Function`)
|
||||
- 📝 Transition a task to AWAITING_INPUT state with input request.
|
||||
- ƒ **TaskManager.resume_task_with_password** (`Function`)
|
||||
- ƒ **resume_task_with_password** (`Function`)
|
||||
- 📝 Resume a task that is awaiting input with provided passwords.
|
||||
- ƒ **TaskManager.clear_tasks** (`Function`)
|
||||
- ƒ **clear_tasks** (`Function`)
|
||||
- 📝 Clears tasks based on status filter.
|
||||
- 📦 **TaskManagerModels** (`Module`)
|
||||
- 📝 Defines the data models and enumerations used by the Task Manager.
|
||||
@@ -838,14 +851,16 @@
|
||||
- 📝 A Pydantic model representing a single, structured log entry associated with a task.
|
||||
- ℂ **Task** (`Class`)
|
||||
- 📝 A Pydantic model representing a single execution instance of a plugin, including its status, parameters, and logs.
|
||||
- ƒ **Task.__init__** (`Function`)
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes the Task model and validates input_request for AWAITING_INPUT status.
|
||||
- 📦 **TaskCleanupModule** (`Module`)
|
||||
- 📝 Implements task cleanup and retention policies.
|
||||
- 🏗️ Layer: Core
|
||||
- ℂ **TaskCleanupService** (`Class`)
|
||||
- 📝 Provides methods to clean up old task records.
|
||||
- ƒ **TaskCleanupService.run_cleanup** (`Function`)
|
||||
- ƒ **__init__** (`Function`)
|
||||
- 📝 Initializes the cleanup service with dependencies.
|
||||
- ƒ **run_cleanup** (`Function`)
|
||||
- 📝 Deletes tasks older than the configured retention period.
|
||||
- 📦 **TaskManagerPackage** (`Module`)
|
||||
- 📝 Exports the public API of the task manager package.
|
||||
|
||||
Reference in New Issue
Block a user