Skip to content

Commit

Permalink
export email
Browse files Browse the repository at this point in the history
  • Loading branch information
HLAD Nicolas committed Nov 4, 2024
1 parent 280fcb7 commit 0462ff3
Show file tree
Hide file tree
Showing 38 changed files with 361 additions and 392 deletions.
19 changes: 9 additions & 10 deletions src/GitLabHealth-Model-Analysis/AnalysisReport.class.st
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
Class {
#name : 'AnalysisReport',
#superclass : 'Object',
#name : #AnalysisReport,
#superclass : #Object,
#instVars : [
'period',
'over',
'metrics'
],
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'initialization' }
{ #category : #initialization }
AnalysisReport >> initialize [

metrics := Dictionary new
]

{ #category : 'accessing' }
{ #category : #accessing }
AnalysisReport >> metrics [

^ metrics
]

{ #category : 'accessing' }
{ #category : #accessing }
AnalysisReport >> over [

^ over
]

{ #category : 'accessing' }
{ #category : #accessing }
AnalysisReport >> over: anObject [

over := anObject
]

{ #category : 'accessing' }
{ #category : #accessing }
AnalysisReport >> period [

^ period
]

{ #category : 'accessing' }
{ #category : #accessing }
AnalysisReport >> period: anObject [

period := anObject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'ClosedMergeRequestMetric',
#superclass : 'UserMergeRequestMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #ClosedMergeRequestMetric,
#superclass : #UserMergeRequestMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
ClosedMergeRequestMetric >> calculate [

| groupedByDate dateOver |
Expand All @@ -28,13 +27,13 @@ ClosedMergeRequestMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
ClosedMergeRequestMetric >> description [

^ 'number of closed merge requests'
]

{ #category : 'accessing' }
{ #category : #accessing }
ClosedMergeRequestMetric >> name [

^ 'closedMergeRequest'
Expand Down
13 changes: 6 additions & 7 deletions src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'ClosedTicketsMetric',
#superclass : 'UserJiraMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #ClosedTicketsMetric,
#superclass : #UserJiraMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
ClosedTicketsMetric >> calculate [

| groupedByDate dateOver |
Expand All @@ -24,13 +23,13 @@ ClosedTicketsMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
ClosedTicketsMetric >> description [

^ 'number of closed merge request associated with a jira ticket'
]

{ #category : 'accessing' }
{ #category : #accessing }
ClosedTicketsMetric >> name [

^ 'closedTickets'
Expand Down
13 changes: 6 additions & 7 deletions src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CodeAdditionByMRMetric',
#superclass : 'UserMergeRequestMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CodeAdditionByMRMetric,
#superclass : #UserMergeRequestMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeAdditionByMRMetric >> calculate [

| groupedByDate dateOver |
Expand All @@ -30,13 +29,13 @@ CodeAdditionByMRMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeAdditionByMRMetric >> description [

^ 'average code addition by merge request'
]

{ #category : 'loading' }
{ #category : #loading }
CodeAdditionByMRMetric >> load [

userMergeRequests := self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CodeAdditionByTicketMetric',
#superclass : 'UserJiraMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CodeAdditionByTicketMetric,
#superclass : #UserJiraMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeAdditionByTicketMetric >> calculate [

| groupedByDate dateOver |
Expand All @@ -30,13 +29,13 @@ CodeAdditionByTicketMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeAdditionByTicketMetric >> description [

^ 'average code addition by merge request associated with a jira ticket'
]

{ #category : 'loading' }
{ #category : #loading }
CodeAdditionByTicketMetric >> load [

userMergeRequests := self
Expand Down
11 changes: 5 additions & 6 deletions src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CodeAdditionMetric',
#superclass : 'UserCommitsMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CodeAdditionMetric,
#superclass : #UserCommitsMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeAdditionMetric >> calculate [

| gitAnalyzer contributions groupedByDate |
Expand Down Expand Up @@ -37,7 +36,7 @@ CodeAdditionMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeAdditionMetric >> description [

^ 'code addition (avg)'
Expand Down
13 changes: 6 additions & 7 deletions src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
Class {
#name : 'CodeChurnMetric',
#superclass : 'UserCommitsMetric',
#name : #CodeChurnMetric,
#superclass : #UserCommitsMetric,
#instVars : [
'maxCommitWindow'
],
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeChurnMetric >> calculate [

| commits res groupedByDate totalContributions gitAnalyzer |
Expand Down Expand Up @@ -66,13 +65,13 @@ CodeChurnMetric >> calculate [
^ (groupedByDate collect: [ :date | date at: #percentage ]) average
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeChurnMetric >> description [

^ 'churn % (W=' , maxCommitWindow printString , ')'
]

{ #category : 'initialization' }
{ #category : #initialization }
CodeChurnMetric >> initialize [
maxCommitWindow := 3
]
13 changes: 6 additions & 7 deletions src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CodeDeletionByMRMetric',
#superclass : 'UserMergeRequestMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CodeDeletionByMRMetric,
#superclass : #UserMergeRequestMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeDeletionByMRMetric >> calculate [

| groupedByDate dateOver |
Expand All @@ -30,13 +29,13 @@ CodeDeletionByMRMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeDeletionByMRMetric >> description [

^ 'average code deletion by merge request'
]

{ #category : 'loading' }
{ #category : #loading }
CodeDeletionByMRMetric >> load [

userMergeRequests := self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CodeDeletionByTicketMetric',
#superclass : 'UserJiraMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CodeDeletionByTicketMetric,
#superclass : #UserJiraMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeDeletionByTicketMetric >> calculate [

| groupedByDate dateOver |
Expand All @@ -30,13 +29,13 @@ CodeDeletionByTicketMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeDeletionByTicketMetric >> description [

^ 'average code deletion by merge request associated with a jira ticket'
]

{ #category : 'loading' }
{ #category : #loading }
CodeDeletionByTicketMetric >> load [

userMergeRequests := self
Expand Down
11 changes: 5 additions & 6 deletions src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CodeDeletionMetric',
#superclass : 'UserCommitsMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CodeDeletionMetric,
#superclass : #UserCommitsMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CodeDeletionMetric >> calculate [

| gitAnalyzer contributions groupedByDate |
Expand Down Expand Up @@ -37,7 +36,7 @@ CodeDeletionMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CodeDeletionMetric >> description [

^'code deletion (avg)'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CommentContributionMetric',
#superclass : 'UserCommitsMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CommentContributionMetric,
#superclass : #UserCommitsMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CommentContributionMetric >> calculate [

| groupedByDate gitAnalyzer contributions |
Expand Down Expand Up @@ -40,13 +39,13 @@ CommentContributionMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CommentContributionMetric >> description [

^ 'comment contribution (avg)'
]

{ #category : 'loading' }
{ #category : #loading }
CommentContributionMetric >> load [

userCommits := self
Expand Down
11 changes: 5 additions & 6 deletions src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Class {
#name : 'CommitFrequencyMetric',
#superclass : 'UserCommitsMetric',
#category : 'GitLabHealth-Model-Analysis',
#package : 'GitLabHealth-Model-Analysis'
#name : #CommitFrequencyMetric,
#superclass : #UserCommitsMetric,
#category : 'GitLabHealth-Model-Analysis'
}

{ #category : 'calculating' }
{ #category : #calculating }
CommitFrequencyMetric >> calculate [

| groupedByDate |
Expand All @@ -22,7 +21,7 @@ CommitFrequencyMetric >> calculate [
^ groupedByDate average asFloat
]

{ #category : 'accessing' }
{ #category : #accessing }
CommitFrequencyMetric >> description [

^'commits frequency (avg)'
Expand Down
Loading

0 comments on commit 0462ff3

Please sign in to comment.