diff --git a/backend/src/core/task_manager/cleanup.py b/backend/src/core/task_manager/cleanup.py index f4c146c..fc97482 100644 --- a/backend/src/core/task_manager/cleanup.py +++ b/backend/src/core/task_manager/cleanup.py @@ -12,12 +12,19 @@ from ..config_manager import ConfigManager # [DEF:TaskCleanupService:Class] # @PURPOSE: Provides methods to clean up old task records. class TaskCleanupService: + # [DEF:__init__:Function] + # @PURPOSE: Initializes the cleanup service with dependencies. + # @PRE: persistence_service and config_manager are valid. + # @POST: Cleanup service is ready. def __init__(self, persistence_service: TaskPersistenceService, config_manager: ConfigManager): self.persistence_service = persistence_service self.config_manager = config_manager + # [/DEF:__init__:Function] - # [DEF:TaskCleanupService.run_cleanup:Function] + # [DEF:run_cleanup:Function] # @PURPOSE: Deletes tasks older than the configured retention period. + # @PRE: Config manager has valid settings. + # @POST: Old tasks are deleted from persistence. def run_cleanup(self): with belief_scope("TaskCleanupService.run_cleanup"): settings = self.config_manager.get_config().settings @@ -34,7 +41,7 @@ class TaskCleanupService: to_delete = [t.id for t in tasks[settings.task_retention_limit:]] self.persistence_service.delete_tasks(to_delete) logger.info(f"Deleted {len(to_delete)} tasks exceeding limit of {settings.task_retention_limit}") - # [/DEF:TaskCleanupService.run_cleanup:Function] + # [/DEF:run_cleanup:Function] # [/DEF:TaskCleanupService:Class] # [/DEF:TaskCleanupModule:Module] \ No newline at end of file diff --git a/backend/src/core/task_manager/manager.py b/backend/src/core/task_manager/manager.py index 9526892..c66db5c 100644 --- a/backend/src/core/task_manager/manager.py +++ b/backend/src/core/task_manager/manager.py @@ -25,7 +25,7 @@ class TaskManager: Manages the lifecycle of tasks, including their creation, execution, and state tracking. """ - # [DEF:TaskManager.__init__:Function] + # [DEF:__init__:Function] # @PURPOSE: Initialize the TaskManager with dependencies. # @PRE: plugin_loader is initialized. # @POST: TaskManager is ready to accept tasks. @@ -46,9 +46,9 @@ class TaskManager: # Load persisted tasks on startup self.load_persisted_tasks() - # [/DEF:TaskManager.__init__:Function] + # [/DEF:__init__:Function] - # [DEF:TaskManager.create_task:Function] + # [DEF:create_task:Function] # @PURPOSE: Creates and queues a new task for execution. # @PRE: Plugin with plugin_id exists. Params are valid. # @POST: Task is created, added to registry, and scheduled for execution. @@ -75,9 +75,9 @@ class TaskManager: logger.info(f"Task {task.id} created and scheduled for execution") self.loop.create_task(self._run_task(task.id)) # Schedule task for execution return task - # [/DEF:TaskManager.create_task:Function] + # [/DEF:create_task:Function] - # [DEF:TaskManager._run_task:Function] + # [DEF:_run_task:Function] # @PURPOSE: Internal method to execute a task. # @PRE: Task exists in registry. # @POST: Task is executed, status updated to SUCCESS or FAILED. @@ -117,9 +117,9 @@ class TaskManager: task.finished_at = datetime.utcnow() self.persistence_service.persist_task(task) logger.info(f"Task {task_id} execution finished with status: {task.status}") - # [/DEF:TaskManager._run_task:Function] + # [/DEF:_run_task:Function] - # [DEF:TaskManager.resolve_task:Function] + # [DEF:resolve_task:Function] # @PURPOSE: Resumes a task that is awaiting mapping. # @PRE: Task exists and is in AWAITING_MAPPING state. # @POST: Task status updated to RUNNING, params updated, execution resumed. @@ -141,9 +141,9 @@ class TaskManager: # Signal the future to continue if task_id in self.task_futures: self.task_futures[task_id].set_result(True) - # [/DEF:TaskManager.resolve_task:Function] + # [/DEF:resolve_task:Function] - # [DEF:TaskManager.wait_for_resolution:Function] + # [DEF:wait_for_resolution:Function] # @PURPOSE: Pauses execution and waits for a resolution signal. # @PRE: Task exists. # @POST: Execution pauses until future is set. @@ -162,9 +162,9 @@ class TaskManager: finally: if task_id in self.task_futures: del self.task_futures[task_id] - # [/DEF:TaskManager.wait_for_resolution:Function] + # [/DEF:wait_for_resolution:Function] - # [DEF:TaskManager.wait_for_input:Function] + # [DEF:wait_for_input:Function] # @PURPOSE: Pauses execution and waits for user input. # @PRE: Task exists. # @POST: Execution pauses until future is set via resume_task_with_password. @@ -182,24 +182,24 @@ class TaskManager: finally: if task_id in self.task_futures: del self.task_futures[task_id] - # [/DEF:TaskManager.wait_for_input:Function] + # [/DEF:wait_for_input:Function] - # [DEF:TaskManager.get_task:Function] + # [DEF:get_task:Function] # @PURPOSE: Retrieves a task by its ID. # @PARAM: task_id (str) - ID of the task. # @RETURN: Optional[Task] - The task or None. def get_task(self, task_id: str) -> Optional[Task]: return self.tasks.get(task_id) - # [/DEF:TaskManager.get_task:Function] + # [/DEF:get_task:Function] - # [DEF:TaskManager.get_all_tasks:Function] + # [DEF:get_all_tasks:Function] # @PURPOSE: Retrieves all registered tasks. # @RETURN: List[Task] - All tasks. def get_all_tasks(self) -> List[Task]: return list(self.tasks.values()) - # [/DEF:TaskManager.get_all_tasks:Function] + # [/DEF:get_all_tasks:Function] - # [DEF:TaskManager.get_tasks:Function] + # [DEF:get_tasks:Function] # @PURPOSE: Retrieves tasks with pagination and optional status filter. # @PRE: limit and offset are non-negative integers. # @POST: Returns a list of tasks sorted by start_time descending. @@ -214,18 +214,18 @@ class TaskManager: # Sort by start_time descending (most recent first) tasks.sort(key=lambda t: t.started_at or datetime.min, reverse=True) return tasks[offset:offset + limit] - # [/DEF:TaskManager.get_tasks:Function] + # [/DEF:get_tasks:Function] - # [DEF:TaskManager.get_task_logs:Function] + # [DEF:get_task_logs:Function] # @PURPOSE: Retrieves logs for a specific task. # @PARAM: task_id (str) - ID of the task. # @RETURN: List[LogEntry] - List of log entries. def get_task_logs(self, task_id: str) -> List[LogEntry]: task = self.tasks.get(task_id) return task.logs if task else [] - # [/DEF:TaskManager.get_task_logs:Function] + # [/DEF:get_task_logs:Function] - # [DEF:TaskManager._add_log:Function] + # [DEF:_add_log:Function] # @PURPOSE: Adds a log entry to a task and notifies subscribers. # @PRE: Task exists. # @POST: Log added to task and pushed to queues. @@ -246,9 +246,9 @@ class TaskManager: if task_id in self.subscribers: for queue in self.subscribers[task_id]: self.loop.call_soon_threadsafe(queue.put_nowait, log_entry) - # [/DEF:TaskManager._add_log:Function] + # [/DEF:_add_log:Function] - # [DEF:TaskManager.subscribe_logs:Function] + # [DEF:subscribe_logs:Function] # @PURPOSE: Subscribes to real-time logs for a task. # @PARAM: task_id (str) - ID of the task. # @RETURN: asyncio.Queue - Queue for log entries. @@ -258,9 +258,9 @@ class TaskManager: self.subscribers[task_id] = [] self.subscribers[task_id].append(queue) return queue - # [/DEF:TaskManager.subscribe_logs:Function] + # [/DEF:subscribe_logs:Function] - # [DEF:TaskManager.unsubscribe_logs:Function] + # [DEF:unsubscribe_logs:Function] # @PURPOSE: Unsubscribes from real-time logs for a task. # @PARAM: task_id (str) - ID of the task. # @PARAM: queue (asyncio.Queue) - Queue to remove. @@ -270,18 +270,18 @@ class TaskManager: self.subscribers[task_id].remove(queue) if not self.subscribers[task_id]: del self.subscribers[task_id] - # [/DEF:TaskManager.unsubscribe_logs:Function] + # [/DEF:unsubscribe_logs:Function] - # [DEF:TaskManager.load_persisted_tasks:Function] + # [DEF:load_persisted_tasks:Function] # @PURPOSE: Load persisted tasks using persistence service. def load_persisted_tasks(self) -> None: loaded_tasks = self.persistence_service.load_tasks(limit=100) for task in loaded_tasks: if task.id not in self.tasks: self.tasks[task.id] = task - # [/DEF:TaskManager.load_persisted_tasks:Function] + # [/DEF:load_persisted_tasks:Function] - # [DEF:TaskManager.await_input:Function] + # [DEF:await_input:Function] # @PURPOSE: Transition a task to AWAITING_INPUT state with input request. # @PRE: Task exists and is in RUNNING state. # @POST: Task status changed to AWAITING_INPUT, input_request set, persisted. @@ -301,9 +301,9 @@ class TaskManager: task.input_request = input_request self.persistence_service.persist_task(task) self._add_log(task_id, "INFO", "Task paused for user input", {"input_request": input_request}) - # [/DEF:TaskManager.await_input:Function] + # [/DEF:await_input:Function] - # [DEF:TaskManager.resume_task_with_password:Function] + # [DEF:resume_task_with_password:Function] # @PURPOSE: Resume a task that is awaiting input with provided passwords. # @PRE: Task exists and is in AWAITING_INPUT state. # @POST: Task status changed to RUNNING, passwords injected, task resumed. @@ -330,9 +330,9 @@ class TaskManager: if task_id in self.task_futures: self.task_futures[task_id].set_result(True) - # [/DEF:TaskManager.resume_task_with_password:Function] + # [/DEF:resume_task_with_password:Function] - # [DEF:TaskManager.clear_tasks:Function] + # [DEF:clear_tasks:Function] # @PURPOSE: Clears tasks based on status filter. # @PARAM: status (Optional[TaskStatus]) - Filter by task status. # @RETURN: int - Number of tasks cleared. @@ -370,7 +370,7 @@ class TaskManager: logger.info(f"Cleared {len(tasks_to_remove)} tasks.") return len(tasks_to_remove) - # [/DEF:TaskManager.clear_tasks:Function] + # [/DEF:clear_tasks:Function] # [/DEF:TaskManager:Class] # [/DEF:TaskManagerModule:Module] \ No newline at end of file diff --git a/backend/src/core/task_manager/models.py b/backend/src/core/task_manager/models.py index 9cd80be..13be15f 100644 --- a/backend/src/core/task_manager/models.py +++ b/backend/src/core/task_manager/models.py @@ -53,7 +53,7 @@ class Task(BaseModel): input_request: Optional[Dict[str, Any]] = None result: Optional[Dict[str, Any]] = None - # [DEF:Task.__init__:Function] + # [DEF:__init__:Function] # @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. @@ -62,7 +62,7 @@ class Task(BaseModel): super().__init__(**data) if self.status == TaskStatus.AWAITING_INPUT and not self.input_request: raise ValueError("input_request is required when status is AWAITING_INPUT") - # [/DEF:Task.__init__:Function] + # [/DEF:__init__:Function] # [/DEF:Task:Class] # [/DEF:TaskManagerModels:Module] \ No newline at end of file diff --git a/backend/src/core/task_manager/persistence.py b/backend/src/core/task_manager/persistence.py index ae29d87..d1f0cfd 100644 --- a/backend/src/core/task_manager/persistence.py +++ b/backend/src/core/task_manager/persistence.py @@ -21,11 +21,16 @@ from ..logger import logger, belief_scope # @SEMANTICS: persistence, service, database, sqlalchemy # @PURPOSE: Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. class TaskPersistenceService: + # [DEF:__init__:Function] + # @PURPOSE: Initializes the persistence service. + # @PRE: None. + # @POST: Service is ready. def __init__(self): # We use TasksSessionLocal from database.py pass + # [/DEF:__init__:Function] - # [DEF:TaskPersistenceService.persist_task:Function] + # [DEF:persist_task:Function] # @PURPOSE: Persists or updates a single task in the database. # @PARAM: task (Task) - The task object to persist. def persist_task(self, task: Task) -> None: @@ -66,17 +71,17 @@ class TaskPersistenceService: logger.error(f"Failed to persist task {task.id}: {e}") finally: session.close() - # [/DEF:TaskPersistenceService.persist_task:Function] + # [/DEF:persist_task:Function] - # [DEF:TaskPersistenceService.persist_tasks:Function] + # [DEF:persist_tasks:Function] # @PURPOSE: Persists multiple tasks. # @PARAM: tasks (List[Task]) - The list of tasks to persist. def persist_tasks(self, tasks: List[Task]) -> None: for task in tasks: self.persist_task(task) - # [/DEF:TaskPersistenceService.persist_tasks:Function] + # [/DEF:persist_tasks:Function] - # [DEF:TaskPersistenceService.load_tasks:Function] + # [DEF:load_tasks:Function] # @PURPOSE: Loads tasks from the database. # @PARAM: limit (int) - Max tasks to load. # @PARAM: status (Optional[TaskStatus]) - Filter by status. @@ -119,9 +124,9 @@ class TaskPersistenceService: return loaded_tasks finally: session.close() - # [/DEF:TaskPersistenceService.load_tasks:Function] + # [/DEF:load_tasks:Function] - # [DEF:TaskPersistenceService.delete_tasks:Function] + # [DEF:delete_tasks:Function] # @PURPOSE: Deletes specific tasks from the database. # @PARAM: task_ids (List[str]) - List of task IDs to delete. def delete_tasks(self, task_ids: List[str]) -> None: @@ -137,7 +142,7 @@ class TaskPersistenceService: logger.error(f"Failed to delete tasks: {e}") finally: session.close() - # [/DEF:TaskPersistenceService.delete_tasks:Function] + # [/DEF:delete_tasks:Function] # [/DEF:TaskPersistenceService:Class] # [/DEF:TaskPersistenceModule:Module] \ No newline at end of file diff --git a/generate_semantic_map.py b/generate_semantic_map.py index 7e4011c..df572d7 100644 --- a/generate_semantic_map.py +++ b/generate_semantic_map.py @@ -13,7 +13,14 @@ import os import re import json import datetime -from typing import Dict, List, Optional, Any, Pattern, Tuple +import fnmatch +from typing import Dict, List, Optional, Any, Pattern, Tuple, Set + +# Mock belief_scope for the script itself to avoid import issues +class belief_scope: + def __init__(self, name): self.name = name + def __enter__(self): return self + def __exit__(self, *args): pass # [/SECTION] # [SECTION: CONFIGURATION] @@ -30,9 +37,9 @@ OUTPUT_COMPRESSED_MD = "specs/project_map.md" REPORTS_DIR = "semantics/reports" MANDATORY_TAGS = { - "Module": ["PURPOSE", "LAYER"], - "Component": ["PURPOSE", "LAYER"], - "Function": ["PURPOSE"], + "Module": ["PURPOSE", "LAYER", "SEMANTICS"], + "Component": ["PURPOSE", "LAYER", "SEMANTICS"], + "Function": ["PURPOSE", "PRE", "POST"], "Class": ["PURPOSE"] } # [/SECTION] @@ -41,108 +48,133 @@ MANDATORY_TAGS = { # @PURPOSE: Represents a code entity (Module, Function, Component) found during parsing. # @INVARIANT: start_line is always set; end_line is set upon closure. class SemanticEntity: + # [DEF:__init__:Function] + # @PURPOSE: Initializes a new SemanticEntity instance. + # @PRE: name, type_, start_line, file_path are provided. + # @POST: Instance is initialized with default values. def __init__(self, name: str, type_: str, start_line: int, file_path: str): - self.name = name - self.type = type_ - self.start_line = start_line - self.end_line: Optional[int] = None - self.file_path = file_path - self.tags: Dict[str, str] = {} - self.relations: List[Dict[str, str]] = [] - self.children: List['SemanticEntity'] = [] - self.parent: Optional['SemanticEntity'] = None - self.compliance_issues: List[str] = [] + with belief_scope("__init__"): + self.name = name + self.type = type_ + self.start_line = start_line + self.end_line: Optional[int] = None + self.file_path = file_path + self.tags: Dict[str, str] = {} + self.relations: List[Dict[str, str]] = [] + self.children: List['SemanticEntity'] = [] + self.parent: Optional['SemanticEntity'] = None + self.compliance_issues: List[str] = [] + # [/DEF:__init__:Function] # [DEF:to_dict:Function] # @PURPOSE: Serializes the entity to a dictionary for JSON output. + # @PRE: Entity is fully populated. + # @POST: Returns a dictionary representation. # @RETURN: Dict representation of the entity. def to_dict(self) -> Dict[str, Any]: - return { - "name": self.name, - "type": self.type, - "start_line": self.start_line, - "end_line": self.end_line, - "tags": self.tags, - "relations": self.relations, - "children": [c.to_dict() for c in self.children], - "compliance": { - "valid": len(self.compliance_issues) == 0, - "issues": self.compliance_issues + with belief_scope("to_dict"): + return { + "name": self.name, + "type": self.type, + "start_line": self.start_line, + "end_line": self.end_line, + "tags": self.tags, + "relations": self.relations, + "children": [c.to_dict() for c in self.children], + "compliance": { + "valid": len(self.compliance_issues) == 0, + "issues": self.compliance_issues + } } - } # [/DEF:to_dict:Function] # [DEF:validate:Function] - # @PURPOSE: Checks for semantic compliance (closure, mandatory tags). + # @PURPOSE: Checks for semantic compliance (closure, mandatory tags, belief state). + # @PRE: Entity structure is complete. # @POST: Populates self.compliance_issues. def validate(self): - # 1. Check Closure - if self.end_line is None: - self.compliance_issues.append(f"Unclosed Anchor: [DEF:{self.name}:{self.type}] started at line {self.start_line}") - - # 2. Check Mandatory Tags - required = MANDATORY_TAGS.get(self.type, []) - for req_tag in required: - found = False - for existing_tag in self.tags: - if existing_tag.upper() == req_tag: - found = True - break - if not found: - self.compliance_issues.append(f"Missing Mandatory Tag: @{req_tag}") + with belief_scope("validate"): + # 1. Check Closure + if self.end_line is None: + self.compliance_issues.append(f"Unclosed Anchor: [DEF:{self.name}:{self.type}] started at line {self.start_line}") + + # 2. Check Mandatory Tags + required = MANDATORY_TAGS.get(self.type, []) + for req_tag in required: + found = False + for existing_tag in self.tags: + if existing_tag.upper() == req_tag: + found = True + break + if not found: + self.compliance_issues.append(f"Missing Mandatory Tag: @{req_tag}") - # Recursive validation - for child in self.children: - child.validate() + # 3. Check for Belief State Logging (Python only) + if self.type == "Function" and self.file_path.endswith(".py"): + if not getattr(self, 'has_belief_scope', False): + self.compliance_issues.append("Missing Belief State Logging: Function should use belief_scope context manager.") + + # Recursive validation + for child in self.children: + child.validate() # [/DEF:validate:Function] # [DEF:get_score:Function] # @PURPOSE: Calculates a compliance score (0.0 to 1.0). + # @PRE: validate() has been called. + # @POST: Returns a float score. # @RETURN: Float score. def get_score(self) -> float: - if self.end_line is None: - return 0.0 - - score = 1.0 - required = MANDATORY_TAGS.get(self.type, []) - if required: - found_count = 0 - for req_tag in required: - for existing_tag in self.tags: - if existing_tag.upper() == req_tag: - found_count += 1 - break - if found_count < len(required): - # Penalty proportional to missing tags - score -= 0.5 * (1 - (found_count / len(required))) - - return max(0.0, score) + with belief_scope("get_score"): + if self.end_line is None: + return 0.0 + + score = 1.0 + required = MANDATORY_TAGS.get(self.type, []) + if required: + found_count = 0 + for req_tag in required: + for existing_tag in self.tags: + if existing_tag.upper() == req_tag: + found_count += 1 + break + if found_count < len(required): + # Penalty proportional to missing tags + score -= 0.5 * (1 - (found_count / len(required))) + + return max(0.0, score) # [/DEF:get_score:Function] # [/DEF:SemanticEntity:Class] # [DEF:get_patterns:Function] # @PURPOSE: Returns regex patterns for a specific language. +# @PRE: lang is either 'python' or 'svelte_js'. +# @POST: Returns a dictionary of compiled regex patterns. # @PARAM: lang (str) - 'python' or 'svelte_js' # @RETURN: Dict containing compiled regex patterns. def get_patterns(lang: str) -> Dict[str, Pattern]: - if lang == "python": - return { - "anchor_start": re.compile(r"#\s*\[DEF:(?P[\w\.]+):(?P\w+)\]"), - "anchor_end": re.compile(r"#\s*\[/DEF:(?P[\w\.]+):(?P\w+)\]"), - "tag": re.compile(r"#\s*@(?P[A-Z_]+):\s*(?P.*)"), - "relation": re.compile(r"#\s*@RELATION:\s*(?P\w+)\s*->\s*(?P.*)"), - } - else: - return { - "html_anchor_start": re.compile(r""), - "html_anchor_end": re.compile(r""), - "js_anchor_start": re.compile(r"//\s*\[DEF:(?P[\w\.]+):(?P\w+)\]"), - "js_anchor_end": re.compile(r"//\s*\[/DEF:(?P[\w\.]+):(?P\w+)\]"), - "html_tag": re.compile(r"@(?P[A-Z_]+):\s*(?P.*)"), - "jsdoc_tag": re.compile(r"\*\s*@(?P[a-zA-Z]+)\s+(?P.*)"), - "relation": re.compile(r"//\s*@RELATION:\s*(?P\w+)\s*->\s*(?P.*)"), - } + with belief_scope("get_patterns"): + if lang == "python": + return { + "anchor_start": re.compile(r"#\s*\[DEF:(?P[\w\.]+):(?P\w+)\]"), + "anchor_end": re.compile(r"#\s*\[/DEF:(?P[\w\.]+):(?P\w+)\]"), + "tag": re.compile(r"#\s*@(?P[A-Z_]+):\s*(?P.*)"), + "relation": re.compile(r"#\s*@RELATION:\s*(?P\w+)\s*->\s*(?P.*)"), + "func_def": re.compile(r"^\s*(async\s+)?def\s+(?P\w+)"), + "belief_scope": re.compile(r"with\s+belief_scope\("), + } + else: + return { + "html_anchor_start": re.compile(r""), + "html_anchor_end": re.compile(r""), + "js_anchor_start": re.compile(r"//\s*\[DEF:(?P[\w\.]+):(?P\w+)\]"), + "js_anchor_end": re.compile(r"//\s*\[/DEF:(?P[\w\.]+):(?P\w+)\]"), + "html_tag": re.compile(r"@(?P[A-Z_]+):\s*(?P.*)"), + "jsdoc_tag": re.compile(r"\*\s*@(?P[a-zA-Z]+)\s+(?P.*)"), + "relation": re.compile(r"//\s*@RELATION:\s*(?P\w+)\s*->\s*(?P.*)"), + "func_def": re.compile(r"^\s*(export\s+)?(async\s+)?function\s+(?P\w+)"), + } # [/DEF:get_patterns:Function] @@ -213,7 +245,22 @@ def parse_file(full_path: str, rel_path: str, lang: str) -> Tuple[List[SemanticE issues.append(f"{rel_path}:{lineno} Mismatched closing anchor. Expected [/DEF:{top.name}:{top.type}], found [/DEF:{name}:{type_}].") continue - # 3. Check for Tags/Relations + # 3. Check for Naked Functions (Missing Contracts) + if "func_def" in patterns: + match_func = patterns["func_def"].search(line) + if match_func: + func_name = match_func.group("name") + is_covered = False + if stack: + current = stack[-1] + # Check if we are inside a Function anchor that matches the name + if current.type == "Function" and current.name == func_name: + is_covered = True + + if not is_covered: + issues.append(f"{rel_path}:{lineno} Function '{func_name}' implementation found without matching [DEF:{func_name}:Function] contract.") + + # 4. Check for Tags/Relations if stack: current = stack[-1] @@ -238,6 +285,11 @@ def parse_file(full_path: str, rel_path: str, lang: str) -> Tuple[List[SemanticE tag_value = match_tag.group("value").strip() current.tags[tag_name] = tag_value + # Check for belief scope in implementation + if lang == "python" and "belief_scope" in patterns: + if patterns["belief_scope"].search(line): + current.has_belief_scope = True + # End of file check if stack: for unclosed in stack: @@ -252,14 +304,79 @@ def parse_file(full_path: str, rel_path: str, lang: str) -> Tuple[List[SemanticE # [DEF:SemanticMapGenerator:Class] # @PURPOSE: Orchestrates the mapping process. class SemanticMapGenerator: + # [DEF:__init__:Function] + # @PURPOSE: Initializes the generator with a root directory. + # @PRE: root_dir is a valid path string. + # @POST: Generator instance is ready. def __init__(self, root_dir: str): self.root_dir = root_dir self.entities: List[SemanticEntity] = [] self.file_scores: Dict[str, float] = {} self.global_issues: List[str] = [] + self.ignored_patterns = self._load_gitignore() + # [/DEF:__init__:Function] + + # [DEF:_load_gitignore:Function] + # @PURPOSE: Loads patterns from .gitignore file. + # @RETURN: Set of patterns to ignore. + def _load_gitignore(self) -> Set[str]: + patterns = set() + ignore_file = os.path.join(self.root_dir, ".gitignore") + if os.path.exists(ignore_file): + with open(ignore_file, 'r') as f: + for line in f: + line = line.strip() + if line and not line.startswith("#"): + patterns.add(line) + return patterns + # [/DEF:_load_gitignore:Function] + + # [DEF:_is_ignored:Function] + # @PURPOSE: Checks if a path should be ignored based on .gitignore or hardcoded defaults. + # @PRE: rel_path is a valid relative path string. + # @POST: Returns True if the path should be ignored. + # @PARAM: rel_path (str) - Path relative to root. + # @RETURN: bool - True if ignored. + def _is_ignored(self, rel_path: str) -> bool: + # Normalize path for matching + rel_path = rel_path.replace(os.sep, '/') + + # Check hardcoded defaults + parts = rel_path.split('/') + for part in parts: + if part in IGNORE_DIRS: + return True + + if os.path.basename(rel_path) in IGNORE_FILES: + return True + + # Check gitignore patterns + for pattern in self.ignored_patterns: + # Handle directory patterns like 'node_modules/' + if pattern.endswith('/'): + dir_pattern = pattern.rstrip('/') + if rel_path == dir_pattern or rel_path.startswith(pattern): + return True + + # Check for patterns in frontend/ or backend/ + if rel_path.startswith("frontend/") and fnmatch.fnmatch(rel_path[9:], pattern): + return True + if rel_path.startswith("backend/") and fnmatch.fnmatch(rel_path[8:], pattern): + return True + + # Use fnmatch for glob patterns + if fnmatch.fnmatch(rel_path, pattern) or \ + fnmatch.fnmatch(os.path.basename(rel_path), pattern) or \ + any(fnmatch.fnmatch(part, pattern) for part in parts): + return True + + return False + # [/DEF:_is_ignored:Function] # [DEF:run:Function] # @PURPOSE: Main execution flow. + # @PRE: Generator is initialized. + # @POST: Semantic map and reports are generated. # @RELATION: CALLS -> _walk_and_parse # @RELATION: CALLS -> _generate_artifacts def run(self): @@ -271,17 +388,20 @@ class SemanticMapGenerator: # [DEF:_walk_and_parse:Function] # @PURPOSE: Recursively walks directories and triggers parsing. + # @PRE: root_dir exists. + # @POST: All files are scanned and entities extracted. def _walk_and_parse(self): for root, dirs, files in os.walk(self.root_dir): - dirs[:] = [d for d in dirs if d not in IGNORE_DIRS] + # Optimization: don't enter ignored directories + dirs[:] = [d for d in dirs if not self._is_ignored(os.path.relpath(os.path.join(root, d), self.root_dir) + "/")] for file in files: - if file in IGNORE_FILES: - continue - file_path = os.path.join(root, file) rel_path = os.path.relpath(file_path, self.root_dir) + if self._is_ignored(rel_path): + continue + lang = None if file.endswith(".py"): lang = "python" @@ -298,10 +418,16 @@ class SemanticMapGenerator: # [DEF:_process_file_results:Function] # @PURPOSE: Validates entities and calculates file scores. + # @PRE: Entities have been parsed from the file. + # @POST: File score is calculated and issues collected. def _process_file_results(self, rel_path: str, entities: List[SemanticEntity]): total_score = 0 count = 0 + # [DEF:validate_recursive:Function] + # @PURPOSE: Recursively validates a list of entities. + # @PRE: ent_list is a list of SemanticEntity objects. + # @POST: All entities and their children are validated. def validate_recursive(ent_list): nonlocal total_score, count for e in ent_list: @@ -309,6 +435,7 @@ class SemanticMapGenerator: total_score += e.get_score() count += 1 validate_recursive(e.children) + # [/DEF:validate_recursive:Function] validate_recursive(entities) @@ -318,6 +445,8 @@ class SemanticMapGenerator: # [DEF:_generate_artifacts:Function] # @PURPOSE: Writes output files. + # @PRE: Parsing and validation are complete. + # @POST: JSON and Markdown artifacts are written to disk. def _generate_artifacts(self): # 1. Full JSON Map full_map = { @@ -340,6 +469,8 @@ class SemanticMapGenerator: # [DEF:_generate_report:Function] # @PURPOSE: Generates the Markdown compliance report. + # @PRE: File scores and issues are available. + # @POST: Markdown report is created in reports directory. def _generate_report(self): timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") report_path = os.path.join(REPORTS_DIR, f"semantic_report_{timestamp}.md") @@ -379,6 +510,8 @@ class SemanticMapGenerator: # [DEF:_collect_issues:Function] # @PURPOSE: Helper to collect issues for a specific file from the entity tree. + # @PRE: entities list and file_path are valid. + # @POST: issues list is populated with compliance issues. def _collect_issues(self, entities: List[SemanticEntity], file_path: str, issues: List[str]): for e in entities: if e.file_path == file_path: @@ -388,6 +521,8 @@ class SemanticMapGenerator: # [DEF:_generate_compressed_map:Function] # @PURPOSE: Generates the token-optimized project map. + # @PRE: Entities have been processed. + # @POST: Markdown project map is written. def _generate_compressed_map(self): os.makedirs(os.path.dirname(OUTPUT_COMPRESSED_MD), exist_ok=True) @@ -403,6 +538,8 @@ class SemanticMapGenerator: # [DEF:_write_entity_md:Function] # @PURPOSE: Recursive helper to write entity tree to Markdown. + # @PRE: f is an open file handle, entity is valid. + # @POST: Entity details are written to the file. def _write_entity_md(self, f, entity: SemanticEntity, level: int): indent = " " * level diff --git a/migration_script.py b/migration_script.py index e2f3eb7..3ecf06a 100755 --- a/migration_script.py +++ b/migration_script.py @@ -30,8 +30,9 @@ class Migration: """ Интерактивный процесс миграции дашбордов. """ - # [DEF:Migration.__init__:Function] + # [DEF:__init__:Function] # @PURPOSE: Инициализирует сервис миграции, настраивает логгер и начальные состояния. + # @PRE: None. # @POST: `self.logger` готов к использованию; `enable_delete_on_failure` = `False`. def __init__(self) -> None: default_log_dir = Path.cwd() / "logs" @@ -47,9 +48,9 @@ class Migration: self.dashboards_to_migrate: List[dict] = [] self.db_config_replacement: Optional[dict] = None self._failed_imports: List[dict] = [] - # [/DEF:Migration.__init__:Function] + # [/DEF:__init__:Function] - # [DEF:Migration.run:Function] + # [DEF:run:Function] # @PURPOSE: Точка входа – последовательный запуск всех шагов миграции. # @PRE: Логгер готов. # @POST: Скрипт завершён, пользователю выведено сообщение. @@ -66,9 +67,9 @@ class Migration: self.confirm_db_config_replacement() self.execute_migration() self.logger.info("[run][Exit] Скрипт миграции завершён.") - # [/DEF:Migration.run:Function] + # [/DEF:run:Function] - # [DEF:Migration.ask_delete_on_failure:Function] + # [DEF:ask_delete_on_failure:Function] # @PURPOSE: Запрашивает у пользователя, следует ли удалять дашборд при ошибке импорта. # @POST: `self.enable_delete_on_failure` установлен. # @RELATION: CALLS -> yesno @@ -81,9 +82,9 @@ class Migration: "[ask_delete_on_failure][State] Delete-on-failure = %s", self.enable_delete_on_failure, ) - # [/DEF:Migration.ask_delete_on_failure:Function] + # [/DEF:ask_delete_on_failure:Function] - # [DEF:Migration.select_environments:Function] + # [DEF:select_environments:Function] # @PURPOSE: Позволяет пользователю выбрать исходное и целевое окружения Superset. # @PRE: `setup_clients` успешно инициализирует все клиенты. # @POST: `self.from_c` и `self.to_c` установлены. @@ -122,9 +123,9 @@ class Migration: self.to_c = all_clients[to_env_name] self.logger.info("[select_environments][State] to = %s", to_env_name) self.logger.info("[select_environments][Exit] Шаг 1 завершён.") - # [/DEF:Migration.select_environments:Function] + # [/DEF:select_environments:Function] - # [DEF:Migration.select_dashboards:Function] + # [DEF:select_dashboards:Function] # @PURPOSE: Позволяет пользователю выбрать набор дашбордов для миграции. # @PRE: `self.from_c` инициализирован. # @POST: `self.dashboards_to_migrate` заполнен. @@ -179,9 +180,9 @@ class Migration: self.logger.error("[select_dashboards][Failure] %s", e, exc_info=True) msgbox("Ошибка", "Не удалось получить список дашбордов.") self.logger.info("[select_dashboards][Exit] Шаг 2 завершён.") - # [/DEF:Migration.select_dashboards:Function] + # [/DEF:select_dashboards:Function] - # [DEF:Migration.confirm_db_config_replacement:Function] + # [DEF:confirm_db_config_replacement:Function] # @PURPOSE: Запрашивает у пользователя, требуется ли заменить имена БД в YAML-файлах. # @POST: `self.db_config_replacement` либо `None`, либо заполнен. # @RELATION: CALLS -> yesno @@ -214,9 +215,9 @@ class Migration: self.logger.info("[confirm_db_config_replacement][State] Replacement set: %s", self.db_config_replacement) else: self.logger.info("[confirm_db_config_replacement][State] Skipped.") - # [/DEF:Migration.confirm_db_config_replacement:Function] + # [/DEF:confirm_db_config_replacement:Function] - # [DEF:Migration._select_databases:Function] + # [DEF:_select_databases:Function] # @PURPOSE: Позволяет пользователю выбрать исходную и целевую БД через API. # @POST: Возвращает кортеж (старая БД, новая БД) или (None, None) при отмене. # @RELATION: CALLS -> self.from_c.get_databases @@ -293,9 +294,9 @@ class Migration: self.logger.info("[_select_databases][Exit] Selected databases: %s -> %s", from_db.get("database_name", "Без имени"), to_db.get("database_name", "Без имени")) return from_db, to_db - # [/DEF:Migration._select_databases:Function] + # [/DEF:_select_databases:Function] - # [DEF:Migration._batch_delete_by_ids:Function] + # [DEF:_batch_delete_by_ids:Function] # @PURPOSE: Удаляет набор дашбордов по их ID единым запросом. # @PRE: `ids` – непустой список целых чисел. # @POST: Все указанные дашборды удалены (если они существовали). @@ -319,9 +320,9 @@ class Migration: self.logger.warning("[_batch_delete_by_ids][Warning] Unexpected delete response: %s", response) else: self.logger.info("[_batch_delete_by_ids][Success] Delete request completed.") - # [/DEF:Migration._batch_delete_by_ids:Function] + # [/DEF:_batch_delete_by_ids:Function] - # [DEF:Migration.execute_migration:Function] + # [DEF:execute_migration:Function] # @PURPOSE: Выполняет экспорт-импорт дашбордов, обрабатывает ошибки и, при необходимости, выполняет процедуру восстановления. # @PRE: `self.dashboards_to_migrate` не пуст; `self.from_c` и `self.to_c` инициализированы. # @POST: Успешные дашборды импортированы; неудачные - восстановлены или залогированы. @@ -391,7 +392,7 @@ class Migration: self.logger.info("[execute_migration][Exit] Migration finished.") msgbox("Информация", "Миграция завершена!") - # [/DEF:Migration.execute_migration:Function] + # [/DEF:execute_migration:Function] # [/DEF:Migration:Class] diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index fe9f5a2..4607607 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,12 +1,12 @@ { "project_root": ".", - "generated_at": "2026-01-13T09:08:58.200446", + "generated_at": "2026-01-13T17:32:50.390430", "modules": [ { "name": "generate_semantic_map", "type": "Module", "start_line": 1, - "end_line": 439, + "end_line": 576, "tags": { "SEMANTICS": "semantic_analysis, parser, map_generator, compliance_checker", "PURPOSE": "Scans the codebase to generate a Semantic Map and Compliance Report based on the System Standard.", @@ -34,21 +34,40 @@ { "name": "SemanticEntity", "type": "Class", - "start_line": 40, - "end_line": 121, + "start_line": 47, + "end_line": 147, "tags": { "PURPOSE": "Represents a code entity (Module, Function, Component) found during parsing.", "INVARIANT": "start_line is always set; end_line is set upon closure." }, "relations": [], "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 51, + "end_line": 67, + "tags": { + "PURPOSE": "Initializes a new SemanticEntity instance.", + "PRE": "name, type_, start_line, file_path are provided.", + "POST": "Instance is initialized with default values." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "to_dict", "type": "Function", - "start_line": 56, - "end_line": 73, + "start_line": 69, + "end_line": 89, "tags": { "PURPOSE": "Serializes the entity to a dictionary for JSON output.", + "PRE": "Entity is fully populated.", + "POST": "Returns a dictionary representation.", "RETURN": "Dict representation of the entity." }, "relations": [], @@ -61,10 +80,11 @@ { "name": "validate", "type": "Function", - "start_line": 75, - "end_line": 97, + "start_line": 91, + "end_line": 120, "tags": { - "PURPOSE": "Checks for semantic compliance (closure, mandatory tags).", + "PURPOSE": "Checks for semantic compliance (closure, mandatory tags, belief state).", + "PRE": "Entity structure is complete.", "POST": "Populates self.compliance_issues." }, "relations": [], @@ -77,10 +97,12 @@ { "name": "get_score", "type": "Function", - "start_line": 99, - "end_line": 120, + "start_line": 122, + "end_line": 146, "tags": { "PURPOSE": "Calculates a compliance score (0.0 to 1.0).", + "PRE": "validate() has been called.", + "POST": "Returns a float score.", "RETURN": "Float score." }, "relations": [], @@ -99,10 +121,12 @@ { "name": "get_patterns", "type": "Function", - "start_line": 124, - "end_line": 146, + "start_line": 150, + "end_line": 178, "tags": { "PURPOSE": "Returns regex patterns for a specific language.", + "PRE": "lang is either 'python' or 'svelte_js'.", + "POST": "Returns a dictionary of compiled regex patterns.", "PARAM": "lang (str) - 'python' or 'svelte_js'", "RETURN": "Dict containing compiled regex patterns." }, @@ -116,8 +140,8 @@ { "name": "parse_file", "type": "Function", - "start_line": 149, - "end_line": 249, + "start_line": 181, + "end_line": 301, "tags": { "PURPOSE": "Parses a single file to extract semantic entities.", "PARAM": "lang - Language identifier.", @@ -126,27 +150,106 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "SemanticMapGenerator", "type": "Class", - "start_line": 252, - "end_line": 433, + "start_line": 304, + "end_line": 570, "tags": { "PURPOSE": "Orchestrates the mapping process." }, "relations": [], "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 307, + "end_line": 317, + "tags": { + "PURPOSE": "Initializes the generator with a root directory.", + "PRE": "root_dir is a valid path string.", + "POST": "Generator instance is ready." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + }, + { + "name": "_load_gitignore", + "type": "Function", + "start_line": 319, + "end_line": 332, + "tags": { + "PURPOSE": "Loads patterns from .gitignore file.", + "RETURN": "Set of patterns to ignore." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + }, + { + "name": "_is_ignored", + "type": "Function", + "start_line": 334, + "end_line": 374, + "tags": { + "PURPOSE": "Checks if a path should be ignored based on .gitignore or hardcoded defaults.", + "PRE": "rel_path is a valid relative path string.", + "POST": "Returns True if the path should be ignored.", + "PARAM": "rel_path (str) - Path relative to root.", + "RETURN": "bool - True if ignored." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + }, { "name": "run", "type": "Function", - "start_line": 261, - "end_line": 270, + "start_line": 376, + "end_line": 387, "tags": { - "PURPOSE": "Main execution flow." + "PURPOSE": "Main execution flow.", + "PRE": "Generator is initialized.", + "POST": "Semantic map and reports are generated." }, "relations": [ { @@ -160,113 +263,182 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_walk_and_parse", "type": "Function", - "start_line": 272, - "end_line": 297, + "start_line": 389, + "end_line": 417, "tags": { - "PURPOSE": "Recursively walks directories and triggers parsing." + "PURPOSE": "Recursively walks directories and triggers parsing.", + "PRE": "root_dir exists.", + "POST": "All files are scanned and entities extracted." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_process_file_results", "type": "Function", - "start_line": 299, - "end_line": 317, + "start_line": 419, + "end_line": 444, "tags": { - "PURPOSE": "Validates entities and calculates file scores." + "PURPOSE": "Validates entities and calculates file scores.", + "PRE": "Entities have been parsed from the file.", + "POST": "File score is calculated and issues collected." }, "relations": [], - "children": [], + "children": [ + { + "name": "validate_recursive", + "type": "Function", + "start_line": 427, + "end_line": 438, + "tags": { + "PURPOSE": "Recursively validates a list of entities.", + "PRE": "ent_list is a list of SemanticEntity objects.", + "POST": "All entities and their children are validated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_generate_artifacts", "type": "Function", - "start_line": 319, - "end_line": 339, + "start_line": 446, + "end_line": 468, "tags": { - "PURPOSE": "Writes output files." + "PURPOSE": "Writes output files.", + "PRE": "Parsing and validation are complete.", + "POST": "JSON and Markdown artifacts are written to disk." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_generate_report", "type": "Function", - "start_line": 341, - "end_line": 378, + "start_line": 470, + "end_line": 509, "tags": { - "PURPOSE": "Generates the Markdown compliance report." + "PURPOSE": "Generates the Markdown compliance report.", + "PRE": "File scores and issues are available.", + "POST": "Markdown report is created in reports directory." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_collect_issues", "type": "Function", - "start_line": 380, - "end_line": 387, + "start_line": 511, + "end_line": 520, "tags": { - "PURPOSE": "Helper to collect issues for a specific file from the entity tree." + "PURPOSE": "Helper to collect issues for a specific file from the entity tree.", + "PRE": "entities list and file_path are valid.", + "POST": "issues list is populated with compliance issues." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_generate_compressed_map", "type": "Function", - "start_line": 389, - "end_line": 402, + "start_line": 522, + "end_line": 537, "tags": { - "PURPOSE": "Generates the token-optimized project map." + "PURPOSE": "Generates the token-optimized project map.", + "PRE": "Entities have been processed.", + "POST": "Markdown project map is written." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { "name": "_write_entity_md", "type": "Function", - "start_line": 404, - "end_line": 431, + "start_line": 539, + "end_line": 568, "tags": { - "PURPOSE": "Recursive helper to write entity tree to Markdown." + "PURPOSE": "Recursive helper to write entity tree to Markdown.", + "PRE": "f is an open file handle, entity is valid.", + "POST": "Entity details are written to the file." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -285,7 +457,7 @@ "name": "migration_script", "type": "Module", "start_line": 1, - "end_line": 401, + "end_line": 402, "tags": { "SEMANTICS": "migration, cli, superset, ui, logging, error-recovery, batch-delete", "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 CLI \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 Superset \u043c\u0435\u0436\u0434\u0443 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.", @@ -307,7 +479,7 @@ "name": "Migration", "type": "Class", "start_line": 25, - "end_line": 396, + "end_line": 397, "tags": { "PURPOSE": "\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u00ab\u0443\u0434\u0430\u043b\u0438\u0442\u044c\u2011\u0438\u2011\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u00bb \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430." }, @@ -323,26 +495,31 @@ ], "children": [ { - "name": "Migration.__init__", + "name": "__init__", "type": "Function", "start_line": 33, - "end_line": 50, + "end_line": 51, "tags": { "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0433\u0435\u0440 \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.", + "PRE": "None.", "POST": "`self.logger` \u0433\u043e\u0442\u043e\u0432 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e; `enable_delete_on_failure` = `False`." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration.run", + "name": "run", "type": "Function", - "start_line": 52, - "end_line": 69, + "start_line": 53, + "end_line": 70, "tags": { "PURPOSE": "\u0422\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u2013 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0432\u0441\u0435\u0445 \u0448\u0430\u0433\u043e\u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.", "PRE": "\u041b\u043e\u0433\u0433\u0435\u0440 \u0433\u043e\u0442\u043e\u0432.", @@ -372,15 +549,19 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration.ask_delete_on_failure", + "name": "ask_delete_on_failure", "type": "Function", - "start_line": 71, - "end_line": 84, + "start_line": 72, + "end_line": 85, "tags": { "PURPOSE": "\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430.", "POST": "`self.enable_delete_on_failure` \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d." @@ -393,15 +574,22 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration.select_environments", + "name": "select_environments", "type": "Function", - "start_line": 86, - "end_line": 125, + "start_line": 87, + "end_line": 126, "tags": { "PURPOSE": "\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f Superset.", "PRE": "`setup_clients` \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b.", @@ -419,15 +607,19 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration.select_dashboards", + "name": "select_dashboards", "type": "Function", - "start_line": 127, - "end_line": 182, + "start_line": 128, + "end_line": 183, "tags": { "PURPOSE": "\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.", "PRE": "`self.from_c` \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d.", @@ -445,15 +637,19 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration.confirm_db_config_replacement", + "name": "confirm_db_config_replacement", "type": "Function", - "start_line": 184, - "end_line": 217, + "start_line": 185, + "end_line": 218, "tags": { "PURPOSE": "\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0411\u0414 \u0432 YAML-\u0444\u0430\u0439\u043b\u0430\u0445.", "POST": "`self.db_config_replacement` \u043b\u0438\u0431\u043e `None`, \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d." @@ -470,15 +666,22 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration._select_databases", + "name": "_select_databases", "type": "Function", - "start_line": 219, - "end_line": 296, + "start_line": 220, + "end_line": 297, "tags": { "PURPOSE": "\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0438 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0411\u0414 \u0447\u0435\u0440\u0435\u0437 API.", "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u0440\u0442\u0435\u0436 (\u0441\u0442\u0430\u0440\u0430\u044f \u0411\u0414, \u043d\u043e\u0432\u0430\u044f \u0411\u0414) \u0438\u043b\u0438 (None, None) \u043f\u0440\u0438 \u043e\u0442\u043c\u0435\u043d\u0435." @@ -507,15 +710,22 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration._batch_delete_by_ids", + "name": "_batch_delete_by_ids", "type": "Function", - "start_line": 298, - "end_line": 322, + "start_line": 299, + "end_line": 323, "tags": { "PURPOSE": "\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u043f\u043e \u0438\u0445 ID \u0435\u0434\u0438\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c.", "PRE": "`ids` \u2013 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.", @@ -530,15 +740,19 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "Migration.execute_migration", + "name": "execute_migration", "type": "Function", - "start_line": 324, - "end_line": 394, + "start_line": 325, + "end_line": 395, "tags": { "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442-\u0438\u043c\u043f\u043e\u0440\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.", "PRE": "`self.dashboards_to_migrate` \u043d\u0435 \u043f\u0443\u0441\u0442; `self.from_c` \u0438 `self.to_c` \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b.", @@ -572,8 +786,12 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -592,7 +810,7 @@ "name": "superset_tool.exceptions", "type": "Module", "start_line": 1, - "end_line": 128, + "end_line": null, "tags": { "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0435\u0434\u0438\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a.", "SEMANTICS": "exception, error, hierarchy", @@ -604,7 +822,7 @@ "name": "SupersetToolError", "type": "Class", "start_line": 11, - "end_line": 20, + "end_line": 25, "tags": { "PURPOSE": "\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c.", "PARAM": "context (Optional[Dict[str, Any]]) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -615,7 +833,29 @@ "target": "Exception" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 17, + "end_line": 24, + "tags": { + "PURPOSE": "Initializes the base tool error.", + "PRE": "message is a string, context is optional dict.", + "POST": "Error is initialized with combined message and context." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -624,8 +864,8 @@ { "name": "AuthenticationError", "type": "Class", - "start_line": 22, - "end_line": 30, + "start_line": 27, + "end_line": 40, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439.", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -636,7 +876,29 @@ "target": "SupersetToolError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 33, + "end_line": 39, + "tags": { + "PURPOSE": "Initializes an authentication error.", + "PRE": "Optional message and context.", + "POST": "Error is initialized with authentication context." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -645,8 +907,8 @@ { "name": "PermissionDeniedError", "type": "Class", - "start_line": 32, - "end_line": 42, + "start_line": 42, + "end_line": 57, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0430, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0430\u044f \u043f\u0440\u0438 \u043e\u0442\u043a\u0430\u0437\u0435 \u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443.", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -657,7 +919,29 @@ "target": "AuthenticationError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 49, + "end_line": 56, + "tags": { + "PURPOSE": "Initializes a permission denied error.", + "PRE": "Optional message, permission string, and context.", + "POST": "Error is initialized with permission details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -666,8 +950,8 @@ { "name": "SupersetAPIError", "type": "Class", - "start_line": 44, - "end_line": 52, + "start_line": 59, + "end_line": 72, "tags": { "PURPOSE": "\u041e\u0431\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 Superset API.", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -678,7 +962,29 @@ "target": "SupersetToolError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 65, + "end_line": 71, + "tags": { + "PURPOSE": "Initializes a Superset API error.", + "PRE": "Optional message and context.", + "POST": "Error is initialized with API failure context." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -687,8 +993,8 @@ { "name": "ExportError", "type": "Class", - "start_line": 54, - "end_line": 62, + "start_line": 74, + "end_line": 87, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0438, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430.", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -699,7 +1005,29 @@ "target": "SupersetAPIError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 80, + "end_line": 86, + "tags": { + "PURPOSE": "Initializes an export error.", + "PRE": "Optional message and context.", + "POST": "Error is initialized with export failure subtype." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -708,8 +1036,8 @@ { "name": "DashboardNotFoundError", "type": "Class", - "start_line": 64, - "end_line": 73, + "start_line": 89, + "end_line": 103, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0439 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u043b\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d (404).", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -720,7 +1048,29 @@ "target": "SupersetAPIError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 96, + "end_line": 102, + "tags": { + "PURPOSE": "Initializes a dashboard not found error.", + "PRE": "dashboard_id_or_slug is provided.", + "POST": "Error is initialized with resource identification." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -729,8 +1079,8 @@ { "name": "DatasetNotFoundError", "type": "Class", - "start_line": 75, - "end_line": 84, + "start_line": 105, + "end_line": 119, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 (404).", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -741,7 +1091,29 @@ "target": "SupersetAPIError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 112, + "end_line": 118, + "tags": { + "PURPOSE": "Initializes a dataset not found error.", + "PRE": "dataset_id_or_slug is provided.", + "POST": "Error is initialized with resource identification." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -750,8 +1122,8 @@ { "name": "InvalidZipFormatError", "type": "Class", - "start_line": 86, - "end_line": 95, + "start_line": 121, + "end_line": 135, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430.", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -762,7 +1134,29 @@ "target": "SupersetToolError" } ], - "children": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 128, + "end_line": 134, + "tags": { + "PURPOSE": "Initializes an invalid ZIP format error.", + "PRE": "Optional message, file path, and context.", + "POST": "Error is initialized with file validation context." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -771,8 +1165,8 @@ { "name": "NetworkError", "type": "Class", - "start_line": 97, - "end_line": 105, + "start_line": 137, + "end_line": null, "tags": { "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c.", "PARAM": "context (Any) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0438." @@ -783,76 +1177,110 @@ "target": "SupersetToolError" } ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "FileOperationError", - "type": "Class", - "start_line": 107, - "end_line": 112, - "tags": { - "PURPOSE": "\u041e\u0431\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (I/O)." - }, - "relations": [ + "children": [ { - "type": "INHERITS_FROM", - "target": "SupersetToolError" + "name": "__init__", + "type": "Function", + "start_line": 143, + "end_line": null, + "tags": { + "PURPOSE": "Initializes a network error.", + "PRE": "Optional message and context.", + "POST": "Error is initialized with network failure context." + }, + "relations": [], + "children": [ + { + "name": "FileOperationError", + "type": "Class", + "start_line": 151, + "end_line": 156, + "tags": { + "PURPOSE": "\u041e\u0431\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (I/O)." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "SupersetToolError" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "InvalidFileStructureError", + "type": "Class", + "start_line": 158, + "end_line": 163, + "tags": { + "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "FileOperationError" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConfigurationError", + "type": "Class", + "start_line": 165, + "end_line": 170, + "tags": { + "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "SupersetToolError" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 143)", + "Unclosed Anchor: [DEF:__init__:Function] started at line 143", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Unclosed Anchor: [DEF:__init__:Function] started at line 143", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Unclosed Anchor: [DEF:__init__:Function] started at line 143", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } } ], - "children": [], "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "InvalidFileStructureError", - "type": "Class", - "start_line": 114, - "end_line": 119, - "tags": { - "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439." - }, - "relations": [ - { - "type": "INHERITS_FROM", - "target": "FileOperationError" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConfigurationError", - "type": "Class", - "start_line": 121, - "end_line": 126, - "tags": { - "PURPOSE": "\u041e\u0448\u0438\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430." - }, - "relations": [ - { - "type": "INHERITS_FROM", - "target": "SupersetToolError" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 137)", + "Unclosed Anchor: [DEF:NetworkError:Class] started at line 137", + "Unclosed Anchor: [DEF:NetworkError:Class] started at line 137" + ] } } ], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Unclosed Anchor at end of file (started line 1)", + "Unclosed Anchor: [DEF:superset_tool.exceptions:Module] started at line 1" + ] } }, { @@ -893,7 +1321,7 @@ ], "children": [ { - "name": "SupersetConfig.validate_auth", + "name": "validate_auth", "type": "Function", "start_line": 28, "end_line": 40, @@ -907,12 +1335,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetConfig.normalize_base_url", + "name": "normalize_base_url", "type": "Function", "start_line": 42, "end_line": 57, @@ -926,8 +1358,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -952,7 +1388,7 @@ ], "children": [ { - "name": "DatabaseConfig.validate_config", + "name": "validate_config", "type": "Function", "start_line": 70, "end_line": 81, @@ -966,8 +1402,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -1030,7 +1470,7 @@ ], "children": [ { - "name": "SupersetClient.__init__", + "name": "__init__", "type": "Function", "start_line": 32, "end_line": 51, @@ -1043,12 +1483,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._validate_config", + "name": "_validate_config", "type": "Function", "start_line": 53, "end_line": 63, @@ -1062,12 +1506,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.headers", + "name": "headers", "type": "Function", "start_line": 67, "end_line": 72, @@ -1079,12 +1527,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.get_dashboards", + "name": "get_dashboards", "type": "Function", "start_line": 74, "end_line": 96, @@ -1108,12 +1560,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.export_dashboard", + "name": "export_dashboard", "type": "Function", "start_line": 98, "end_line": 121, @@ -1133,12 +1589,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.import_dashboard", + "name": "import_dashboard", "type": "Function", "start_line": 123, "end_line": 155, @@ -1166,12 +1626,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._resolve_target_id_for_delete", + "name": "_resolve_target_id_for_delete", "type": "Function", "start_line": 157, "end_line": 180, @@ -1186,12 +1650,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._do_import", + "name": "_do_import", "type": "Function", "start_line": 182, "end_line": 203, @@ -1206,12 +1674,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.delete_dashboard", + "name": "delete_dashboard", "type": "Function", "start_line": 205, "end_line": 221, @@ -1230,12 +1702,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._extract_dashboard_id_from_zip", + "name": "_extract_dashboard_id_from_zip", "type": "Function", "start_line": 223, "end_line": 244, @@ -1250,12 +1726,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._extract_dashboard_slug_from_zip", + "name": "_extract_dashboard_slug_from_zip", "type": "Function", "start_line": 246, "end_line": 267, @@ -1270,12 +1750,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._validate_export_response", + "name": "_validate_export_response", "type": "Function", "start_line": 269, "end_line": 283, @@ -1289,12 +1773,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._resolve_export_filename", + "name": "_resolve_export_filename", "type": "Function", "start_line": 285, "end_line": 301, @@ -1308,12 +1796,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._validate_query_params", + "name": "_validate_query_params", "type": "Function", "start_line": 303, "end_line": 313, @@ -1327,12 +1819,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._fetch_total_object_count", + "name": "_fetch_total_object_count", "type": "Function", "start_line": 315, "end_line": 329, @@ -1347,12 +1843,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._fetch_all_pages", + "name": "_fetch_all_pages", "type": "Function", "start_line": 331, "end_line": 343, @@ -1367,12 +1867,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient._validate_import_file", + "name": "_validate_import_file", "type": "Function", "start_line": 345, "end_line": 359, @@ -1386,12 +1890,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.get_datasets", + "name": "get_datasets", "type": "Function", "start_line": 361, "end_line": 382, @@ -1415,12 +1923,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.get_databases", + "name": "get_databases", "type": "Function", "start_line": 384, "end_line": 406, @@ -1444,12 +1956,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.get_dataset", + "name": "get_dataset", "type": "Function", "start_line": 408, "end_line": 423, @@ -1469,12 +1985,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.get_database", + "name": "get_database", "type": "Function", "start_line": 425, "end_line": 440, @@ -1494,12 +2014,16 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "SupersetClient.update_dataset", + "name": "update_dataset", "type": "Function", "start_line": 442, "end_line": 464, @@ -1519,8 +2043,12 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -1604,8 +2132,11 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -1662,8 +2193,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1678,8 +2213,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1693,8 +2238,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1708,8 +2263,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1723,8 +2288,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1738,8 +2313,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1753,8 +2338,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1768,8 +2363,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -1824,8 +2429,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1841,8 +2453,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1859,8 +2478,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1877,8 +2503,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1917,8 +2550,15 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1934,8 +2574,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1952,8 +2599,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1974,8 +2628,15 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -1990,8 +2651,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2007,8 +2675,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2024,8 +2699,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2041,8 +2723,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2058,8 +2747,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -2116,8 +2812,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2132,8 +2838,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2150,8 +2866,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2165,8 +2888,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2183,8 +2916,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2199,8 +2942,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2215,8 +2968,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2233,8 +2996,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2250,8 +3023,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2267,8 +3050,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2284,8 +3077,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -2326,8 +3129,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2343,8 +3153,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2360,8 +3177,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2376,8 +3200,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2393,8 +3224,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2425,8 +3263,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -2487,8 +3332,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2507,8 +3356,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -2540,8 +3393,18 @@ ], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -2573,87 +3436,6 @@ "issues": [] } }, - { - "name": "handleSort", - "type": "Function", - "start_line": 65, - "end_line": null, - "tags": { - "PURPOSE": "Toggles sort direction or changes sort column." - }, - "relations": [], - "children": [ - { - "name": "handleSelectionChange", - "type": "Function", - "start_line": 68, - "end_line": null, - "tags": { - "PURPOSE": "Handles individual checkbox changes." - }, - "relations": [], - "children": [ - { - "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" - ] - } - } - ], - "compliance": { - "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": false, - "issues": [ - "Unclosed Anchor at end of file (started line 65)", - "Unclosed Anchor: [DEF:handleSort:Function] started at line 65" - ] - } - }, { "name": "main", "type": "Module", @@ -2713,8 +3495,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -2729,8 +3516,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -2852,8 +3644,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -2867,8 +3664,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -2916,8 +3718,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -2932,8 +3739,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -2967,8 +3779,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -2984,8 +3801,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3001,8 +3823,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3016,8 +3843,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3067,8 +3899,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @PRE" + ] } }, { @@ -3084,8 +3919,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @PRE" + ] } }, { @@ -3099,8 +3937,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3114,8 +3957,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3129,8 +3977,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3144,8 +3997,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3159,8 +4017,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3175,8 +4038,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3210,8 +4076,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3225,8 +4096,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3240,8 +4116,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3344,8 +4225,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3360,8 +4246,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3397,8 +4288,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3412,8 +4308,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3427,8 +4328,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3443,8 +4349,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3459,8 +4370,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3475,8 +4391,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3490,8 +4411,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3524,8 +4450,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3539,8 +4470,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3574,8 +4510,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3589,8 +4530,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3623,8 +4569,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3638,8 +4589,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3653,8 +4609,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3668,8 +4629,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3683,8 +4649,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3698,8 +4669,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3750,8 +4726,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3765,8 +4746,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3800,8 +4786,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3815,8 +4806,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3830,8 +4826,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3845,8 +4846,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -3897,8 +4903,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3912,8 +4923,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3927,8 +4943,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3942,8 +4963,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3957,8 +4983,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -3972,8 +5003,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4028,8 +5064,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4043,8 +5084,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4058,8 +5104,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4073,8 +5124,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4088,8 +5144,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4103,8 +5164,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4118,8 +5184,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4133,8 +5204,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4167,8 +5243,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4182,8 +5263,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4197,8 +5283,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4233,8 +5324,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4248,8 +5344,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4284,8 +5385,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4318,8 +5424,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4352,8 +5463,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4367,8 +5483,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4401,8 +5522,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4416,8 +5542,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4524,8 +5655,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4539,8 +5675,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -4554,8 +5695,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -4707,8 +5853,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4724,8 +5877,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4741,8 +5904,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4758,8 +5928,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4774,8 +5954,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -4846,8 +6036,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4863,8 +6057,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4880,8 +6081,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4895,8 +6103,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4911,8 +6129,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4928,8 +6156,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4945,8 +6180,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4961,8 +6206,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4977,8 +6232,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -4994,8 +6259,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5012,8 +6284,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5029,8 +6308,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -5080,8 +6366,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -5095,8 +6388,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -5110,8 +6410,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -5126,8 +6433,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -5142,8 +6456,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -5375,8 +6696,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5392,8 +6720,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5409,8 +6742,13 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -5474,8 +6812,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5492,8 +6837,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5559,8 +6907,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5574,8 +6929,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5590,8 +6952,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5606,8 +6975,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5623,8 +6999,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5639,8 +7022,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -5656,8 +7046,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -5707,8 +7104,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -5722,8 +7126,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -5808,8 +7222,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -5822,7 +7239,7 @@ "name": "TaskPersistenceModule", "type": "Module", "start_line": 1, - "end_line": 143, + "end_line": 148, "tags": { "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage", "PURPOSE": "Handles the persistence of tasks using SQLAlchemy and the tasks.db database.", @@ -5836,7 +7253,7 @@ "name": "TaskPersistenceService", "type": "Class", "start_line": 20, - "end_line": 142, + "end_line": 147, "tags": { "SEMANTICS": "persistence, service, database, sqlalchemy", "PURPOSE": "Provides methods to save and load tasks from the tasks.db database using SQLAlchemy." @@ -5844,10 +7261,31 @@ "relations": [], "children": [ { - "name": "TaskPersistenceService.persist_task", + "name": "__init__", "type": "Function", - "start_line": 28, - "end_line": 69, + "start_line": 24, + "end_line": 31, + "tags": { + "PURPOSE": "Initializes the persistence service.", + "PRE": "None.", + "POST": "Service is ready." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + }, + { + "name": "persist_task", + "type": "Function", + "start_line": 33, + "end_line": 74, "tags": { "PURPOSE": "Persists or updates a single task in the database.", "PARAM": "task (Task) - The task object to persist." @@ -5855,15 +7293,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { - "name": "TaskPersistenceService.persist_tasks", + "name": "persist_tasks", "type": "Function", - "start_line": 71, - "end_line": 77, + "start_line": 76, + "end_line": 82, "tags": { "PURPOSE": "Persists multiple tasks.", "PARAM": "tasks (List[Task]) - The list of tasks to persist." @@ -5871,15 +7316,25 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskPersistenceService.load_tasks", + "name": "load_tasks", "type": "Function", - "start_line": 79, - "end_line": 122, + "start_line": 84, + "end_line": 127, "tags": { "PURPOSE": "Loads tasks from the database.", "PARAM": "status (Optional[TaskStatus]) - Filter by status.", @@ -5888,15 +7343,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { - "name": "TaskPersistenceService.delete_tasks", + "name": "delete_tasks", "type": "Function", - "start_line": 124, - "end_line": 140, + "start_line": 129, + "end_line": 145, "tags": { "PURPOSE": "Deletes specific tasks from the database.", "PARAM": "task_ids (List[str]) - List of task IDs to delete." @@ -5904,8 +7366,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -5947,7 +7416,7 @@ "relations": [], "children": [ { - "name": "TaskManager.__init__", + "name": "__init__", "type": "Function", "start_line": 28, "end_line": 49, @@ -5965,7 +7434,7 @@ } }, { - "name": "TaskManager.create_task", + "name": "create_task", "type": "Function", "start_line": 51, "end_line": 78, @@ -5985,7 +7454,7 @@ } }, { - "name": "TaskManager._run_task", + "name": "_run_task", "type": "Function", "start_line": 80, "end_line": 120, @@ -6003,7 +7472,7 @@ } }, { - "name": "TaskManager.resolve_task", + "name": "resolve_task", "type": "Function", "start_line": 122, "end_line": 144, @@ -6022,7 +7491,7 @@ } }, { - "name": "TaskManager.wait_for_resolution", + "name": "wait_for_resolution", "type": "Function", "start_line": 146, "end_line": 165, @@ -6040,7 +7509,7 @@ } }, { - "name": "TaskManager.wait_for_input", + "name": "wait_for_input", "type": "Function", "start_line": 167, "end_line": 185, @@ -6058,7 +7527,7 @@ } }, { - "name": "TaskManager.get_task", + "name": "get_task", "type": "Function", "start_line": 187, "end_line": 193, @@ -6070,12 +7539,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.get_all_tasks", + "name": "get_all_tasks", "type": "Function", "start_line": 195, "end_line": 200, @@ -6086,12 +7565,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.get_tasks", + "name": "get_tasks", "type": "Function", "start_line": 202, "end_line": 217, @@ -6105,12 +7594,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.get_task_logs", + "name": "get_task_logs", "type": "Function", "start_line": 219, "end_line": 226, @@ -6122,12 +7615,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager._add_log", + "name": "_add_log", "type": "Function", "start_line": 228, "end_line": 249, @@ -6140,12 +7643,16 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.subscribe_logs", + "name": "subscribe_logs", "type": "Function", "start_line": 251, "end_line": 261, @@ -6157,12 +7664,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.unsubscribe_logs", + "name": "unsubscribe_logs", "type": "Function", "start_line": 263, "end_line": 273, @@ -6173,12 +7690,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.load_persisted_tasks", + "name": "load_persisted_tasks", "type": "Function", "start_line": 275, "end_line": 282, @@ -6188,12 +7715,22 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { - "name": "TaskManager.await_input", + "name": "await_input", "type": "Function", "start_line": 284, "end_line": 304, @@ -6212,7 +7749,7 @@ } }, { - "name": "TaskManager.resume_task_with_password", + "name": "resume_task_with_password", "type": "Function", "start_line": 306, "end_line": 333, @@ -6231,7 +7768,7 @@ } }, { - "name": "TaskManager.clear_tasks", + "name": "clear_tasks", "type": "Function", "start_line": 335, "end_line": 373, @@ -6243,8 +7780,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } } ], @@ -6318,7 +7862,7 @@ "relations": [], "children": [ { - "name": "Task.__init__", + "name": "__init__", "type": "Function", "start_line": 56, "end_line": 65, @@ -6331,8 +7875,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -6351,7 +7899,7 @@ "name": "TaskCleanupModule", "type": "Module", "start_line": 1, - "end_line": 40, + "end_line": 47, "tags": { "SEMANTICS": "task, cleanup, retention", "PURPOSE": "Implements task cleanup and retention policies.", @@ -6364,19 +7912,42 @@ "name": "TaskCleanupService", "type": "Class", "start_line": 12, - "end_line": 39, + "end_line": 46, "tags": { "PURPOSE": "Provides methods to clean up old task records." }, "relations": [], "children": [ { - "name": "TaskCleanupService.run_cleanup", + "name": "__init__", "type": "Function", - "start_line": 19, - "end_line": 37, + "start_line": 15, + "end_line": 22, "tags": { - "PURPOSE": "Deletes tasks older than the configured retention period." + "PURPOSE": "Initializes the cleanup service with dependencies.", + "PRE": "persistence_service and config_manager are valid.", + "POST": "Cleanup service is ready." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] + } + }, + { + "name": "run_cleanup", + "type": "Function", + "start_line": 24, + "end_line": 44, + "tags": { + "PURPOSE": "Deletes tasks older than the configured retention period.", + "PRE": "Config manager has valid settings.", + "POST": "Old tasks are deleted from persistence." }, "relations": [], "children": [], @@ -6613,8 +8184,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6629,8 +8207,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6646,8 +8231,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -6692,8 +8284,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6711,8 +8306,11 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -6815,8 +8413,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6830,8 +8435,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6845,8 +8457,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -6890,8 +8509,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6907,8 +8533,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6923,8 +8556,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6940,8 +8580,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6957,8 +8604,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6973,8 +8627,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -6990,8 +8651,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -7007,8 +8675,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -7294,8 +8969,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -7309,8 +8994,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -7326,8 +9021,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -7423,8 +9128,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -7438,8 +9153,15 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] } }, { @@ -7457,8 +9179,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -7476,8 +9202,12 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -7527,8 +9257,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { @@ -7559,8 +9299,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } } ], @@ -7610,8 +9360,18 @@ "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager.", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Belief State Logging: Function should use belief_scope context manager." + ] } }, { diff --git a/specs/project_map.md b/specs/project_map.md index 92a3341..7310bd1 100644 --- a/specs/project_map.md +++ b/specs/project_map.md @@ -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. diff --git a/superset_tool/client.py b/superset_tool/client.py index 3ca95ba..66b1ee9 100755 --- a/superset_tool/client.py +++ b/superset_tool/client.py @@ -29,7 +29,7 @@ from superset_tool.utils.network import APIClient # @RELATION: CREATES_INSTANCE_OF -> APIClient # @RELATION: USES -> SupersetConfig class SupersetClient: - # [DEF:SupersetClient.__init__:Function] + # [DEF:__init__:Function] # @PURPOSE: Инициализирует клиент, проверяет конфигурацию и создает сетевой клиент. # @PRE: `config` должен быть валидным объектом SupersetConfig. # @POST: Атрибуты `logger`, `config`, и `network` созданы и готовы к работе. @@ -48,9 +48,9 @@ class SupersetClient: ) self.delete_before_reimport: bool = False self.logger.info("[SupersetClient.__init__][Exit] SupersetClient initialized.") - # [/DEF:SupersetClient.__init__:Function] + # [/DEF:__init__:Function] - # [DEF:SupersetClient._validate_config:Function] + # [DEF:_validate_config:Function] # @PURPOSE: Проверяет, что переданный объект конфигурации имеет корректный тип. # @PRE: `config` должен быть передан. # @POST: Если проверка пройдена, выполнение продолжается. @@ -60,18 +60,18 @@ class SupersetClient: self.logger.debug("[_validate_config][Enter] Validating SupersetConfig.") assert isinstance(config, SupersetConfig), "Конфигурация должна быть экземпляром SupersetConfig" self.logger.debug("[_validate_config][Exit] Config is valid.") - # [/DEF:SupersetClient._validate_config:Function] + # [/DEF:_validate_config:Function] @property def headers(self) -> dict: - # [DEF:SupersetClient.headers:Function] + # [DEF:headers:Function] # @PURPOSE: Возвращает базовые HTTP-заголовки, используемые сетевым клиентом. # @PRE: self.network должен быть инициализирован. # @POST: Возвращаемый словарь содержит актуальные заголовки, включая токен авторизации. return self.network.headers - # [/DEF:SupersetClient.headers:Function] + # [/DEF:headers:Function] - # [DEF:SupersetClient.get_dashboards:Function] + # [DEF:get_dashboards:Function] # @PURPOSE: Получает полный список дашбордов, автоматически обрабатывая пагинацию. # @RELATION: CALLS -> self._fetch_total_object_count # @RELATION: CALLS -> self._fetch_all_pages @@ -93,9 +93,9 @@ class SupersetClient: ) self.logger.info("[get_dashboards][Exit] Found %d dashboards.", total_count) return total_count, paginated_data - # [/DEF:SupersetClient.get_dashboards:Function] + # [/DEF:get_dashboards:Function] - # [DEF:SupersetClient.export_dashboard:Function] + # [DEF:export_dashboard:Function] # @PURPOSE: Экспортирует дашборд в виде ZIP-архива. # @RELATION: CALLS -> self.network.request # @PRE: dashboard_id должен быть положительным целым числом. @@ -118,9 +118,9 @@ class SupersetClient: filename = self._resolve_export_filename(response, dashboard_id) self.logger.info("[export_dashboard][Exit] Exported dashboard %s to %s.", dashboard_id, filename) return response.content, filename - # [/DEF:SupersetClient.export_dashboard:Function] + # [/DEF:export_dashboard:Function] - # [DEF:SupersetClient.import_dashboard:Function] + # [DEF:import_dashboard:Function] # @PURPOSE: Импортирует дашборд из ZIP-файла с возможностью автоматического удаления и повторной попытки при ошибке. # @RELATION: CALLS -> self._do_import # @RELATION: CALLS -> self.delete_dashboard @@ -152,9 +152,9 @@ class SupersetClient: self.delete_dashboard(target_id) self.logger.info("[import_dashboard][State] Deleted dashboard ID %s, retrying import.", target_id) return self._do_import(file_path) - # [/DEF:SupersetClient.import_dashboard:Function] + # [/DEF:import_dashboard:Function] - # [DEF:SupersetClient._resolve_target_id_for_delete:Function] + # [DEF:_resolve_target_id_for_delete:Function] # @PURPOSE: Определяет ID дашборда для удаления, используя ID или slug. # @PARAM: dash_id (Optional[int]) - ID дашборда. # @PARAM: dash_slug (Optional[str]) - Slug дашборда. @@ -177,9 +177,9 @@ class SupersetClient: except Exception as e: self.logger.warning("[_resolve_target_id_for_delete][Warning] Could not resolve slug '%s' to ID: %s", dash_slug, e) return None - # [/DEF:SupersetClient._resolve_target_id_for_delete:Function] + # [/DEF:_resolve_target_id_for_delete:Function] - # [DEF:SupersetClient._do_import:Function] + # [DEF:_do_import:Function] # @PURPOSE: Выполняет один запрос на импорт без обработки исключений. # @PRE: Файл должен существовать. # @POST: Файл успешно загружен, возвращен ответ API. @@ -200,9 +200,9 @@ class SupersetClient: extra_data={"overwrite": "true"}, timeout=self.config.timeout * 2, ) - # [/DEF:SupersetClient._do_import:Function] + # [/DEF:_do_import:Function] - # [DEF:SupersetClient.delete_dashboard:Function] + # [DEF:delete_dashboard:Function] # @PURPOSE: Удаляет дашборд по его ID или slug. # @RELATION: CALLS -> self.network.request # @PRE: dashboard_id должен быть предоставлен. @@ -218,9 +218,9 @@ class SupersetClient: self.logger.info("[delete_dashboard][Success] Dashboard %s deleted.", dashboard_id) else: self.logger.warning("[delete_dashboard][Warning] Unexpected response while deleting %s: %s", dashboard_id, response) - # [/DEF:SupersetClient.delete_dashboard:Function] + # [/DEF:delete_dashboard:Function] - # [DEF:SupersetClient._extract_dashboard_id_from_zip:Function] + # [DEF:_extract_dashboard_id_from_zip:Function] # @PURPOSE: Извлекает ID дашборда из `metadata.yaml` внутри ZIP-архива. # @PARAM: file_name (Union[str, Path]) - Путь к ZIP-файлу. # @PRE: Файл, указанный в `file_name`, должен быть валидным ZIP-архивом. @@ -241,9 +241,9 @@ class SupersetClient: except Exception as exc: self.logger.error("[_extract_dashboard_id_from_zip][Failure] %s", exc, exc_info=True) return None - # [/DEF:SupersetClient._extract_dashboard_id_from_zip:Function] + # [/DEF:_extract_dashboard_id_from_zip:Function] - # [DEF:SupersetClient._extract_dashboard_slug_from_zip:Function] + # [DEF:_extract_dashboard_slug_from_zip:Function] # @PURPOSE: Извлекает slug дашборда из `metadata.yaml` внутри ZIP-архива. # @PARAM: file_name (Union[str, Path]) - Путь к ZIP-файлу. # @PRE: Файл, указанный в `file_name`, должен быть валидным ZIP-архивом. @@ -264,9 +264,9 @@ class SupersetClient: except Exception as exc: self.logger.error("[_extract_dashboard_slug_from_zip][Failure] %s", exc, exc_info=True) return None - # [/DEF:SupersetClient._extract_dashboard_slug_from_zip:Function] + # [/DEF:_extract_dashboard_slug_from_zip:Function] - # [DEF:SupersetClient._validate_export_response:Function] + # [DEF:_validate_export_response:Function] # @PURPOSE: Проверяет, что HTTP-ответ на экспорт является валидным ZIP-архивом. # @PRE: response должен быть объектом requests.Response. # @POST: Проверка пройдена, если ответ является непустым ZIP-архивом. @@ -280,9 +280,9 @@ class SupersetClient: raise ExportError(f"Получен не ZIP-архив (Content-Type: {content_type})") if not response.content: raise ExportError("Получены пустые данные при экспорте") - # [/DEF:SupersetClient._validate_export_response:Function] + # [/DEF:_validate_export_response:Function] - # [DEF:SupersetClient._resolve_export_filename:Function] + # [DEF:_resolve_export_filename:Function] # @PURPOSE: Определяет имя файла для экспорта из заголовков или генерирует его. # @PRE: response должен быть объектом requests.Response. # @POST: Возвращает непустое имя файла. @@ -298,9 +298,9 @@ class SupersetClient: filename = f"dashboard_export_{dashboard_id}_{timestamp}.zip" self.logger.warning("[_resolve_export_filename][Warning] Generated filename: %s", filename) return filename - # [/DEF:SupersetClient._resolve_export_filename:Function] + # [/DEF:_resolve_export_filename:Function] - # [DEF:SupersetClient._validate_query_params:Function] + # [DEF:_validate_query_params:Function] # @PURPOSE: Формирует корректный набор параметров запроса с пагинацией. # @PARAM: query (Optional[Dict]) - Исходные параметры. # @PRE: query, если предоставлен, должен быть словарем. @@ -310,9 +310,9 @@ class SupersetClient: assert query is None or isinstance(query, dict), "[_validate_query_params][PRE] query must be a dictionary or None." base_query = {"page": 0, "page_size": 1000} return {**base_query, **(query or {})} - # [/DEF:SupersetClient._validate_query_params:Function] + # [/DEF:_validate_query_params:Function] - # [DEF:SupersetClient._fetch_total_object_count:Function] + # [DEF:_fetch_total_object_count:Function] # @PURPOSE: Получает общее количество объектов по указанному эндпоинту для пагинации. # @PARAM: endpoint (str) - API эндпоинт. # @PRE: endpoint должен быть непустой строкой. @@ -326,9 +326,9 @@ class SupersetClient: query_params={"page": 0, "page_size": 1}, count_field="count", ) - # [/DEF:SupersetClient._fetch_total_object_count:Function] + # [/DEF:_fetch_total_object_count:Function] - # [DEF:SupersetClient._fetch_all_pages:Function] + # [DEF:_fetch_all_pages:Function] # @PURPOSE: Итерируется по всем страницам пагинированного API и собирает все данные. # @PARAM: endpoint (str) - API эндпоинт. # @PARAM: pagination_options (Dict) - Опции пагинации. @@ -340,9 +340,9 @@ class SupersetClient: assert endpoint and isinstance(endpoint, str), "[_fetch_all_pages][PRE] endpoint must be a non-empty string." assert isinstance(pagination_options, dict), "[_fetch_all_pages][PRE] pagination_options must be a dictionary." return self.network.fetch_paginated_data(endpoint=endpoint, pagination_options=pagination_options) - # [/DEF:SupersetClient._fetch_all_pages:Function] + # [/DEF:_fetch_all_pages:Function] - # [DEF:SupersetClient._validate_import_file:Function] + # [DEF:_validate_import_file:Function] # @PURPOSE: Проверяет, что файл существует, является ZIP-архивом и содержит `metadata.yaml`. # @PRE: zip_path должен быть предоставлен. # @POST: Проверка пройдена, если файл существует, является ZIP и содержит `metadata.yaml`. @@ -356,9 +356,9 @@ class SupersetClient: assert zipfile.is_zipfile(path), f"Файл {zip_path} не является ZIP-архивом" with zipfile.ZipFile(path, "r") as zf: assert any(n.endswith("metadata.yaml") for n in zf.namelist()), f"Архив {zip_path} не содержит 'metadata.yaml'" - # [/DEF:SupersetClient._validate_import_file:Function] + # [/DEF:_validate_import_file:Function] - # [DEF:SupersetClient.get_datasets:Function] + # [DEF:get_datasets:Function] # @PURPOSE: Получает полный список датасетов, автоматически обрабатывая пагинацию. # @RELATION: CALLS -> self._fetch_total_object_count # @RELATION: CALLS -> self._fetch_all_pages @@ -379,9 +379,9 @@ class SupersetClient: ) self.logger.info("[get_datasets][Exit] Found %d datasets.", total_count) return total_count, paginated_data - # [/DEF:SupersetClient.get_datasets:Function] + # [/DEF:get_datasets:Function] - # [DEF:SupersetClient.get_databases:Function] + # [DEF:get_databases:Function] # @PURPOSE: Получает полный список баз данных, автоматически обрабатывая пагинацию. # @RELATION: CALLS -> self._fetch_total_object_count # @RELATION: CALLS -> self._fetch_all_pages @@ -403,9 +403,9 @@ class SupersetClient: ) self.logger.info("[get_databases][Exit] Found %d databases.", total_count) return total_count, paginated_data - # [/DEF:SupersetClient.get_databases:Function] + # [/DEF:get_databases:Function] - # [DEF:SupersetClient.get_dataset:Function] + # [DEF:get_dataset:Function] # @PURPOSE: Получает информацию о конкретном датасете по его ID. # @RELATION: CALLS -> self.network.request # @PARAM: dataset_id (int) - ID датасета. @@ -420,9 +420,9 @@ class SupersetClient: response = cast(Dict, response) self.logger.info("[get_dataset][Exit] Got dataset %s.", dataset_id) return response - # [/DEF:SupersetClient.get_dataset:Function] + # [/DEF:get_dataset:Function] - # [DEF:SupersetClient.get_database:Function] + # [DEF:get_database:Function] # @PURPOSE: Получает информацию о конкретной базе данных по её ID. # @RELATION: CALLS -> self.network.request # @PARAM: database_id (int) - ID базы данных. @@ -437,9 +437,9 @@ class SupersetClient: response = cast(Dict, response) self.logger.info("[get_database][Exit] Got database %s.", database_id) return response - # [/DEF:SupersetClient.get_database:Function] + # [/DEF:get_database:Function] - # [DEF:SupersetClient.update_dataset:Function] + # [DEF:update_dataset:Function] # @PURPOSE: Обновляет данные датасета по его ID. # @RELATION: CALLS -> self.network.request # @PARAM: dataset_id (int) - ID датасета. @@ -461,7 +461,7 @@ class SupersetClient: response = cast(Dict, response) self.logger.info("[update_dataset][Exit] Updated dataset %s.", dataset_id) return response - # [/DEF:SupersetClient.update_dataset:Function] + # [/DEF:update_dataset:Function] # [/DEF:SupersetClient:Class] diff --git a/superset_tool/exceptions.py b/superset_tool/exceptions.py index b28208d..901b5ed 100755 --- a/superset_tool/exceptions.py +++ b/superset_tool/exceptions.py @@ -14,9 +14,14 @@ from typing import Optional, Dict, Any, Union # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Optional[Dict[str, Any]]) - Дополнительный контекст ошибки. class SupersetToolError(Exception): + # [DEF:__init__:Function] + # @PURPOSE: Initializes the base tool error. + # @PRE: message is a string, context is optional dict. + # @POST: Error is initialized with combined message and context. def __init__(self, message: str, context: Optional[Dict[str, Any]] = None): self.context = context or {} super().__init__(f"{message} | Context: {self.context}") + # [/DEF:__init__:Function] # [/DEF:SupersetToolError:Class] # [DEF:AuthenticationError:Class] @@ -25,8 +30,13 @@ class SupersetToolError(Exception): # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Any) - Дополнительный контекст ошибки. class AuthenticationError(SupersetToolError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes an authentication error. + # @PRE: Optional message and context. + # @POST: Error is initialized with authentication context. def __init__(self, message: str = "Authentication failed", **context: Any): super().__init__(f"[AUTH_FAILURE] {message}", context={"type": "authentication", **context}) + # [/DEF:__init__:Function] # [/DEF:AuthenticationError:Class] # [DEF:PermissionDeniedError:Class] @@ -36,9 +46,14 @@ class AuthenticationError(SupersetToolError): # @PARAM: required_permission (Optional[str]) - Требуемое разрешение. # @PARAM: context (Any) - Дополнительный контекст ошибки. class PermissionDeniedError(AuthenticationError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes a permission denied error. + # @PRE: Optional message, permission string, and context. + # @POST: Error is initialized with permission details. def __init__(self, message: str = "Permission denied", required_permission: Optional[str] = None, **context: Any): full_message = f"Permission denied: {required_permission}" if required_permission else message super().__init__(full_message, context={"required_permission": required_permission, **context}) + # [/DEF:__init__:Function] # [/DEF:PermissionDeniedError:Class] # [DEF:SupersetAPIError:Class] @@ -47,8 +62,13 @@ class PermissionDeniedError(AuthenticationError): # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Any) - Дополнительный контекст ошибки. class SupersetAPIError(SupersetToolError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes a Superset API error. + # @PRE: Optional message and context. + # @POST: Error is initialized with API failure context. def __init__(self, message: str = "Superset API error", **context: Any): super().__init__(f"[API_FAILURE] {message}", context={"type": "api_call", **context}) + # [/DEF:__init__:Function] # [/DEF:SupersetAPIError:Class] # [DEF:ExportError:Class] @@ -57,8 +77,13 @@ class SupersetAPIError(SupersetToolError): # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Any) - Дополнительный контекст ошибки. class ExportError(SupersetAPIError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes an export error. + # @PRE: Optional message and context. + # @POST: Error is initialized with export failure subtype. def __init__(self, message: str = "Dashboard export failed", **context: Any): super().__init__(f"[EXPORT_FAILURE] {message}", context={"subtype": "export", **context}) + # [/DEF:__init__:Function] # [/DEF:ExportError:Class] # [DEF:DashboardNotFoundError:Class] @@ -68,8 +93,13 @@ class ExportError(SupersetAPIError): # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Any) - Дополнительный контекст ошибки. class DashboardNotFoundError(SupersetAPIError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes a dashboard not found error. + # @PRE: dashboard_id_or_slug is provided. + # @POST: Error is initialized with resource identification. def __init__(self, dashboard_id_or_slug: Union[int, str], message: str = "Dashboard not found", **context: Any): super().__init__(f"[NOT_FOUND] Dashboard '{dashboard_id_or_slug}' {message}", context={"subtype": "not_found", "resource_id": dashboard_id_or_slug, **context}) + # [/DEF:__init__:Function] # [/DEF:DashboardNotFoundError:Class] # [DEF:DatasetNotFoundError:Class] @@ -79,8 +109,13 @@ class DashboardNotFoundError(SupersetAPIError): # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Any) - Дополнительный контекст ошибки. class DatasetNotFoundError(SupersetAPIError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes a dataset not found error. + # @PRE: dataset_id_or_slug is provided. + # @POST: Error is initialized with resource identification. def __init__(self, dataset_id_or_slug: Union[int, str], message: str = "Dataset not found", **context: Any): super().__init__(f"[NOT_FOUND] Dataset '{dataset_id_or_slug}' {message}", context={"subtype": "not_found", "resource_id": dataset_id_or_slug, **context}) + # [/DEF:__init__:Function] # [/DEF:DatasetNotFoundError:Class] # [DEF:InvalidZipFormatError:Class] @@ -90,8 +125,13 @@ class DatasetNotFoundError(SupersetAPIError): # @PARAM: file_path (Optional[Union[str, Path]]) - Путь к файлу. # @PARAM: context (Any) - Дополнительный контекст ошибки. class InvalidZipFormatError(SupersetToolError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes an invalid ZIP format error. + # @PRE: Optional message, file path, and context. + # @POST: Error is initialized with file validation context. def __init__(self, message: str = "Invalid ZIP format or content", file_path: Optional[Union[str, Path]] = None, **context: Any): super().__init__(f"[FILE_ERROR] {message}", context={"type": "file_validation", "file_path": str(file_path) if file_path else "N/A", **context}) + # [/DEF:__init__:Function] # [/DEF:InvalidZipFormatError:Class] # [DEF:NetworkError:Class] @@ -100,6 +140,10 @@ class InvalidZipFormatError(SupersetToolError): # @PARAM: message (str) - Сообщение об ошибке. # @PARAM: context (Any) - Дополнительный контекст ошибки. class NetworkError(SupersetToolError): + # [DEF:__init__:Function] + # @PURPOSE: Initializes a network error. + # @PRE: Optional message and context. + # @POST: Error is initialized with network failure context. def __init__(self, message: str = "Network connection failed", **context: Any): super().__init__(f"[NETWORK_FAILURE] {message}", context={"type": "network", **context}) # [/DEF:NetworkError:Class] diff --git a/superset_tool/models.py b/superset_tool/models.py index 59ec4e2..eb9d5b1 100755 --- a/superset_tool/models.py +++ b/superset_tool/models.py @@ -25,7 +25,7 @@ class SupersetConfig(BaseModel): timeout: int = Field(30, description="Таймаут в секундах для HTTP-запросов.") logger: Optional[SupersetLogger] = Field(None, description="Экземпляр логгера для логирования.") - # [DEF:SupersetConfig.validate_auth:Function] + # [DEF:validate_auth:Function] # @PURPOSE: Проверяет, что словарь `auth` содержит все необходимые для аутентификации поля. # @PRE: `v` должен быть словарем. # @POST: Возвращает `v`, если все обязательные поля (`provider`, `username`, `password`, `refresh`) присутствуют. @@ -37,9 +37,9 @@ class SupersetConfig(BaseModel): if not required.issubset(v.keys()): raise ValueError(f"Словарь 'auth' должен содержать поля: {required}. Отсутствующие: {required - v.keys()}") return v - # [/DEF:SupersetConfig.validate_auth:Function] + # [/DEF:validate_auth:Function] - # [DEF:SupersetConfig.normalize_base_url:Function] + # [DEF:normalize_base_url:Function] # @PURPOSE: Нормализует `base_url`, добавляя `/api/v1`, если он отсутствует. # @PRE: `v` должна быть строкой. # @POST: Возвращает нормализованный `v`. @@ -54,7 +54,7 @@ class SupersetConfig(BaseModel): if '/api/v1' not in v: v = f"{v.rstrip('/')}/api/v1" return v - # [/DEF:SupersetConfig.normalize_base_url:Function] + # [/DEF:normalize_base_url:Function] class Config: arbitrary_types_allowed = True @@ -67,7 +67,7 @@ class DatabaseConfig(BaseModel): database_config: Dict[str, Dict[str, Any]] = Field(..., description="Словарь, содержащий 'old' и 'new' конфигурации базы данных.") logger: Optional[SupersetLogger] = Field(None, description="Экземпляр логгера для логирования.") - # [DEF:DatabaseConfig.validate_config:Function] + # [DEF:validate_config:Function] # @PURPOSE: Проверяет, что словарь `database_config` содержит ключи 'old' и 'new'. # @PRE: `v` должен быть словарем. # @POST: Возвращает `v`, если ключи 'old' и 'new' присутствуют. @@ -78,7 +78,7 @@ class DatabaseConfig(BaseModel): if not {'old', 'new'}.issubset(v.keys()): raise ValueError("'database_config' должен содержать ключи 'old' и 'new'.") return v - # [/DEF:DatabaseConfig.validate_config:Function] + # [/DEF:validate_config:Function] class Config: arbitrary_types_allowed = True