diff --git a/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.doc b/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.docx similarity index 58% rename from doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.doc rename to doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.docx index 73986ac..63b69be 100644 Binary files a/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.doc and b/doc/软件设计规格说明书-基于软件工厂的群智协作贡献评估系统.docx differ diff --git a/doc/面向项目级协作分析的质量感知OpenRank扩展方法.pdf b/doc/面向项目级协作分析的质量感知OpenRank扩展方法.pdf new file mode 100644 index 0000000..ad0d392 Binary files /dev/null and b/doc/面向项目级协作分析的质量感知OpenRank扩展方法.pdf differ diff --git a/picture/体系结构图.vsdx b/picture/体系结构图.vsdx new file mode 100644 index 0000000..5bbeef2 Binary files /dev/null and b/picture/体系结构图.vsdx differ diff --git a/picture/多语言切换.png b/picture/多语言切换.png deleted file mode 100644 index f432bba..0000000 Binary files a/picture/多语言切换.png and /dev/null differ diff --git a/picture/定时任务.png b/picture/定时任务.png deleted file mode 100644 index ec636d4..0000000 Binary files a/picture/定时任务.png and /dev/null differ diff --git a/picture/指标计算.png b/picture/指标计算.png deleted file mode 100644 index b83d7ff..0000000 Binary files a/picture/指标计算.png and /dev/null differ diff --git a/picture/数据库ER图.puml b/picture/数据库ER图.puml new file mode 100644 index 0000000..af16c05 --- /dev/null +++ b/picture/数据库ER图.puml @@ -0,0 +1,159 @@ +@startuml +!theme vibrant +title ER Diagram for "OpenRank Database System" + +entity "repos" as Repos { + -- Fields -- + * id : BIGINT <> + platform : VARCHAR(32) + full_name : VARCHAR(255) + owner : VARCHAR(128) + name : VARCHAR(128) + language : VARCHAR(64) + description : TEXT + stars : INT + forks : INT + metadata : JSON + updated_at : DATETIME +} + +entity "issues" as Issues { + -- Fields -- + * id : BIGINT <> + platform : VARCHAR(32) + repo_id : BIGINT + repo_full_name : VARCHAR(255) + number : INT + title : TEXT + body_long : LONGTEXT + author_id : BIGINT + author_login : VARCHAR(128) + state : VARCHAR(32) + created_at : DATETIME + closed_at : DATETIME + labels : JSON + assignees : JSON + first_response_hours : INT + assignment_type : VARCHAR(32) + reactions : JSON + activities_count : INT + raw_payload : JSON + updated_at : DATETIME +} + +entity "pull_requests" as PullRequests { + -- Fields -- + * id : BIGINT <> + platform : VARCHAR(32) + repo_id : BIGINT + repo_full_name : VARCHAR(255) + number : INT + title : TEXT + body_long : LONGTEXT + author_id : BIGINT + author_login : VARCHAR(128) + state : VARCHAR(32) + created_at : DATETIME + merged_at : DATETIME + closed_at : DATETIME + labels : JSON + milestone_due : DATETIME + first_response_hours : INT + reactions : JSON + files_changed : INT + additions : INT + deletions : INT + test_files_changed : INT + coverage_delta : FLOAT + core_file_ratio : FLOAT + ci_status : VARCHAR(64) + change_requests : INT + reopened : TINYINT(1) + reverted : TINYINT(1) + activities_count : INT + raw_payload : JSON + updated_at : DATETIME +} + +entity "activities" as Activities { + -- Fields -- + * item_type : ENUM('issue','pr') <> + * item_id : BIGINT <> + * actor_id : BIGINT <> + platform : VARCHAR(32) + repo_id : BIGINT + item_number : INT + actor_login : VARCHAR(255) + open_count : INT + comment_count : INT + review_count : INT + close_count : INT + review_comment_count : INT + commit_count : INT + activity_meta : JSON + created_at : TIMESTAMP + updated_at : TIMESTAMP +} + +entity "repo_events" as RepoEvents { + -- Fields -- + * id : BIGINT <> + platform : VARCHAR(32) + repo_id : BIGINT + actor_id : BIGINT + actor_login : VARCHAR(128) + event_type : VARCHAR(32) + count : INT + event_time : DATETIME + created_at : DATETIME +} + +entity "raw_payloads" as RawPayloads { + -- Fields -- + * id : BIGINT <> + platform : VARCHAR(32) + repo_id : BIGINT + resource_type : VARCHAR(32) + resource_id : BIGINT + payload : JSON + fetched_at : DATETIME +} + +entity "fetch_runs" as FetchRuns { + -- Fields -- + * id : BIGINT <> + platform : VARCHAR(32) + repo_id : BIGINT + repo_full_name : VARCHAR(255) + source : ENUM('network','db') + start_time : DATETIME + end_time : DATETIME + start_date : DATE + end_date : DATE + token_used : TINYINT(1) + success : TINYINT(1) + note : TEXT + stats : JSON + created_at : DATETIME + issues : INT + pull_requests : INT + activities : INT + meta : JSON +} + +' 关系定义:一个仓库可以有多个issues、pull_requests、activities等 +Repos ||--o{ Issues : "repo_id"} +Repos ||--o{ PullRequests : "repo_id"} +Repos ||--o{ Activities : "repo_id"} +Repos ||--o{ RepoEvents : "repo_id"} +Repos ||--o{ RawPayloads : "repo_id"} +Repos ||--o{ FetchRuns : "repo_id"} + +' activities表通过复合主键关联issues和pull_requests +Issues ||--o{ Activities : "item_id (item_type='issue')"} +PullRequests ||--o{ Activities : "item_id (item_type='pr')"} + +' fetch_runs表记录数据抓取任务,与仓库关联 + + +@enduml \ No newline at end of file diff --git a/picture/数据接入与存储.png b/picture/数据接入与存储.png deleted file mode 100644 index e66df13..0000000 Binary files a/picture/数据接入与存储.png and /dev/null differ diff --git a/picture/界面跳转图.plantuml b/picture/界面跳转图.puml similarity index 100% rename from picture/界面跳转图.plantuml rename to picture/界面跳转图.puml diff --git a/picture/设计类图/总览信息.puml b/picture/设计类图/总览信息.puml new file mode 100644 index 0000000..9fc6383 --- /dev/null +++ b/picture/设计类图/总览信息.puml @@ -0,0 +1,58 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - algorithmController: AlgorithmController + - chartController: ChartController + + startPage() + + displayDataAndChart(data: ProjectData, chart: Chart) + + openOpenRankSegment() +} + +class AlgorithmController <> { + - database: DateBase + + getProjectData(): ProjectData +} + +class ChartController <> { + + generateChart(data: ProjectData): Chart +} + +class DateBase <> { + - projectData: List + + getProjectData(): ProjectData +} + +class ProjectData <> { + - id: String + - name: String + - openRankData: List + + getId(): String + + getName(): String + + getOpenRankData(): List +} + +class Chart <> { + - 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 \ No newline at end of file diff --git a/picture/设计类图/生成网络图谱.puml b/picture/设计类图/生成网络图谱.puml new file mode 100644 index 0000000..742b120 --- /dev/null +++ b/picture/设计类图/生成网络图谱.puml @@ -0,0 +1,141 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - webUI: WebUI + + startPage() + + showMainInterface() + + navigateToNetworkGraphPage() +} + +class WebUI <> { + - algorithmController: AlgorithmController + - chartController: ChartController + + showNetworkGraphPage() + + displayNetworkGraph(graph: NetworkGraph) +} + +class AlgorithmController <> { + - database: DateBase + + getNetworkGraphData(): NetworkData +} + +class ChartController <> { + + drawNetworkGraph(data: NetworkData): NetworkGraph +} + +class DateBase <> { + - developerData: List + - projectData: List + - relationshipData: List + + getDeveloperData(): List + + getProjectData(): List + + getRelationshipData(): List +} + +class NetworkData <> { + - developers: List + - projects: List + - relationships: List + + getDevelopers(): List + + getProjects(): List + + getRelationships(): List +} + +class NetworkGraph <> { + - graphId: String + - graphType: String + - nodes: List + - edges: List + - layout: GraphLayout + + render(): void + + exportAsImage(format: String): void + + getGraphData(): Object +} + +class DeveloperData <> { + - developerId: String + - name: String + - avatar: String + - projects: List + + getDeveloperId(): String + + getName(): String + + getProjects(): List +} + +class ProjectData <> { + - projectId: String + - name: String + - description: String + - contributors: List + + getProjectId(): String + + getName(): String + + getContributors(): List +} + +class RelationshipData <> { + - sourceId: String + - targetId: String + - relationshipType: String + - strength: double + + getSourceId(): String + + getTargetId(): String + + getRelationshipType(): String + + getStrength(): double +} + +class GraphNode <> { + - nodeId: String + - nodeType: String + - label: String + - position: Point + - properties: Map + + getNodeId(): String + + getLabel(): String + + getPosition(): Point +} + +class GraphEdge <> { + - edgeId: String + - sourceNodeId: String + - targetNodeId: String + - weight: double + - label: String + + getSourceNodeId(): String + + getTargetNodeId(): String + + getWeight(): double +} + +class GraphLayout <> { + - layoutType: String + - parameters: Map + - nodePositions: Map + + calculateLayout(nodes: List, edges: List): 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 \ No newline at end of file diff --git a/picture/设计类图/统计issue和统计pr.puml b/picture/设计类图/统计issue和统计pr.puml new file mode 100644 index 0000000..1420b71 --- /dev/null +++ b/picture/设计类图/统计issue和统计pr.puml @@ -0,0 +1,126 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - dateController: DateController + + startPage() + + showMainInterface() + + displayPRData(prData: List) + + displayIssueData(issueData: List) +} + +class DateController <> { + - githubApi: GithubApi + - database: DateBase + + getProjectIssueData(): List + + getProjectPRData(): List + + storeIssueData(issueData: List): boolean + + storePRData(prData: List): boolean +} + +class GithubApi <> { + - apiKey: String + - baseUrl: String + + requestProjectIssueData(projectId: String): List + + requestProjectPRData(projectId: String): List + + authenticate(apiKey: String): boolean +} + +class DateBase <> { + - issueData: List + - prData: List + - projects: List + + storeIssueData(issueData: List): boolean + + storePRData(prData: List): boolean + + getIssueData(projectId: String): List + + getPRData(projectId: String): List +} + +class IssueData <> { + - issueId: String + - projectId: String + - title: String + - state: String + - creator: String + - createdAt: Date + - closedAt: Date + - labels: List + - commentsCount: int + + getIssueId(): String + + getProjectId(): String + + getState(): String + + calculateDuration(): long + + isClosed(): boolean +} + +class PullRequestData <> { + - 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 <> { + - projectId: String + - name: String + - repositoryUrl: String + - description: String + + getProjectId(): String + + getName(): String + + getRepositoryUrl(): String +} + +class IssueStatistics <> { + - projectId: String + - totalIssues: int + - openIssues: int + - closedIssues: int + - averageResolutionTime: double + - issueTrend: Map + + calculateStatistics(issueData: List): void + + getOpenIssueCount(): int + + getClosedIssueCount(): int +} + +class PRStatistics <> { + - projectId: String + - totalPRs: int + - openPRs: int + - mergedPRs: int + - averageMergeTime: double + - prTrend: Map + + calculateStatistics(prData: List): 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 \ No newline at end of file diff --git a/picture/设计类图/统计仓库数量和开发者数量.puml b/picture/设计类图/统计仓库数量和开发者数量.puml new file mode 100644 index 0000000..4c9657a --- /dev/null +++ b/picture/设计类图/统计仓库数量和开发者数量.puml @@ -0,0 +1,163 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - dateController: DateController + + startPage() + + showMainInterface() + + displayDeveloperData(developerData: List) + + displayRepositoryData(repositoryData: List) +} + +class DateController <> { + - githubApi: GithubApi + - database: DateBase + + getProjectDeveloperData(): List + + getRepositoryData(): List + + storeProjectDeveloperData(developerData: List): boolean + + storeRepositoryData(repositoryData: List): boolean +} + +class GithubApi <> { + - apiKey: String + - baseUrl: String + + requestProjectDeveloperData(projectId: String): List + + requestRepositoryData(projectId: String): List + + authenticate(apiKey: String): boolean +} + +class DateBase <> { + - developerData: List + - repositoryData: List + - organizations: List + + storeProjectDeveloperData(developerData: List): boolean + + storeRepositoryData(repositoryData: List): boolean + + getDeveloperData(projectId: String): List + + getRepositoryData(organizationId: String): List +} + +class DeveloperData <> { + - developerId: String + - username: String + - email: String + - organization: String + - repositories: List + - joinDate: Date + + getDeveloperId(): String + + getUsername(): String + + getOrganization(): String + + getRepositories(): List +} + +class RepositoryData <> { + - repositoryId: String + - name: String + - description: String + - organization: String + - createdAt: Date + - lastUpdated: Date + - language: String + + getRepositoryId(): String + + getName(): String + + getOrganization(): String + + getLanguage(): String +} + +class Organization <> { + - organizationId: String + - name: String + - description: String + - memberCount: int + - repositoryCount: int + + getOrganizationId(): String + + getName(): String + + getMemberCount(): int + + getRepositoryCount(): int +} + +class DeveloperStatistics <> { + - organizationId: String + - totalDevelopers: int + - activeDevelopers: int + - newDevelopersThisMonth: int + - developerGrowthRate: double + - topLanguages: Map + + calculateStatistics(developerData: List): void + + getTotalDevelopers(): int + + getDeveloperGrowthRate(): double +} + +class RepositoryStatistics <> { + - organizationId: String + - totalRepositories: int + - publicRepositories: int + - privateRepositories: int + - newRepositoriesThisMonth: int + - repositoryGrowthRate: double + - topLanguages: Map + + calculateStatistics(repositoryData: List): void + + getTotalRepositories(): int + + getRepositoryGrowthRate(): double +} + +class LanguageStatistics <> { + - 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 \ No newline at end of file diff --git a/picture/设计类图/统计代码提交和仓库stars.puml b/picture/设计类图/统计代码提交和仓库stars.puml new file mode 100644 index 0000000..ae005db --- /dev/null +++ b/picture/设计类图/统计代码提交和仓库stars.puml @@ -0,0 +1,143 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - dateController: DateController + + startPage() + + showMainInterface() + + displayCommitData(commitData: List) + + displayRepositoryStarData(starData: List) +} + +class DateController <> { + - githubApi: GithubApi + - database: DateBase + + getRepositoryStarData(): List + + getCommitData(): List + + storeRepositoryStarData(starData: List): boolean + + storeCommitData(commitData: List): boolean +} + +class GithubApi <> { + - apiKey: String + - baseUrl: String + + requestRepositoryStarData(projectId: String): List + + requestCommitData(projectId: String): List + + authenticate(apiKey: String): boolean +} + +class DateBase <> { + - repositoryStarData: List + - commitData: List + - projects: List + + storeRepositoryStarData(starData: List): boolean + + storeCommitData(commitData: List): boolean + + getRepositoryStarData(projectId: String): List + + getCommitData(projectId: String): List +} + +class RepositoryStarData <> { + - repositoryId: String + - starCount: int + - stargazers: List + - starHistory: Map + - date: Date + + getRepositoryId(): String + + getStarCount(): int + + getStargazers(): List + + calculateStarGrowth(startDate: Date, endDate: Date): int +} + +class CommitData <> { + - 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 <> { + - projectId: String + - name: String + - repositoryUrl: String + - description: String + + getProjectId(): String + + getName(): String + + getRepositoryUrl(): String +} + +class Stargazer <> { + - userId: String + - username: String + - starredAt: Date + + getUserId(): String + + getUsername(): String + + getStarredAt(): Date +} + +class StarStatistics <> { + - repositoryId: String + - totalStars: int + - starsThisMonth: int + - starsThisYear: int + - starGrowthRate: double + - topStargazers: List + + calculateStatistics(starData: List): void + + getStarGrowthRate(): double + + getTopStargazers(count: int): List +} + +class CommitStatistics <> { + - repositoryId: String + - totalCommits: int + - commitsThisMonth: int + - commitsThisYear: int + - topContributors: List + - commitFrequency: Map + + calculateStatistics(commitData: List): void + + getTotalCommits(): int + + getTopContributors(count: int): List +} + +class Contributor <> { + - 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 \ No newline at end of file diff --git a/picture/设计类图/评估仓库分数.puml b/picture/设计类图/评估仓库分数.puml new file mode 100644 index 0000000..3809345 --- /dev/null +++ b/picture/设计类图/评估仓库分数.puml @@ -0,0 +1,102 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - codehubUI: CodehubUI + + startPage() + + showMainInterface() + + navigateToRepositoryAnalysis() +} + +class CodehubUI <> { + - algorithmController: AlgorithmController + + showRepositoryAnalysisPage() + + displayRepositoryAnalysisResult(result: RepositoryAnalysisResult) +} + +class AlgorithmController <> { + - database: DateBase + - pylint: Pylint + + getRepositoryCodeData(): RepositoryAnalysisResult +} + +class Pylint <> { + + analyzeRepository(codeData: RepositoryCodeData): RepositoryAnalysisResult +} + +class DateBase <> { + - repositoryData: List + + getRepositoryCodeData(): RepositoryCodeData +} + +class RepositoryCodeData <> { + - repositoryId: String + - repositoryName: String + - codeFiles: List + - commitHistory: List + - contributors: List + + getRepositoryId(): String + + getRepositoryName(): String + + getCodeFiles(): List + + getCommitHistory(): List +} + +class RepositoryAnalysisResult <> { + - repositoryId: String + - repositoryName: String + - qualityScore: double + - activityScore: double + - communityScore: double + - overallScore: double + - analysisMetrics: Map + + getOverallScore(): double + + getDetailedScores(): Map + + generateReport(): String +} + +class CodeFile <> { + - fileName: String + - filePath: String + - language: String + - size: long + - complexity: int + + getComplexity(): int + + getLanguage(): String +} + +class Commit <> { + - commitId: String + - author: String + - date: Date + - message: String + - changes: int + + getAuthor(): String + + getChanges(): int +} + +class Contributor <> { + - 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 \ No newline at end of file diff --git a/picture/设计类图/评估开发者贡献.puml b/picture/设计类图/评估开发者贡献.puml new file mode 100644 index 0000000..d33b586 --- /dev/null +++ b/picture/设计类图/评估开发者贡献.puml @@ -0,0 +1,76 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - developerUI: DeveloperUI + + startPage() + + showMainInterface() + + navigateToDeveloperAnalysis() +} + +class DeveloperUI <> { + - algorithmController: AlgorithmController + + showDeveloperAnalysisPage() + + displayDeveloperAnalysisResult(result: DeveloperAnalysisResult) +} + +class AlgorithmController <> { + - database: DateBase + + getDeveloperContributionData(): DeveloperAnalysisResult +} + +class DateBase <> { + - developerData: List + + getDeveloperData(): DeveloperData +} + +class DeveloperData <> { + - developerId: String + - developerName: String + - contributions: List + - commitCount: int + - codeLines: int + + getDeveloperId(): String + + getDeveloperName(): String + + getContributions(): List + + calculateContributionScore(): double +} + +class DeveloperAnalysisResult <> { + - developerId: String + - developerName: String + - contributionScore: double + - analysisDetails: Map + - ranking: int + + getContributionScore(): double + + getAnalysisDetails(): Map + + getRanking(): int + + generateReport(): String +} + +class Contribution <> { + - 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 \ No newline at end of file diff --git a/picture/设计类图/配置系统参数.puml b/picture/设计类图/配置系统参数.puml new file mode 100644 index 0000000..05e95f0 --- /dev/null +++ b/picture/设计类图/配置系统参数.puml @@ -0,0 +1,94 @@ +@startuml + +skinparam class { + BackgroundColor<> LightSkyBlue + BackgroundColor<> LightGreen + BackgroundColor<> Gold +} + +class MainUI <> { + - configUI: ConfigUI + + startPage() + + showMainInterface() + + navigateToSystemConfigPage() +} + +class ConfigUI <> { + - algorithmController: AlgorithmController + - currentConfig: SystemConfig + + showSystemConfigPage() + + displayModificationSuccess(message: String) + + modifyAlgorithmParameters(params: Map) +} + +class AlgorithmController <> { + - database: DateBase + + modifyAlgorithmParameters(params: Map): boolean + + getCurrentConfig(): SystemConfig +} + +class DateBase <> { + - systemConfig: SystemConfig + - configHistory: List + + getSystemConfig(): SystemConfig + + updateSystemConfig(config: SystemConfig): boolean + + saveConfigHistory(history: ConfigHistory): boolean +} + +class SystemConfig <> { + - configId: String + - version: String + - parameters: Map + - lastModified: Date + - modifiedBy: String + + getParameter(key: String): Object + + setParameter(key: String, value: Object): void + + getAllParameters(): Map + + validateParameters(): boolean +} + +class ConfigHistory <> { + - historyId: String + - configId: String + - oldValues: Map + - newValues: Map + - modifiedBy: String + - modificationTime: Date + + getChangeDescription(): String + + rollback(): SystemConfig +} + +class AlgorithmParameter <> { + - parameterName: String + - parameterType: String + - defaultValue: Object + - minValue: Object + - maxValue: Object + - description: String + + validateValue(value: Object): boolean + + getDescription(): String +} + +class User <> { + - userId: String + - username: String + - role: String + - permissions: List + + 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 \ No newline at end of file diff --git a/picture/顺序图/总览信息顺序图.vsdx b/picture/顺序图/总览信息顺序图.vsdx new file mode 100644 index 0000000..a7d56f8 Binary files /dev/null and b/picture/顺序图/总览信息顺序图.vsdx differ diff --git a/picture/顺序图/生成网络图谱.vsdx b/picture/顺序图/生成网络图谱.vsdx new file mode 100644 index 0000000..1c1f528 Binary files /dev/null and b/picture/顺序图/生成网络图谱.vsdx differ diff --git a/picture/顺序图/统计issue和pr次数.vsdx b/picture/顺序图/统计issue和pr次数.vsdx new file mode 100644 index 0000000..150f681 Binary files /dev/null and b/picture/顺序图/统计issue和pr次数.vsdx differ diff --git a/picture/顺序图/统计仓库数量和开发者数量.vsdx b/picture/顺序图/统计仓库数量和开发者数量.vsdx new file mode 100644 index 0000000..7e6d031 Binary files /dev/null and b/picture/顺序图/统计仓库数量和开发者数量.vsdx differ diff --git a/picture/顺序图/统计代码提交和仓库star数据.vsdx b/picture/顺序图/统计代码提交和仓库star数据.vsdx new file mode 100644 index 0000000..7a2c892 Binary files /dev/null and b/picture/顺序图/统计代码提交和仓库star数据.vsdx differ diff --git a/picture/顺序图/评估仓库分数.vsdx b/picture/顺序图/评估仓库分数.vsdx new file mode 100644 index 0000000..1ecc6bb Binary files /dev/null and b/picture/顺序图/评估仓库分数.vsdx differ diff --git a/picture/顺序图/评估开发者贡献.vsdx b/picture/顺序图/评估开发者贡献.vsdx new file mode 100644 index 0000000..fe77715 Binary files /dev/null and b/picture/顺序图/评估开发者贡献.vsdx differ diff --git a/picture/顺序图/配置系统参数.vsdx b/picture/顺序图/配置系统参数.vsdx new file mode 100644 index 0000000..a605802 Binary files /dev/null and b/picture/顺序图/配置系统参数.vsdx differ