parent
65aee1e35d
commit
e9acf78a4a
Binary file not shown.
Binary file not shown.
@ -0,0 +1,58 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
- chartController: ChartController
|
||||
+ startPage()
|
||||
+ displayDataAndChart(data: ProjectData, chart: Chart)
|
||||
+ openOpenRankSegment()
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ getProjectData(): ProjectData
|
||||
}
|
||||
|
||||
class ChartController <<control>> {
|
||||
+ generateChart(data: ProjectData): Chart
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- projectData: List<ProjectData>
|
||||
+ getProjectData(): ProjectData
|
||||
}
|
||||
|
||||
class ProjectData <<entity>> {
|
||||
- id: String
|
||||
- name: String
|
||||
- openRankData: List<Double>
|
||||
+ getId(): String
|
||||
+ getName(): String
|
||||
+ getOpenRankData(): List<Double>
|
||||
}
|
||||
|
||||
class Chart <<entity>> {
|
||||
- type: String
|
||||
- data: Object
|
||||
- title: String
|
||||
+ render(): void
|
||||
+ getType(): String
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> AlgorithmController : "调用"
|
||||
MainUI --> ChartController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController ..> ProjectData : "返回"
|
||||
ChartController ..> Chart : "生成"
|
||||
DateBase "1" *-- "many" ProjectData : "包含"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,135 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- checkUI: CheckUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToCodeAssessmentPage()
|
||||
}
|
||||
|
||||
class CheckUI <<boundary>> {
|
||||
- pylint: Pylint
|
||||
- currentAssessment: CodeAssessment
|
||||
+ showCodeAssessmentPage()
|
||||
+ uploadCodeToBeTested(code: CodeFile): boolean
|
||||
+ displayAssessmentResult(result: AssessmentResult)
|
||||
}
|
||||
|
||||
class Pylint <<control>> {
|
||||
- database: DateBase
|
||||
+ assessCodeQuality(code: CodeFile): AssessmentResult
|
||||
+ generateQualityReport(assessment: AssessmentResult): QualityReport
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- codeAssessments: List<CodeAssessment>
|
||||
- qualityScores: List<QualityScore>
|
||||
- assessmentHistory: List<AssessmentHistory>
|
||||
+ storeCodeScore(assessment: CodeAssessment): boolean
|
||||
+ getAssessmentHistory(codeId: String): List<AssessmentHistory>
|
||||
+ getAverageQualityScore(projectId: String): double
|
||||
}
|
||||
|
||||
class CodeFile <<entity>> {
|
||||
- codeId: String
|
||||
- fileName: String
|
||||
- filePath: String
|
||||
- language: String
|
||||
- content: String
|
||||
- size: long
|
||||
+ getCodeId(): String
|
||||
+ getFileName(): String
|
||||
+ getLanguage(): String
|
||||
+ getContent(): String
|
||||
}
|
||||
|
||||
class AssessmentResult <<entity>> {
|
||||
- assessmentId: String
|
||||
- codeId: String
|
||||
- qualityScore: double
|
||||
- issues: List<CodeIssue>
|
||||
- assessmentTime: Date
|
||||
+ getQualityScore(): double
|
||||
+ getIssues(): List<CodeIssue>
|
||||
+ generateSummary(): String
|
||||
}
|
||||
|
||||
class CodeAssessment <<entity>> {
|
||||
- assessmentId: String
|
||||
- codeFile: CodeFile
|
||||
- result: AssessmentResult
|
||||
- assessmentDate: Date
|
||||
+ getAssessmentId(): String
|
||||
+ getAssessmentDate(): Date
|
||||
+ getResult(): AssessmentResult
|
||||
}
|
||||
|
||||
class CodeIssue <<entity>> {
|
||||
- issueId: String
|
||||
- type: String
|
||||
- severity: String
|
||||
- lineNumber: int
|
||||
- description: String
|
||||
- suggestion: String
|
||||
+ getIssueId(): String
|
||||
+ getType(): String
|
||||
+ getSeverity(): String
|
||||
+ getDescription(): String
|
||||
}
|
||||
|
||||
class QualityScore <<entity>> {
|
||||
- scoreId: String
|
||||
- codeId: String
|
||||
- overallScore: double
|
||||
- maintainabilityScore: double
|
||||
- reliabilityScore: double
|
||||
- efficiencyScore: double
|
||||
+ getOverallScore(): double
|
||||
+ getMaintainabilityScore(): double
|
||||
+ calculateCompositeScore(): double
|
||||
}
|
||||
|
||||
class QualityReport <<entity>> {
|
||||
- reportId: String
|
||||
- assessmentId: String
|
||||
- summary: String
|
||||
- detailedAnalysis: String
|
||||
- recommendations: List<String>
|
||||
+ generateReport(): String
|
||||
+ exportAsPDF(): void
|
||||
}
|
||||
|
||||
class AssessmentHistory <<entity>> {
|
||||
- historyId: String
|
||||
- codeId: String
|
||||
- assessmentDate: Date
|
||||
- qualityScore: double
|
||||
- trend: String
|
||||
+ getHistoryId(): String
|
||||
+ getAssessmentDate(): Date
|
||||
+ getQualityScore(): double
|
||||
+ calculateTrend(): String
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> CheckUI : "跳转"
|
||||
CheckUI --> Pylint : "调用测评"
|
||||
Pylint --> DateBase : "存储分数"
|
||||
Pylint ..> AssessmentResult : "生成"
|
||||
DateBase "1" *-- "many" CodeAssessment : "存储"
|
||||
DateBase "1" *-- "many" QualityScore : "包含"
|
||||
DateBase "1" *-- "many" AssessmentHistory : "记录历史"
|
||||
CodeAssessment "1" *-- "1" CodeFile : "测评"
|
||||
CodeAssessment "1" *-- "1" AssessmentResult : "包含结果"
|
||||
AssessmentResult "1" *-- "many" CodeIssue : "包含问题"
|
||||
AssessmentResult "1" *-- "1" QualityScore : "关联分数"
|
||||
Pylint ..> QualityReport : "生成报告"
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,141 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- webUI: WebUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToNetworkGraphPage()
|
||||
}
|
||||
|
||||
class WebUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
- chartController: ChartController
|
||||
+ showNetworkGraphPage()
|
||||
+ displayNetworkGraph(graph: NetworkGraph)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ getNetworkGraphData(): NetworkData
|
||||
}
|
||||
|
||||
class ChartController <<control>> {
|
||||
+ drawNetworkGraph(data: NetworkData): NetworkGraph
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- developerData: List<DeveloperData>
|
||||
- projectData: List<ProjectData>
|
||||
- relationshipData: List<RelationshipData>
|
||||
+ getDeveloperData(): List<DeveloperData>
|
||||
+ getProjectData(): List<ProjectData>
|
||||
+ getRelationshipData(): List<RelationshipData>
|
||||
}
|
||||
|
||||
class NetworkData <<entity>> {
|
||||
- developers: List<DeveloperData>
|
||||
- projects: List<ProjectData>
|
||||
- relationships: List<RelationshipData>
|
||||
+ getDevelopers(): List<DeveloperData>
|
||||
+ getProjects(): List<ProjectData>
|
||||
+ getRelationships(): List<RelationshipData>
|
||||
}
|
||||
|
||||
class NetworkGraph <<entity>> {
|
||||
- graphId: String
|
||||
- graphType: String
|
||||
- nodes: List<GraphNode>
|
||||
- edges: List<GraphEdge>
|
||||
- layout: GraphLayout
|
||||
+ render(): void
|
||||
+ exportAsImage(format: String): void
|
||||
+ getGraphData(): Object
|
||||
}
|
||||
|
||||
class DeveloperData <<entity>> {
|
||||
- developerId: String
|
||||
- name: String
|
||||
- avatar: String
|
||||
- projects: List<String>
|
||||
+ getDeveloperId(): String
|
||||
+ getName(): String
|
||||
+ getProjects(): List<String>
|
||||
}
|
||||
|
||||
class ProjectData <<entity>> {
|
||||
- projectId: String
|
||||
- name: String
|
||||
- description: String
|
||||
- contributors: List<String>
|
||||
+ getProjectId(): String
|
||||
+ getName(): String
|
||||
+ getContributors(): List<String>
|
||||
}
|
||||
|
||||
class RelationshipData <<entity>> {
|
||||
- sourceId: String
|
||||
- targetId: String
|
||||
- relationshipType: String
|
||||
- strength: double
|
||||
+ getSourceId(): String
|
||||
+ getTargetId(): String
|
||||
+ getRelationshipType(): String
|
||||
+ getStrength(): double
|
||||
}
|
||||
|
||||
class GraphNode <<entity>> {
|
||||
- nodeId: String
|
||||
- nodeType: String
|
||||
- label: String
|
||||
- position: Point
|
||||
- properties: Map<String, Object>
|
||||
+ getNodeId(): String
|
||||
+ getLabel(): String
|
||||
+ getPosition(): Point
|
||||
}
|
||||
|
||||
class GraphEdge <<entity>> {
|
||||
- edgeId: String
|
||||
- sourceNodeId: String
|
||||
- targetNodeId: String
|
||||
- weight: double
|
||||
- label: String
|
||||
+ getSourceNodeId(): String
|
||||
+ getTargetNodeId(): String
|
||||
+ getWeight(): double
|
||||
}
|
||||
|
||||
class GraphLayout <<entity>> {
|
||||
- layoutType: String
|
||||
- parameters: Map<String, Object>
|
||||
- nodePositions: Map<String, Point>
|
||||
+ calculateLayout(nodes: List<GraphNode>, edges: List<GraphEdge>): void
|
||||
+ getNodePosition(nodeId: String): Point
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> WebUI : "跳转"
|
||||
WebUI --> AlgorithmController : "调用"
|
||||
WebUI --> ChartController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController ..> NetworkData : "返回"
|
||||
ChartController ..> NetworkGraph : "生成"
|
||||
DateBase "1" *-- "many" DeveloperData : "包含"
|
||||
DateBase "1" *-- "many" ProjectData : "包含"
|
||||
DateBase "1" *-- "many" RelationshipData : "包含"
|
||||
NetworkData "1" *-- "many" DeveloperData : "包含"
|
||||
NetworkData "1" *-- "many" ProjectData : "包含"
|
||||
NetworkData "1" *-- "many" RelationshipData : "包含"
|
||||
NetworkGraph "1" *-- "many" GraphNode : "包含"
|
||||
NetworkGraph "1" *-- "many" GraphEdge : "包含"
|
||||
NetworkGraph "1" *-- "1" GraphLayout : "使用"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,126 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- dateController: DateController
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ displayPRData(prData: List<PullRequestData>)
|
||||
+ displayIssueData(issueData: List<IssueData>)
|
||||
}
|
||||
|
||||
class DateController <<control>> {
|
||||
- githubApi: GithubApi
|
||||
- database: DateBase
|
||||
+ getProjectIssueData(): List<IssueData>
|
||||
+ getProjectPRData(): List<PullRequestData>
|
||||
+ storeIssueData(issueData: List<IssueData>): boolean
|
||||
+ storePRData(prData: List<PullRequestData>): boolean
|
||||
}
|
||||
|
||||
class GithubApi <<boundary>> {
|
||||
- apiKey: String
|
||||
- baseUrl: String
|
||||
+ requestProjectIssueData(projectId: String): List<IssueData>
|
||||
+ requestProjectPRData(projectId: String): List<PullRequestData>
|
||||
+ authenticate(apiKey: String): boolean
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- issueData: List<IssueData>
|
||||
- prData: List<PullRequestData>
|
||||
- projects: List<Project>
|
||||
+ storeIssueData(issueData: List<IssueData>): boolean
|
||||
+ storePRData(prData: List<PullRequestData>): boolean
|
||||
+ getIssueData(projectId: String): List<IssueData>
|
||||
+ getPRData(projectId: String): List<PullRequestData>
|
||||
}
|
||||
|
||||
class IssueData <<entity>> {
|
||||
- issueId: String
|
||||
- projectId: String
|
||||
- title: String
|
||||
- state: String
|
||||
- creator: String
|
||||
- createdAt: Date
|
||||
- closedAt: Date
|
||||
- labels: List<String>
|
||||
- commentsCount: int
|
||||
+ getIssueId(): String
|
||||
+ getProjectId(): String
|
||||
+ getState(): String
|
||||
+ calculateDuration(): long
|
||||
+ isClosed(): boolean
|
||||
}
|
||||
|
||||
class PullRequestData <<entity>> {
|
||||
- prId: String
|
||||
- projectId: String
|
||||
- title: String
|
||||
- state: String
|
||||
- author: String
|
||||
- createdAt: Date
|
||||
- mergedAt: Date
|
||||
- closedAt: Date
|
||||
- reviewComments: int
|
||||
- commits: int
|
||||
+ getPRId(): String
|
||||
+ getProjectId(): String
|
||||
+ getState(): String
|
||||
+ isMerged(): boolean
|
||||
+ calculateMergeTime(): long
|
||||
}
|
||||
|
||||
class Project <<entity>> {
|
||||
- projectId: String
|
||||
- name: String
|
||||
- repositoryUrl: String
|
||||
- description: String
|
||||
+ getProjectId(): String
|
||||
+ getName(): String
|
||||
+ getRepositoryUrl(): String
|
||||
}
|
||||
|
||||
class IssueStatistics <<entity>> {
|
||||
- projectId: String
|
||||
- totalIssues: int
|
||||
- openIssues: int
|
||||
- closedIssues: int
|
||||
- averageResolutionTime: double
|
||||
- issueTrend: Map<Date, int>
|
||||
+ calculateStatistics(issueData: List<IssueData>): void
|
||||
+ getOpenIssueCount(): int
|
||||
+ getClosedIssueCount(): int
|
||||
}
|
||||
|
||||
class PRStatistics <<entity>> {
|
||||
- projectId: String
|
||||
- totalPRs: int
|
||||
- openPRs: int
|
||||
- mergedPRs: int
|
||||
- averageMergeTime: double
|
||||
- prTrend: Map<Date, int>
|
||||
+ calculateStatistics(prData: List<PullRequestData>): void
|
||||
+ getMergedPRCount(): int
|
||||
+ getOpenPRCount(): int
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DateController : "调用"
|
||||
DateController --> GithubApi : "请求数据"
|
||||
DateController --> DateBase : "存储/查询"
|
||||
GithubApi ..> IssueData : "返回"
|
||||
GithubApi ..> PullRequestData : "返回"
|
||||
DateBase "1" *-- "many" IssueData : "存储"
|
||||
DateBase "1" *-- "many" PullRequestData : "存储"
|
||||
DateBase "1" *-- "many" Project : "包含"
|
||||
IssueStatistics ..> IssueData : "分析"
|
||||
PRStatistics ..> PullRequestData : "分析"
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,163 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- dateController: DateController
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ displayDeveloperData(developerData: List<DeveloperData>)
|
||||
+ displayRepositoryData(repositoryData: List<RepositoryData>)
|
||||
}
|
||||
|
||||
class DateController <<control>> {
|
||||
- githubApi: GithubApi
|
||||
- database: DateBase
|
||||
+ getProjectDeveloperData(): List<DeveloperData>
|
||||
+ getRepositoryData(): List<RepositoryData>
|
||||
+ storeProjectDeveloperData(developerData: List<DeveloperData>): boolean
|
||||
+ storeRepositoryData(repositoryData: List<RepositoryData>): boolean
|
||||
}
|
||||
|
||||
class GithubApi <<boundary>> {
|
||||
- apiKey: String
|
||||
- baseUrl: String
|
||||
+ requestProjectDeveloperData(projectId: String): List<DeveloperData>
|
||||
+ requestRepositoryData(projectId: String): List<RepositoryData>
|
||||
+ authenticate(apiKey: String): boolean
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- developerData: List<DeveloperData>
|
||||
- repositoryData: List<RepositoryData>
|
||||
- organizations: List<Organization>
|
||||
+ storeProjectDeveloperData(developerData: List<DeveloperData>): boolean
|
||||
+ storeRepositoryData(repositoryData: List<RepositoryData>): boolean
|
||||
+ getDeveloperData(projectId: String): List<DeveloperData>
|
||||
+ getRepositoryData(organizationId: String): List<RepositoryData>
|
||||
}
|
||||
|
||||
class DeveloperData <<entity>> {
|
||||
- developerId: String
|
||||
- username: String
|
||||
- email: String
|
||||
- organization: String
|
||||
- repositories: List<String>
|
||||
- joinDate: Date
|
||||
+ getDeveloperId(): String
|
||||
+ getUsername(): String
|
||||
+ getOrganization(): String
|
||||
+ getRepositories(): List<String>
|
||||
}
|
||||
|
||||
class RepositoryData <<entity>> {
|
||||
- repositoryId: String
|
||||
- name: String
|
||||
- description: String
|
||||
- organization: String
|
||||
- createdAt: Date
|
||||
- lastUpdated: Date
|
||||
- language: String
|
||||
+ getRepositoryId(): String
|
||||
+ getName(): String
|
||||
+ getOrganization(): String
|
||||
+ getLanguage(): String
|
||||
}
|
||||
|
||||
class Organization <<entity>> {
|
||||
- organizationId: String
|
||||
- name: String
|
||||
- description: String
|
||||
- memberCount: int
|
||||
- repositoryCount: int
|
||||
+ getOrganizationId(): String
|
||||
+ getName(): String
|
||||
+ getMemberCount(): int
|
||||
+ getRepositoryCount(): int
|
||||
}
|
||||
|
||||
class DeveloperStatistics <<entity>> {
|
||||
- organizationId: String
|
||||
- totalDevelopers: int
|
||||
- activeDevelopers: int
|
||||
- newDevelopersThisMonth: int
|
||||
- developerGrowthRate: double
|
||||
- topLanguages: Map<String, int>
|
||||
+ calculateStatistics(developerData: List<DeveloperData>): void
|
||||
+ getTotalDevelopers(): int
|
||||
+ getDeveloperGrowthRate(): double
|
||||
}
|
||||
|
||||
class RepositoryStatistics <<entity>> {
|
||||
- organizationId: String
|
||||
- totalRepositories: int
|
||||
- publicRepositories: int
|
||||
- privateRepositories: int
|
||||
- newRepositoriesThisMonth: int
|
||||
- repositoryGrowthRate: double
|
||||
- topLanguages: Map<String, int>
|
||||
+ calculateStatistics(repositoryData: List<RepositoryData>): void
|
||||
+ getTotalRepositories(): int
|
||||
+ getRepositoryGrowthRate(): double
|
||||
}
|
||||
|
||||
class LanguageStatistics <<entity>> {
|
||||
- language: String
|
||||
- developerCount: int
|
||||
- repositoryCount: int
|
||||
- popularityScore: double
|
||||
+ getLanguage(): String
|
||||
+ getDeveloperCount(): int
|
||||
+ getRepositoryCount(): int
|
||||
+ calculatePopularityScore(): double
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DateController : "调用"
|
||||
DateController --> GithubApi : "请求数据"
|
||||
DateController --> DateBase : "存储/查询"
|
||||
GithubApi ..> DeveloperData : "返回"
|
||||
GithubApi ..> RepositoryData : "返回"
|
||||
DateBase "1" *-- "many" DeveloperData : "存储"
|
||||
DateBase "1" *-- "many" RepositoryData : "存储"
|
||||
DateBase "1" *-- "many" Organization : "包含"
|
||||
DeveloperStatistics ..> DeveloperData : "分析"
|
||||
RepositoryStatistics ..> RepositoryData : "分析"
|
||||
LanguageStatistics ..> DeveloperData : "关联"
|
||||
LanguageStatistics ..> RepositoryData : "关联"
|
||||
|
||||
note right of DateController::getProjectDeveloperData
|
||||
获取项目开发者数据
|
||||
包括从API获取和存储
|
||||
end note
|
||||
|
||||
note right of DateController::getRepositoryData
|
||||
获取仓库数据
|
||||
包括从API获取和存储
|
||||
end note
|
||||
|
||||
note right of GithubApi::requestProjectDeveloperData
|
||||
调用GitHub API
|
||||
获取项目开发者数据
|
||||
end note
|
||||
|
||||
note right of GithubApi::requestRepositoryData
|
||||
调用GitHub API
|
||||
获取仓库数据
|
||||
end note
|
||||
|
||||
note right of DeveloperStatistics::calculateStatistics
|
||||
计算开发者统计信息
|
||||
包括数量和增长率
|
||||
end note
|
||||
|
||||
note right of RepositoryStatistics::calculateStatistics
|
||||
计算仓库统计信息
|
||||
包括数量和增长率
|
||||
end note
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,143 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- dateController: DateController
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ displayCommitData(commitData: List<CommitData>)
|
||||
+ displayRepositoryStarData(starData: List<RepositoryStarData>)
|
||||
}
|
||||
|
||||
class DateController <<control>> {
|
||||
- githubApi: GithubApi
|
||||
- database: DateBase
|
||||
+ getRepositoryStarData(): List<RepositoryStarData>
|
||||
+ getCommitData(): List<CommitData>
|
||||
+ storeRepositoryStarData(starData: List<RepositoryStarData>): boolean
|
||||
+ storeCommitData(commitData: List<CommitData>): boolean
|
||||
}
|
||||
|
||||
class GithubApi <<boundary>> {
|
||||
- apiKey: String
|
||||
- baseUrl: String
|
||||
+ requestRepositoryStarData(projectId: String): List<RepositoryStarData>
|
||||
+ requestCommitData(projectId: String): List<CommitData>
|
||||
+ authenticate(apiKey: String): boolean
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- repositoryStarData: List<RepositoryStarData>
|
||||
- commitData: List<CommitData>
|
||||
- projects: List<Project>
|
||||
+ storeRepositoryStarData(starData: List<RepositoryStarData>): boolean
|
||||
+ storeCommitData(commitData: List<CommitData>): boolean
|
||||
+ getRepositoryStarData(projectId: String): List<RepositoryStarData>
|
||||
+ getCommitData(projectId: String): List<CommitData>
|
||||
}
|
||||
|
||||
class RepositoryStarData <<entity>> {
|
||||
- repositoryId: String
|
||||
- starCount: int
|
||||
- stargazers: List<Stargazer>
|
||||
- starHistory: Map<Date, int>
|
||||
- date: Date
|
||||
+ getRepositoryId(): String
|
||||
+ getStarCount(): int
|
||||
+ getStargazers(): List<Stargazer>
|
||||
+ calculateStarGrowth(startDate: Date, endDate: Date): int
|
||||
}
|
||||
|
||||
class CommitData <<entity>> {
|
||||
- commitId: String
|
||||
- repositoryId: String
|
||||
- author: String
|
||||
- date: Date
|
||||
- message: String
|
||||
- filesChanged: int
|
||||
- linesAdded: int
|
||||
- linesDeleted: int
|
||||
+ getCommitId(): String
|
||||
+ getRepositoryId(): String
|
||||
+ getAuthor(): String
|
||||
+ getDate(): Date
|
||||
+ getChangeSummary(): String
|
||||
}
|
||||
|
||||
class Project <<entity>> {
|
||||
- projectId: String
|
||||
- name: String
|
||||
- repositoryUrl: String
|
||||
- description: String
|
||||
+ getProjectId(): String
|
||||
+ getName(): String
|
||||
+ getRepositoryUrl(): String
|
||||
}
|
||||
|
||||
class Stargazer <<entity>> {
|
||||
- userId: String
|
||||
- username: String
|
||||
- starredAt: Date
|
||||
+ getUserId(): String
|
||||
+ getUsername(): String
|
||||
+ getStarredAt(): Date
|
||||
}
|
||||
|
||||
class StarStatistics <<entity>> {
|
||||
- repositoryId: String
|
||||
- totalStars: int
|
||||
- starsThisMonth: int
|
||||
- starsThisYear: int
|
||||
- starGrowthRate: double
|
||||
- topStargazers: List<Stargazer>
|
||||
+ calculateStatistics(starData: List<RepositoryStarData>): void
|
||||
+ getStarGrowthRate(): double
|
||||
+ getTopStargazers(count: int): List<Stargazer>
|
||||
}
|
||||
|
||||
class CommitStatistics <<entity>> {
|
||||
- repositoryId: String
|
||||
- totalCommits: int
|
||||
- commitsThisMonth: int
|
||||
- commitsThisYear: int
|
||||
- topContributors: List<Contributor>
|
||||
- commitFrequency: Map<Date, int>
|
||||
+ calculateStatistics(commitData: List<CommitData>): void
|
||||
+ getTotalCommits(): int
|
||||
+ getTopContributors(count: int): List<Contributor>
|
||||
}
|
||||
|
||||
class Contributor <<entity>> {
|
||||
- contributorId: String
|
||||
- username: String
|
||||
- commitCount: int
|
||||
- firstCommit: Date
|
||||
- lastCommit: Date
|
||||
+ getContributorId(): String
|
||||
+ getUsername(): String
|
||||
+ getCommitCount(): int
|
||||
+ getActivityPeriod(): TimeSpan
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DateController : "调用"
|
||||
DateController --> GithubApi : "请求数据"
|
||||
DateController --> DateBase : "存储/查询"
|
||||
GithubApi ..> RepositoryStarData : "返回"
|
||||
GithubApi ..> CommitData : "返回"
|
||||
DateBase "1" *-- "many" RepositoryStarData : "存储"
|
||||
DateBase "1" *-- "many" CommitData : "存储"
|
||||
DateBase "1" *-- "many" Project : "包含"
|
||||
RepositoryStarData "1" *-- "many" Stargazer : "包含"
|
||||
StarStatistics ..> RepositoryStarData : "分析"
|
||||
CommitStatistics ..> CommitData : "分析"
|
||||
CommitStatistics "1" *-- "many" Contributor : "统计"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,102 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- codehubUI: CodehubUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToRepositoryAnalysis()
|
||||
}
|
||||
|
||||
class CodehubUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
+ showRepositoryAnalysisPage()
|
||||
+ displayRepositoryAnalysisResult(result: RepositoryAnalysisResult)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
- pylint: Pylint
|
||||
+ getRepositoryCodeData(): RepositoryAnalysisResult
|
||||
}
|
||||
|
||||
class Pylint <<control>> {
|
||||
+ analyzeRepository(codeData: RepositoryCodeData): RepositoryAnalysisResult
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- repositoryData: List<RepositoryCodeData>
|
||||
+ getRepositoryCodeData(): RepositoryCodeData
|
||||
}
|
||||
|
||||
class RepositoryCodeData <<entity>> {
|
||||
- repositoryId: String
|
||||
- repositoryName: String
|
||||
- codeFiles: List<CodeFile>
|
||||
- commitHistory: List<Commit>
|
||||
- contributors: List<Contributor>
|
||||
+ getRepositoryId(): String
|
||||
+ getRepositoryName(): String
|
||||
+ getCodeFiles(): List<CodeFile>
|
||||
+ getCommitHistory(): List<Commit>
|
||||
}
|
||||
|
||||
class RepositoryAnalysisResult <<entity>> {
|
||||
- repositoryId: String
|
||||
- repositoryName: String
|
||||
- qualityScore: double
|
||||
- activityScore: double
|
||||
- communityScore: double
|
||||
- overallScore: double
|
||||
- analysisMetrics: Map<String, Object>
|
||||
+ getOverallScore(): double
|
||||
+ getDetailedScores(): Map<String, double>
|
||||
+ generateReport(): String
|
||||
}
|
||||
|
||||
class CodeFile <<entity>> {
|
||||
- fileName: String
|
||||
- filePath: String
|
||||
- language: String
|
||||
- size: long
|
||||
- complexity: int
|
||||
+ getComplexity(): int
|
||||
+ getLanguage(): String
|
||||
}
|
||||
|
||||
class Commit <<entity>> {
|
||||
- commitId: String
|
||||
- author: String
|
||||
- date: Date
|
||||
- message: String
|
||||
- changes: int
|
||||
+ getAuthor(): String
|
||||
+ getChanges(): int
|
||||
}
|
||||
|
||||
class Contributor <<entity>> {
|
||||
- contributorId: String
|
||||
- name: String
|
||||
- commitCount: int
|
||||
+ getCommitCount(): int
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> CodehubUI : "跳转"
|
||||
CodehubUI --> AlgorithmController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController --> Pylint : "委托分析"
|
||||
Pylint ..> RepositoryAnalysisResult : "生成"
|
||||
DateBase "1" *-- "many" RepositoryCodeData : "包含"
|
||||
RepositoryCodeData "1" *-- "many" CodeFile : "包含"
|
||||
RepositoryCodeData "1" *-- "many" Commit : "包含"
|
||||
RepositoryCodeData "1" *-- "many" Contributor : "包含"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,76 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- developerUI: DeveloperUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToDeveloperAnalysis()
|
||||
}
|
||||
|
||||
class DeveloperUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
+ showDeveloperAnalysisPage()
|
||||
+ displayDeveloperAnalysisResult(result: DeveloperAnalysisResult)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ getDeveloperContributionData(): DeveloperAnalysisResult
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- developerData: List<DeveloperData>
|
||||
+ getDeveloperData(): DeveloperData
|
||||
}
|
||||
|
||||
class DeveloperData <<entity>> {
|
||||
- developerId: String
|
||||
- developerName: String
|
||||
- contributions: List<Contribution>
|
||||
- commitCount: int
|
||||
- codeLines: int
|
||||
+ getDeveloperId(): String
|
||||
+ getDeveloperName(): String
|
||||
+ getContributions(): List<Contribution>
|
||||
+ calculateContributionScore(): double
|
||||
}
|
||||
|
||||
class DeveloperAnalysisResult <<entity>> {
|
||||
- developerId: String
|
||||
- developerName: String
|
||||
- contributionScore: double
|
||||
- analysisDetails: Map<String, Object>
|
||||
- ranking: int
|
||||
+ getContributionScore(): double
|
||||
+ getAnalysisDetails(): Map<String, Object>
|
||||
+ getRanking(): int
|
||||
+ generateReport(): String
|
||||
}
|
||||
|
||||
class Contribution <<entity>> {
|
||||
- type: String
|
||||
- value: double
|
||||
- date: Date
|
||||
+ getType(): String
|
||||
+ getValue(): double
|
||||
+ getDate(): Date
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DeveloperUI : "跳转"
|
||||
DeveloperUI --> AlgorithmController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController ..> DeveloperAnalysisResult : "生成"
|
||||
DateBase "1" *-- "many" DeveloperData : "包含"
|
||||
DeveloperData "1" *-- "many" Contribution : "包含"
|
||||
DeveloperAnalysisResult ..> DeveloperData : "基于"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,94 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- configUI: ConfigUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToSystemConfigPage()
|
||||
}
|
||||
|
||||
class ConfigUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
- currentConfig: SystemConfig
|
||||
+ showSystemConfigPage()
|
||||
+ displayModificationSuccess(message: String)
|
||||
+ modifyAlgorithmParameters(params: Map<String, Object>)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ modifyAlgorithmParameters(params: Map<String, Object>): boolean
|
||||
+ getCurrentConfig(): SystemConfig
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- systemConfig: SystemConfig
|
||||
- configHistory: List<ConfigHistory>
|
||||
+ getSystemConfig(): SystemConfig
|
||||
+ updateSystemConfig(config: SystemConfig): boolean
|
||||
+ saveConfigHistory(history: ConfigHistory): boolean
|
||||
}
|
||||
|
||||
class SystemConfig <<entity>> {
|
||||
- configId: String
|
||||
- version: String
|
||||
- parameters: Map<String, Object>
|
||||
- lastModified: Date
|
||||
- modifiedBy: String
|
||||
+ getParameter(key: String): Object
|
||||
+ setParameter(key: String, value: Object): void
|
||||
+ getAllParameters(): Map<String, Object>
|
||||
+ validateParameters(): boolean
|
||||
}
|
||||
|
||||
class ConfigHistory <<entity>> {
|
||||
- historyId: String
|
||||
- configId: String
|
||||
- oldValues: Map<String, Object>
|
||||
- newValues: Map<String, Object>
|
||||
- modifiedBy: String
|
||||
- modificationTime: Date
|
||||
+ getChangeDescription(): String
|
||||
+ rollback(): SystemConfig
|
||||
}
|
||||
|
||||
class AlgorithmParameter <<entity>> {
|
||||
- parameterName: String
|
||||
- parameterType: String
|
||||
- defaultValue: Object
|
||||
- minValue: Object
|
||||
- maxValue: Object
|
||||
- description: String
|
||||
+ validateValue(value: Object): boolean
|
||||
+ getDescription(): String
|
||||
}
|
||||
|
||||
class User <<entity>> {
|
||||
- userId: String
|
||||
- username: String
|
||||
- role: String
|
||||
- permissions: List<String>
|
||||
+ getUserId(): String
|
||||
+ getUsername(): String
|
||||
+ hasPermission(permission: String): boolean
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> ConfigUI : "跳转"
|
||||
ConfigUI --> AlgorithmController : "调用"
|
||||
AlgorithmController --> DateBase : "更新"
|
||||
DateBase "1" *-- "1" SystemConfig : "当前配置"
|
||||
DateBase "1" *-- "many" ConfigHistory : "配置历史"
|
||||
SystemConfig "1" *-- "many" AlgorithmParameter : "包含参数"
|
||||
ConfigHistory ..> SystemConfig : "关联"
|
||||
ConfigHistory ..> User : "记录操作者"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,90 @@
|
||||
classDiagram
|
||||
direction TB
|
||||
|
||||
class OpenRankDashboard {
|
||||
-currentTab: string
|
||||
-mode: string
|
||||
-charts: object
|
||||
-mockData: object
|
||||
-projectState: object
|
||||
+init()
|
||||
+setupEventListeners()
|
||||
+setupTabNavigation()
|
||||
+switchTab(tab: string)
|
||||
+switchMode(mode: string)
|
||||
+loadMockData()
|
||||
+initCharts()
|
||||
+generateMockData()
|
||||
}
|
||||
|
||||
class Overview {
|
||||
+updateStats()
|
||||
+updateRankingTable()
|
||||
+initDistributionChart()
|
||||
+initActivityChart()
|
||||
}
|
||||
|
||||
class Repositories {
|
||||
+updateRepositoryGrid()
|
||||
+filterRepositories(filter: string)
|
||||
+onViewRepoDetails(repoName: string)
|
||||
+onViewRepoContributions(repoName: string)
|
||||
+showRepoDetails(owner: string, repo: string)
|
||||
}
|
||||
|
||||
class Developers {
|
||||
+displayDeveloperAnalysis(developers: array)
|
||||
+filterDevelopers(keyword: string)
|
||||
}
|
||||
|
||||
class Network {
|
||||
+initNetworkGraph()
|
||||
}
|
||||
|
||||
class CodeReview {
|
||||
+setupCodeReviewPage()
|
||||
+loadExampleCode()
|
||||
+runCodeLinting()
|
||||
+simulatePylintAnalysis(code: string)
|
||||
+displayLintResults(score: number, issues: array)
|
||||
+resetCodeReviewResults()
|
||||
}
|
||||
|
||||
class Settings {
|
||||
+setupConfigListeners()
|
||||
+updateConfig(id: string, value: any)
|
||||
}
|
||||
|
||||
class ProjectMode {
|
||||
+buildProjectListFromGlobal()
|
||||
+renderProjectList(keyword: string)
|
||||
+renderApproxProject(fullName: string, days: number)
|
||||
+mountProjectView(snapshot: object)
|
||||
+triggerFullProjectCalculation(fullName: string)
|
||||
+autoTriggerFull(fullName: string, days: number)
|
||||
+pollTask(taskId: string, fullName: string, silent: boolean)
|
||||
}
|
||||
|
||||
OpenRankDashboard --> Overview: contains
|
||||
OpenRankDashboard --> Repositories: contains
|
||||
OpenRankDashboard --> Developers: contains
|
||||
OpenRankDashboard --> Network: contains
|
||||
OpenRankDashboard --> CodeReview: contains
|
||||
OpenRankDashboard --> Settings: contains
|
||||
OpenRankDashboard --> ProjectMode: contains
|
||||
|
||||
class DataLoader {
|
||||
+fetchProjectOverview(owner: string, repo: string)
|
||||
+fetchRepoDetails(owner: string, repo: string)
|
||||
+fetchContributors(owner: string, repo: string)
|
||||
}
|
||||
|
||||
class UIHelper {
|
||||
+showNotification(message: string, type: string)
|
||||
+updateLastUpdateTime()
|
||||
+pushURLState()
|
||||
+hydrateFromURL()
|
||||
}
|
||||
|
||||
OpenRankDashboard --> DataLoader: uses
|
||||
OpenRankDashboard --> UIHelper: uses
|
||||
@ -0,0 +1,166 @@
|
||||
classDiagram
|
||||
direction TB
|
||||
|
||||
%% 核心算法类
|
||||
class OpenRankCalculator {
|
||||
- config: OpenRankConfig
|
||||
- graph: Graph
|
||||
- calculationStatus: CalculationStatus
|
||||
+ calculate(activityData: ActivityData[], lastMonthOpenRank: Map~string, number~): Promise~OpenRankResult[]~
|
||||
- buildGraph(activityData: ActivityData[], lastMonthOpenRank: Map~string, number~): void
|
||||
- iterativeCalculation(): Promise~void~
|
||||
- generateResults(): OpenRankResult[]
|
||||
+ getCalculationStatus(): CalculationStatus
|
||||
+ getGraphStats()
|
||||
+ cleanup(): void
|
||||
}
|
||||
|
||||
class ProjectOpenRankCalculator {
|
||||
- config: OpenRankConfig
|
||||
- graph: Graph
|
||||
- calculationStatus: CalculationStatus
|
||||
- weightingFramework: WeightingFramework
|
||||
+ calculateProjectOpenRank(issueData: IssueData[], pullRequestData: PullRequestData[], lastMonthOpenRank: Map~string, number~, repoEvents?: RepoEventActivity[]): Promise~OpenRankResult[]~
|
||||
- buildProjectGraph(issueData: IssueData[], pullRequestData: PullRequestData[], lastMonthOpenRank: Map~string, number~, repoEvents?: RepoEventActivity[]): void
|
||||
- computeCodeImpactPools(pr: any, totalLines: number, filesChanged: number, ...): object
|
||||
}
|
||||
|
||||
class SimpleGraph {
|
||||
+ nodes: Map~string, GraphNode~
|
||||
+ edges: GraphEdge[]
|
||||
- adjacencyList: Map~string, Set~string~~
|
||||
- incomingEdges: Map~string, GraphEdge[]~
|
||||
- outgoingEdges: Map~string, GraphEdge[]~
|
||||
+ addNode(node: GraphNode): void
|
||||
+ addEdge(edge: GraphEdge): void
|
||||
+ getNode(id: string): GraphNode | undefined
|
||||
+ getNeighbors(nodeId: string): GraphNode[]
|
||||
+ getIncomingEdges(nodeId: string): GraphEdge[]
|
||||
+ getOutgoingEdges(nodeId: string): GraphEdge[]
|
||||
+ clear(): void
|
||||
+ getStats()
|
||||
+ isConnected(): boolean
|
||||
+ getDegree(nodeId: string)
|
||||
+ getNodesByType(type: string): GraphNode[]
|
||||
}
|
||||
|
||||
%% 数据收集类
|
||||
class ProjectData {
|
||||
issues: IssueData[]
|
||||
pullRequests: PullRequestData[]
|
||||
}
|
||||
class GitHubDataCollector {
|
||||
- config: GitHubConfig
|
||||
- baseUrl: string
|
||||
+ collectProjectData(repo: GitHubRepo, startDate: Date, endDate: Date): Promise~ProjectData~
|
||||
- listIssues(repo: GitHubRepo, startDate: Date, endDate: Date): Promise~number[]~
|
||||
- listPulls(repo: GitHubRepo, startDate: Date, endDate: Date): Promise~number[]~
|
||||
- collectIssueData(repo: GitHubRepo, issueIds: number[], events: any[]): Promise~IssueData[]~
|
||||
- collectPullRequestData(repo: GitHubRepo, prIds: number[], events: any[]): Promise~PullRequestData[]~
|
||||
}
|
||||
|
||||
%% API服务类
|
||||
class APIServer {
|
||||
- app: Express.Application
|
||||
- calculationCache: Record~string, CalcCacheEntry~
|
||||
- projectCache: Record~string, ProjectSnapshotCacheEntry~
|
||||
- tasks: Record~string, TaskEntry~
|
||||
+ start(): void
|
||||
- cleanupCaches(): void
|
||||
- createTask(): TaskEntry
|
||||
- getTask(id: string): TaskEntry | null
|
||||
- updateTask(id: string, patch: Partial~TaskEntry~): void
|
||||
}
|
||||
|
||||
%% 数据库类
|
||||
class MySQLConnection {
|
||||
+ pool: Pool
|
||||
+ closePool(): Promise~void~
|
||||
}
|
||||
|
||||
%% 接口和类型
|
||||
class ActivityData {
|
||||
platform: PlatformType
|
||||
repoId: number
|
||||
repoName: string
|
||||
orgId?: number
|
||||
orgName?: string
|
||||
actorId: number
|
||||
actorLogin: string
|
||||
issueComment: number
|
||||
openIssue: number
|
||||
openPull: number
|
||||
reviewComment: number
|
||||
mergedPull: number
|
||||
createdAt: Date
|
||||
}
|
||||
|
||||
class IssueData {
|
||||
id: number
|
||||
number?: number
|
||||
platform: PlatformType
|
||||
repoId: number
|
||||
repoName: string
|
||||
title: string
|
||||
authorId: number
|
||||
authorLogin: string
|
||||
createdAt: Date
|
||||
closedAt?: Date
|
||||
state: 'open' | 'closed'
|
||||
activities: any[]
|
||||
reactions: any
|
||||
}
|
||||
|
||||
class PullRequestData {
|
||||
id: number
|
||||
number?: number
|
||||
platform: PlatformType
|
||||
repoId: number
|
||||
repoName: string
|
||||
title: string
|
||||
authorId: number
|
||||
authorLogin: string
|
||||
createdAt: Date
|
||||
mergedAt?: Date
|
||||
closedAt?: Date
|
||||
state: 'open' | 'closed' | 'merged'
|
||||
activities: any[]
|
||||
reactions: any
|
||||
filesChanged?: number
|
||||
additions?: number
|
||||
deletions?: number
|
||||
}
|
||||
|
||||
class GraphNode {
|
||||
id: string
|
||||
type: NodeType
|
||||
platform: PlatformType
|
||||
name: string
|
||||
openrank: number
|
||||
lastOpenrank: number
|
||||
initValue: number
|
||||
retentionFactor: number
|
||||
converged: boolean
|
||||
metadata?: Record~string, any~
|
||||
}
|
||||
|
||||
class GraphEdge {
|
||||
source: string
|
||||
target: string
|
||||
weight: number
|
||||
type: 'activity' | 'belong' | 'reverse_belong' | 'reverse_activity'
|
||||
activityDetails?: any
|
||||
}
|
||||
|
||||
%% 关系
|
||||
OpenRankCalculator --> SimpleGraph: uses
|
||||
ProjectOpenRankCalculator --> SimpleGraph: uses
|
||||
APIServer --> OpenRankCalculator: calls
|
||||
APIServer --> ProjectOpenRankCalculator: calls
|
||||
APIServer --> GitHubDataCollector: uses
|
||||
APIServer --> MySQLConnection: uses
|
||||
OpenRankCalculator --> ActivityData: processes
|
||||
ProjectOpenRankCalculator --> IssueData: processes
|
||||
ProjectOpenRankCalculator --> PullRequestData: processes
|
||||
SimpleGraph --> GraphNode: contains
|
||||
SimpleGraph --> GraphEdge: contains
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue