MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / DocumentationJob

Class DocumentationJob

codewiki/cli/models/job.py:48–155  ·  view source on GitHub ↗

Represents a documentation generation job. Attributes: job_id: Unique job identifier repository_path: Absolute path to repository repository_name: Repository name output_directory: Output directory path commit_hash: Git commit SHA branch_

Source from the content-addressed store, hash-verified

46
47
48@dataclass
49class LLMConfig:
50 """LLM configuration for a job."""
51
52 main_model: str
53 cluster_model: str
54 base_url: str
55
56
57@dataclass
58class DocumentationJob:
59 """
60 Represents a documentation generation job.
61
62 Attributes:
63 job_id: Unique job identifier
64 repository_path: Absolute path to repository
65 repository_name: Repository name
66 output_directory: Output directory path
67 commit_hash: Git commit SHA
68 branch_name: Git branch name (if applicable)
69 timestamp_start: Job start time
70 timestamp_end: Job end time (if completed)
71 status: Current job status
72 error_message: Error message (if failed)
73 files_generated: List of generated files
74 module_count: Number of modules documented
75 generation_options: Generation options used
76 llm_config: LLM configuration used
77 statistics: Job statistics
78 """
79
80 job_id: str = field(default_factory=lambda: str(uuid.uuid4()))
81 repository_path: str = ""
82 repository_name: str = ""
83 output_directory: str = ""
84 commit_hash: str = ""
85 branch_name: Optional[str] = None
86 timestamp_start: str = field(default_factory=lambda: datetime.now().isoformat())
87 timestamp_end: Optional[str] = None
88 status: JobStatus = JobStatus.PENDING
89 error_message: Optional[str] = None
90 files_generated: List[str] = field(default_factory=list)
91 module_count: int = 0
92 generation_options: GenerationOptions = field(default_factory=GenerationOptions)
93 llm_config: Optional[LLMConfig] = None
94 statistics: JobStatistics = field(default_factory=JobStatistics)
95
96 def start(self):
97 """Mark job as started."""
98 self.status = JobStatus.RUNNING
99 self.timestamp_start = datetime.now().isoformat()
100
101 def complete(self):
102 """Mark job as completed."""
103 self.status = JobStatus.COMPLETED
104 self.timestamp_end = datetime.now().isoformat()
105

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected