diff --git a/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st index 2ec4938..c2f60b6 100644 --- a/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st @@ -1,45 +1,46 @@ Class { - #name : #AnalysisReport, - #superclass : #Object, + #name : 'AnalysisReport', + #superclass : 'Object', #instVars : [ 'period', 'over', 'metrics' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : '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 diff --git a/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st index 86add80..95146a0 100644 --- a/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #ClosedMergeRequestMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'ClosedMergeRequestMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } ClosedMergeRequestMetric >> calculate [ | groupedByDate dateOver | @@ -27,13 +28,13 @@ ClosedMergeRequestMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } ClosedMergeRequestMetric >> description [ ^ 'number of closed merge requests' ] -{ #category : #accessing } +{ #category : 'accessing' } ClosedMergeRequestMetric >> name [ ^ 'closedMergeRequest' diff --git a/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st b/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st index 885f814..cf4c0da 100644 --- a/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #ClosedTicketsMetric, - #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'ClosedTicketsMetric', + #superclass : 'UserJiraMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } ClosedTicketsMetric >> calculate [ | groupedByDate dateOver | @@ -23,13 +24,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' diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st index 3e0c4b3..4674adb 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CodeAdditionByMRMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CodeAdditionByMRMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeAdditionByMRMetric >> calculate [ | groupedByDate dateOver | @@ -29,13 +30,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 diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st index 210463e..813d829 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CodeAdditionByTicketMetric, - #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CodeAdditionByTicketMetric', + #superclass : 'UserJiraMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeAdditionByTicketMetric >> calculate [ | groupedByDate dateOver | @@ -29,13 +30,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 diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st index 064ab99..3ea58bd 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CodeAdditionMetric, - #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CodeAdditionMetric', + #superclass : 'UserCommitsMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeAdditionMetric >> calculate [ | gitAnalyzer contributions groupedByDate | @@ -36,7 +37,7 @@ CodeAdditionMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } CodeAdditionMetric >> description [ ^ 'code addition (avg)' diff --git a/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st index 46eaff6..62d81e4 100644 --- a/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st @@ -1,13 +1,14 @@ Class { - #name : #CodeChurnMetric, - #superclass : #UserCommitsMetric, + #name : 'CodeChurnMetric', + #superclass : 'UserCommitsMetric', #instVars : [ 'maxCommitWindow' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeChurnMetric >> calculate [ | commits res groupedByDate totalContributions gitAnalyzer | @@ -65,13 +66,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 ] diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st index abb278a..bd3c7ab 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CodeDeletionByMRMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CodeDeletionByMRMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeDeletionByMRMetric >> calculate [ | groupedByDate dateOver | @@ -29,13 +30,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 diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st index 9cdf88b..b59d283 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CodeDeletionByTicketMetric, - #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CodeDeletionByTicketMetric', + #superclass : 'UserJiraMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeDeletionByTicketMetric >> calculate [ | groupedByDate dateOver | @@ -29,13 +30,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 diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st index 0d08a68..8feb8e8 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CodeDeletionMetric, - #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CodeDeletionMetric', + #superclass : 'UserCommitsMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CodeDeletionMetric >> calculate [ | gitAnalyzer contributions groupedByDate | @@ -36,7 +37,7 @@ CodeDeletionMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } CodeDeletionMetric >> description [ ^'code deletion (avg)' diff --git a/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st b/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st index 149bf55..f04d16d 100644 --- a/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CommentContributionMetric, - #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CommentContributionMetric', + #superclass : 'UserCommitsMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CommentContributionMetric >> calculate [ | groupedByDate gitAnalyzer contributions | @@ -39,13 +40,13 @@ CommentContributionMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } CommentContributionMetric >> description [ ^ 'comment contribution (avg)' ] -{ #category : #loading } +{ #category : 'loading' } CommentContributionMetric >> load [ userCommits := self diff --git a/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st b/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st index 1994ead..f1e1855 100644 --- a/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CommitFrequencyMetric, - #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CommitFrequencyMetric', + #superclass : 'UserCommitsMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CommitFrequencyMetric >> calculate [ | groupedByDate | @@ -21,7 +22,7 @@ CommitFrequencyMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } CommitFrequencyMetric >> description [ ^'commits frequency (avg)' diff --git a/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st b/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st index 3307e5d..7988338 100644 --- a/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #CommitsNumberByJiraTicketsMetric, - #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'CommitsNumberByJiraTicketsMetric', + #superclass : 'UserJiraMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } CommitsNumberByJiraTicketsMetric >> calculate [ | groupedByDate dateOver | @@ -23,13 +24,13 @@ CommitsNumberByJiraTicketsMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } CommitsNumberByJiraTicketsMetric >> description [ ^ 'average number of commit by merge request associated to a jira ticket' ] -{ #category : #loading } +{ #category : 'loading' } CommitsNumberByJiraTicketsMetric >> load [ userMergeRequests := self diff --git a/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st b/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st index 8663cad..725367e 100644 --- a/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #ContributedProjectMetric, - #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'ContributedProjectMetric', + #superclass : 'UserCommitsMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } ContributedProjectMetric >> calculate [ | groupedByDate dateOver projects | @@ -25,7 +26,7 @@ ContributedProjectMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } ContributedProjectMetric >> description [ ^ 'number of project with min 1 commit of user' diff --git a/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st b/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st index 29e14ac..a610633 100644 --- a/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st @@ -1,13 +1,14 @@ Class { - #name : #DelayUntilFirstChurnMetric, - #superclass : #UserCommitsMetric, + #name : 'DelayUntilFirstChurnMetric', + #superclass : 'UserCommitsMetric', #instVars : [ 'maxCommitWindow' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } DelayUntilFirstChurnMetric >> calculate [ | commits groupedByDate res average | @@ -69,14 +70,14 @@ DelayUntilFirstChurnMetric >> calculate [ ^ average ] -{ #category : #accessing } +{ #category : 'accessing' } DelayUntilFirstChurnMetric >> description [ ^ 'delay Until First Churn (W=' , maxCommitWindow printString , ')' ] -{ #category : #initialization } +{ #category : 'initialization' } DelayUntilFirstChurnMetric >> initialize [ super initialize. maxCommitWindow := 3 diff --git a/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st b/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st index 9db688e..e4bdeda 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st @@ -1,14 +1,15 @@ Class { - #name : #GLHUserCatalogue, - #superclass : #Dictionary, + #name : 'GLHUserCatalogue', + #superclass : 'Dictionary', #instVars : [ 'users', 'anImporter' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #import } +{ #category : 'import' } GLHUserCatalogue class >> loadFromJson: aString [ | catalogue dic | @@ -32,7 +33,7 @@ GLHUserCatalogue class >> loadFromJson: aString [ ^ catalogue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue class >> scrapeContributedProjectsForCommitAuthorsRelatedToUser: aGLHUser [ "get all " @@ -63,7 +64,7 @@ GLHUserCatalogue class >> scrapeContributedProjectsForCommitAuthorsRelatedToUser ^ (aGLHUser commits collect: [ :commit | commit author_name ]) asSet ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue class >> scrapeWithImporter: anImporter contributedProjectsForCommitAuthorsRelatedToUser: aGLHUser [ "get all " @@ -87,13 +88,13 @@ GLHUserCatalogue class >> scrapeWithImporter: anImporter contributedProjectsForC ^ (aGLHUser commits collect: [ :commit | commit author_name ]) asSet ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogue >> addUser: aGLHUser [ self at: aGLHUser ifAbsentPut: [ Set new add: (aGLHUser username); add: (aGLHUser name) ; yourself ]. ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogue >> addUser: aGLHUser withName: name [ self @@ -107,7 +108,7 @@ GLHUserCatalogue >> addUser: aGLHUser withName: name [ yourself ] ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogue >> addUser: aGLHUser withNames: aCollectionOfNames [ self @@ -121,20 +122,20 @@ GLHUserCatalogue >> addUser: aGLHUser withNames: aCollectionOfNames [ yourself ] ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogue >> anImporter: aGLHModelImporter [ anImporter := aGLHModelImporter ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogue >> atWithId: anId [ |res | res := self associations detect: [ :assoc | assoc key id = anId ] ifNone: [ nil ]. ^ res ifNotNil: [ res value ]. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue >> collectUsernames [ | username2User | @@ -150,7 +151,7 @@ GLHUserCatalogue >> collectUsernames [ ^ username2User ] -{ #category : #completion } +{ #category : 'completion' } GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser with: authorName [ self @@ -162,7 +163,7 @@ GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser with: authorName [ self addUser: aGLHUser withName: authorName ] -{ #category : #completion } +{ #category : 'completion' } GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self @@ -175,7 +176,7 @@ GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self addUser: aGLHUser withNames: authorNames ] -{ #category : #export } +{ #category : 'export' } GLHUserCatalogue >> exportToJson [ | tempDic | @@ -196,13 +197,13 @@ GLHUserCatalogue >> exportToJson [ ^ STONJSON toString: tempDic ] -{ #category : #initialization } +{ #category : 'initialization' } GLHUserCatalogue >> initialize [ anImporter := GLHModelImporter importers anyOne. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue >> namesAt: aGLHUser [ | assoc | @@ -210,7 +211,7 @@ GLHUserCatalogue >> namesAt: aGLHUser [ ^ assoc value ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue >> reImportAllUsers [ "use it after a catalogue import from JSON" @@ -223,7 +224,7 @@ GLHUserCatalogue >> reImportAllUsers [ assoc key: user ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue >> scrapeAuthorNameForAllUsers [ | currentUsers | @@ -233,7 +234,7 @@ GLHUserCatalogue >> scrapeAuthorNameForAllUsers [ scrapeWithImporter: anImporter contributedProjectsForCommitAuthorsRelatedToUser: key) ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogue >> scrapeAuthorNameForUser: aGLHUser [ | assoc | @@ -243,7 +244,7 @@ GLHUserCatalogue >> scrapeAuthorNameForUser: aGLHUser [ contributedProjectsForCommitAuthorsRelatedToUser: aGLHUser) ] -{ #category : #scrape } +{ #category : 'scrape' } GLHUserCatalogue >> scrapeAuthorNamesForUsers: aUserCollection [ aUserCollection do: [ :aGLHUser | @@ -251,7 +252,7 @@ GLHUserCatalogue >> scrapeAuthorNamesForUsers: aUserCollection [ ]. ] -{ #category : #completion } +{ #category : 'completion' } GLHUserCatalogue >> searchModelForAuthorNamesOfUser: aGLHUser [ |assoc| assoc := self associationAt: aGLHUser. @@ -259,19 +260,19 @@ GLHUserCatalogue >> searchModelForAuthorNamesOfUser: aGLHUser [ ] -{ #category : #search } +{ #category : 'search' } GLHUserCatalogue >> searchName: aName [ ^ self select: [ :collectionOfName | (' ' join: collectionOfName) asLowercase includesSubstring: aName asLowercase ] ] -{ #category : #search } +{ #category : 'search' } GLHUserCatalogue >> searchUserWithName: aName [ ^ (self searchName: aName) keys. ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogue >> users [ ^ self keys ] diff --git a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st index 5489928..7d6db7f 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st @@ -1,14 +1,15 @@ Class { - #name : #GLHUserCatalogueItem, - #superclass : #Dictionary, + #name : 'GLHUserCatalogueItem', + #superclass : 'Dictionary', #instVars : [ 'user', 'names' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #initialization } +{ #category : 'initialization' } GLHUserCatalogueItem >> initialize [ names := Set new. diff --git a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st index 856c61d..39a7c65 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st @@ -1,10 +1,11 @@ Class { - #name : #GLHUserCatalogueV2, - #superclass : #GLHUserCatalogue, - #category : 'GitLabHealth-Model-Analysis' + #name : 'GLHUserCatalogueV2', + #superclass : 'GLHUserCatalogue', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #import } +{ #category : 'import' } GLHUserCatalogueV2 class >> loadFromJson: aString [ | catalogue dic | @@ -30,7 +31,7 @@ GLHUserCatalogueV2 class >> loadFromJson: aString [ ^ catalogue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 class >> scrapeContributedProjectsForCommitAuthorsRelatedToUser: aGLHUser [ "get all " @@ -61,7 +62,7 @@ GLHUserCatalogueV2 class >> scrapeContributedProjectsForCommitAuthorsRelatedToUs ^ (aGLHUser commits collect: [ :commit | commit author_name ]) asSet ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 class >> scrapeWithImporter: anImporter contributedProjectsForCommitAuthorsRelatedToUser: aGLHUser [ "get all " @@ -85,7 +86,7 @@ GLHUserCatalogueV2 class >> scrapeWithImporter: anImporter contributedProjectsFo ^ (aGLHUser commits collect: [ :commit | commit author_name ]) asSet ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> RSHeatMapLevenshtein [ | builder| @@ -100,7 +101,7 @@ GLHUserCatalogueV2 >> RSHeatMapLevenshtein [ builder canvas open ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> RSHeatMapLevenshteinTrimedAt: aBlockCondition [ | builder matrice| @@ -125,21 +126,21 @@ GLHUserCatalogueV2 >> RSHeatMapLevenshteinTrimedAt: aBlockCondition [ builder canvas open ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser [ ^ self at: aGLHUser name ifAbsentPut: [ self initACatalogueEntryForUser: aGLHUser ] ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser withName: name [ ^ self addUser: aGLHUser withNames: { name } ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser withNames: aCollectionOfNames [ | entry | entry := (self @@ -149,13 +150,13 @@ GLHUserCatalogueV2 >> addUser: aGLHUser withNames: aCollectionOfNames [ ^ entry ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser withNames: aCollectionOfNames withProject: aProjectID [ ^ self addUser: aGLHUser withNames: aCollectionOfNames withProjects: { aProjectID } ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser withNames: aCollectionOfNames withProjects: aCollectionOfProjectIDs [ |entry| @@ -165,14 +166,14 @@ GLHUserCatalogueV2 >> addUser: aGLHUser withNames: aCollectionOfNames withProjec ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser withProject: aProjectID [ ^ self addUser: aGLHUser withProjects: {aProjectID}. ] -{ #category : #adding } +{ #category : 'adding' } GLHUserCatalogueV2 >> addUser: aGLHUser withProjects: aCollectionOfProjectIDs [ |entry| @@ -182,19 +183,19 @@ GLHUserCatalogueV2 >> addUser: aGLHUser withProjects: aCollectionOfProjectIDs [ ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogueV2 >> anImporter: aGLHModelImporter [ anImporter := aGLHModelImporter ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogueV2 >> atId: anId [ ^ self detect: [ :entry | (entry at: #user) id = anId ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> collectUsernames [ | username2User | @@ -211,7 +212,7 @@ GLHUserCatalogueV2 >> collectUsernames [ ^ username2User ] -{ #category : #completion } +{ #category : 'completion' } GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser with: authorName [ self @@ -223,7 +224,7 @@ GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser with: authorName [ self addUser: aGLHUser withName: authorName ] -{ #category : #completion } +{ #category : 'completion' } GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self @@ -236,7 +237,7 @@ GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self addUser: aGLHUser withNames: authorNames ] -{ #category : #export } +{ #category : 'export' } GLHUserCatalogueV2 >> exportToJson [ | tempDic | @@ -263,7 +264,7 @@ GLHUserCatalogueV2 >> exportToJson [ ^ STONJSON toStringPretty: tempDic ] -{ #category : #fuse } +{ #category : 'fuse' } GLHUserCatalogueV2 >> fuse: mainUser with: subUser [ self at: mainUser ifPresent: [ :entry | self at: subUser ifAbsent: [ ^ self ]. @@ -273,7 +274,7 @@ GLHUserCatalogueV2 >> fuse: mainUser with: subUser [ ]. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } GLHUserCatalogueV2 >> initACatalogueEntryForUser: aGLHUser [. ^ Dictionary new @@ -288,13 +289,13 @@ GLHUserCatalogueV2 >> initACatalogueEntryForUser: aGLHUser [. yourself ] -{ #category : #initialization } +{ #category : 'initialization' } GLHUserCatalogueV2 >> initialize [ anImporter := GLHModelImporter new. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> levenshteinMatrix [ | matrix| @@ -311,17 +312,17 @@ GLHUserCatalogueV2 >> levenshteinMatrix [ ^ matrix. ] -{ #category : #'accessing - name' } +{ #category : 'accessing - name' } GLHUserCatalogueV2 >> names [ ^ self collect: [ :entry | entry at: #names ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> namesAt: aGLHUser [ ^ (self at: aGLHUser name) at: #names. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> reImportAllUsers [ "use it after a catalogue import from JSON" @@ -337,7 +338,7 @@ GLHUserCatalogueV2 >> reImportAllUsers [ assoc value at: #user put: user ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> reImportUser: aGLHUser [ "use it after a catalogue import from JSON" |user| @@ -353,7 +354,7 @@ GLHUserCatalogueV2 >> reImportUser: aGLHUser [ ] -{ #category : #scrape } +{ #category : 'scrape' } GLHUserCatalogueV2 >> scrapeAuthorNameForAllRealUsers [ |listOfUsers| @@ -361,7 +362,7 @@ GLHUserCatalogueV2 >> scrapeAuthorNameForAllRealUsers [ listOfUsers do: [ :user | self scrapeAuthorNameForUser: user ]. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> scrapeAuthorNameForAllUsers [ |listOfUsers| @@ -370,7 +371,7 @@ GLHUserCatalogueV2 >> scrapeAuthorNameForAllUsers [ listOfUsers do: [ :user | self scrapeAuthorNameForUser: user ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GLHUserCatalogueV2 >> scrapeAuthorNameForUser: aGLHUser [ self addUser: aGLHUser withNames: (GLHUserCatalogue @@ -378,7 +379,7 @@ GLHUserCatalogueV2 >> scrapeAuthorNameForUser: aGLHUser [ contributedProjectsForCommitAuthorsRelatedToUser: aGLHUser). ] -{ #category : #scrape } +{ #category : 'scrape' } GLHUserCatalogueV2 >> scrapeAuthorNamesForUsers: aUserCollection [ aUserCollection do: [ :aGLHUser | @@ -386,19 +387,19 @@ GLHUserCatalogueV2 >> scrapeAuthorNamesForUsers: aUserCollection [ ]. ] -{ #category : #search } +{ #category : 'search' } GLHUserCatalogueV2 >> searchId: anId [ ^ self select: [ :entry | (entry at: #user) id = anId ]. ] -{ #category : #completion } +{ #category : 'completion' } GLHUserCatalogueV2 >> searchModelForAuthorNamesOfUser: aGLHUser [ self addUser: aGLHUser withNames: (aGLHUser commits collect: [ :c | c author_name ]) ] -{ #category : #search } +{ #category : 'search' } GLHUserCatalogueV2 >> searchName: aName [ ^ self select: [ :entry | @@ -408,24 +409,24 @@ GLHUserCatalogueV2 >> searchName: aName [ aName asLowercase ] ] -{ #category : #search } +{ #category : 'search' } GLHUserCatalogueV2 >> searchUserWithName: aName [ ^ (self searchName: aName) users ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogueV2 >> userAt: aGLHUser [ ^ (self at: aGLHUser name) at: #user. ] -{ #category : #accessing } +{ #category : 'accessing' } GLHUserCatalogueV2 >> users [ ^ self collect: [ :entry | entry at: #user ]. ] -{ #category : #search } +{ #category : 'search' } GLHUserCatalogueV2 >> weirdUsers [ "return user that have name containing weird caracter, making them suspicious" ^ self select: [ :entry | diff --git a/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st b/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st index be075cb..21aaebb 100644 --- a/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st +++ b/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st @@ -1,6 +1,6 @@ Class { - #name : #GitAnalyzer, - #superclass : #Object, + #name : 'GitAnalyzer', + #superclass : 'Object', #instVars : [ 'glModel', 'fromCommit', @@ -8,10 +8,11 @@ Class { 'onProject', 'maxChildCommits' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #analyze } +{ #category : 'analyze' } GitAnalyzer >> analyseChurn [ | commitFiles totalContribution childCommits access | @@ -39,7 +40,7 @@ GitAnalyzer >> analyseChurn [ yourself ] ] -{ #category : #analyze } +{ #category : 'analyze' } GitAnalyzer >> analyseCommentContribution [ | numberOfComments | @@ -57,7 +58,7 @@ GitAnalyzer >> analyseCommentContribution [ ^ numberOfComments ] -{ #category : #commit } +{ #category : 'commit' } GitAnalyzer >> analyseCommitContribution [ @@ -68,7 +69,7 @@ GitAnalyzer >> analyseCommitContribution [ (#deletion -> fromCommit deletions). } asDictionary ] -{ #category : #analyze } +{ #category : 'analyze' } GitAnalyzer >> analyseCommitFrequencyFromCommits: initialCommits [ | commits response | @@ -87,7 +88,7 @@ GitAnalyzer >> analyseCommitFrequencyFromCommits: initialCommits [ ^ commits ] -{ #category : #analyze } +{ #category : 'analyze' } GitAnalyzer >> analyseCommitFrequencySince: since until: until [ | commits response | @@ -111,7 +112,7 @@ GitAnalyzer >> analyseCommitFrequencySince: since until: until [ ^ commits ] -{ #category : #analyze } +{ #category : 'analyze' } GitAnalyzer >> analyseDelayUntilFirstChurn [ "return the first commit that modify the same lines of code as the fromCommit" @@ -132,7 +133,7 @@ GitAnalyzer >> analyseDelayUntilFirstChurn [ res] ] -{ #category : #analyze } +{ #category : 'analyze' } GitAnalyzer >> analyseMergeResquestValidation: aGLHPMergeRequest [ | creationDate mergedDate response | @@ -163,7 +164,7 @@ GitAnalyzer >> analyseMergeResquestValidation: aGLHPMergeRequest [ yourself ] ] -{ #category : #filter } +{ #category : 'filter' } GitAnalyzer >> arrangeCommitsByDate: commits [ | date2commits | @@ -182,7 +183,7 @@ GitAnalyzer >> arrangeCommitsByDate: commits [ ^ date2commits ] -{ #category : #churn } +{ #category : 'churn' } GitAnalyzer >> computeChurnOnFiles: aCollection [ | changesDic perFileChanges churns initialAuthor followingAuthors| @@ -241,7 +242,7 @@ GitAnalyzer >> computeChurnOnFiles: aCollection [ (#details -> perFileChanges) } asDictionary ] -{ #category : #churn } +{ #category : 'churn' } GitAnalyzer >> computeSpecificChurnOf: commit2Changes [ | changesDic | @@ -271,7 +272,7 @@ GitAnalyzer >> computeSpecificChurnOf: commit2Changes [ ^ self sortChangeDic: changesDic ] -{ #category : #accessing } +{ #category : 'accessing' } GitAnalyzer >> firstAmandmentFromChrun: aChurnAnalysis [ |details whereChangesOccurs firstCommitsPerFile| @@ -294,17 +295,17 @@ GitAnalyzer >> firstAmandmentFromChrun: aChurnAnalysis [ ] -{ #category : #accessing } +{ #category : 'accessing' } GitAnalyzer >> fromCommit: aCommit [ fromCommit := aCommit. ] -{ #category : #accessing } +{ #category : 'accessing' } GitAnalyzer >> glhImporter: anImporter [ glhImporter := anImporter . ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit [ ^ self @@ -312,7 +313,7 @@ GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit [ withMaxCommits: self maxChildCommits. ] -{ #category : #churn } +{ #category : 'churn' } GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit withMaxCommits: max [ | commitFiles | @@ -328,7 +329,7 @@ GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit withMaxCommits: max ^ commitFiles ] -{ #category : #initialization } +{ #category : 'initialization' } GitAnalyzer >> initialize [ glModel := GLHModel new. @@ -338,7 +339,7 @@ GitAnalyzer >> initialize [ maxChildCommits := -1 ] -{ #category : #insertion } +{ #category : 'insertion' } GitAnalyzer >> insertDiff: aGLPHEDiffRange into: fileChangesDic startingFrom: from [ |index| index := from. @@ -356,38 +357,38 @@ GitAnalyzer >> insertDiff: aGLPHEDiffRange into: fileChangesDic startingFrom: fr ] ] -{ #category : #accessing } +{ #category : 'accessing' } GitAnalyzer >> maxChildCommit: max [ maxChildCommits := max ] -{ #category : #accessing } +{ #category : 'accessing' } GitAnalyzer >> maxChildCommits [ ^ maxChildCommits ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GitAnalyzer >> onModel: agitHealthModel [ glModel := agitHealthModel ] -{ #category : #accessing } +{ #category : 'accessing' } GitAnalyzer >> onProject: aGLHProject [ onProject := aGLHProject ] -{ #category : #sorting } +{ #category : 'sorting' } GitAnalyzer >> sortChangeDic: aCollection [ ^ (aCollection associations sortAscending: [ :e | e key ] ) asOrderedDictionary ] -{ #category : #visiting } +{ #category : 'visiting' } GitAnalyzer >> visitChildCommits: commits lookingForFiles: commitFiles [ ^ self visitChildCommits: commits lookingForFiles: commitFiles upto: -1 ] -{ #category : #visiting } +{ #category : 'visiting' } GitAnalyzer >> visitChildCommits: commits lookingForFiles: commitFiles upto: nCommits [ commits ifEmpty: [ ^ commitFiles ]. @@ -411,7 +412,7 @@ GitAnalyzer >> visitChildCommits: commits lookingForFiles: commitFiles upto: nCo ^ commitFiles ] -{ #category : #visiting } +{ #category : 'visiting' } GitAnalyzer >> visitChildCommits: commits toStoreThemIn: commitsFound upto: nCommits [ commits ifEmpty: [ ^ commitsFound ]. diff --git a/src/GitLabHealth-Model-Analysis/GitMetricExporter.class.st b/src/GitLabHealth-Model-Analysis/GitMetricExporter.class.st index 4e76124..c0381cb 100644 --- a/src/GitLabHealth-Model-Analysis/GitMetricExporter.class.st +++ b/src/GitLabHealth-Model-Analysis/GitMetricExporter.class.st @@ -1,6 +1,6 @@ Class { - #name : #GitMetricExporter, - #superclass : #Object, + #name : 'GitMetricExporter', + #superclass : 'Object', #instVars : [ 'glhImporter', 'jiraImporter', @@ -15,10 +15,11 @@ Class { 'metrics', 'analyses' ], - #category : #'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } GitMetricExporter class >> demoPeriod [ ^ self new @@ -27,7 +28,7 @@ GitMetricExporter class >> demoPeriod [ addAPeriodFrom: '01 march 2024' to: '31 may 2024' ] -{ #category : #adding } +{ #category : 'adding' } GitMetricExporter >> addAPeriodFrom: since to: until [ runningPeriods add: { @@ -37,7 +38,7 @@ GitMetricExporter >> addAPeriodFrom: since to: until [ ^runningPeriods ] -{ #category : #adding } +{ #category : 'adding' } GitMetricExporter >> addEntitiesFromUserNames: userNames [ "import all the project since a certain time" @@ -85,7 +86,7 @@ GitMetricExporter >> addEntitiesFromUserNames: userNames [ ^ self ] -{ #category : #adding } +{ #category : 'adding' } GitMetricExporter >> addEntitiesFromUserNamesAndProjects: usersWithProjects [ self @@ -111,7 +112,7 @@ GitMetricExporter >> addEntitiesFromUserNamesAndProjects: usersWithProjects [ ^ self ] -{ #category : #utilities } +{ #category : 'utilities' } GitMetricExporter >> constructFilePath: runningOver [ | file | @@ -124,7 +125,7 @@ GitMetricExporter >> constructFilePath: runningOver [ ^ file ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> csvMetricsFor: metricCollection at: date [ | csvMetrics | @@ -142,12 +143,12 @@ GitMetricExporter >> csvMetricsFor: metricCollection at: date [ ^ csvMetrics asOrderedDictionary ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> entities: aCollection [ entities := aCollection ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportFor: usersWithProjects [ self @@ -163,7 +164,7 @@ GitMetricExporter >> exportFor: usersWithProjects [ Year } ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportFor: usersWithProjects over: aCollectionOfDateWeekMonthOrYear [ self @@ -178,21 +179,21 @@ GitMetricExporter >> exportFor: usersWithProjects over: aCollectionOfDateWeekMon self exportFor: aCollectionOfDateWeekMonthOrYear ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportInCSV [ self exportUserAnalysesInCSV. self exportProjectAnalysesInCSV. ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportInDB: repository [ repository enableSingleton. analyses do: [ :analysis | analysis save ] ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportInS3: bucketName accessKey: accessKey secretKey: secretKey region: region [ | s3 bucket ston date fileName | @@ -216,7 +217,7 @@ GitMetricExporter >> exportInS3: bucketName accessKey: accessKey secretKey: secr bucket atKey: fileName putObject: ston ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportProjectAnalysesInCSV [ | exportBrowserModel groupedByOver group groupOver groupByName periods csvMetrics file | @@ -258,7 +259,7 @@ GitMetricExporter >> exportProjectAnalysesInCSV [ exportBrowserModel writeCSVOn: aStream ] ] ] -{ #category : #exporting } +{ #category : 'exporting' } GitMetricExporter >> exportUserAnalysesInCSV [ | exportBrowserModel groupedByOver group groupOver groupByName periods csvMetrics file | @@ -281,7 +282,7 @@ GitMetricExporter >> exportUserAnalysesInCSV [ exportBrowserModel addColumnForQuery: [ :groupAnalyses | - (groupAnalyses at: 1) email ifNil: #public_email ] + (groupAnalyses at: 1) email ] withName: #'User email'. periods := (group groupedBy: #period) keys. @@ -301,7 +302,7 @@ GitMetricExporter >> exportUserAnalysesInCSV [ exportBrowserModel writeCSVOn: aStream ] ] ] -{ #category : #projects } +{ #category : 'projects' } GitMetricExporter >> findParticipationOfCommitAuthorNamed: username amongProjects: aCollectionOfProjects [ | response itsProjects i size | @@ -331,12 +332,12 @@ GitMetricExporter >> findParticipationOfCommitAuthorNamed: username amongProject ^ itsProjects ] -{ #category : #projects } +{ #category : 'projects' } GitMetricExporter >> findProjectsOfUser: aCollection [ self shouldBeImplemented. ] -{ #category : #analysis } +{ #category : 'analysis' } GitMetricExporter >> generateAnalysesOver: aDateWeekMonthOrYear [ analyses := OrderedCollection new. @@ -352,7 +353,7 @@ GitMetricExporter >> generateAnalysesOver: aDateWeekMonthOrYear [ ^ analyses ] -{ #category : #analysis } +{ #category : 'analysis' } GitMetricExporter >> generateProjectsAnalysesDuringPeriod: period over: aDateWeekMonthOrYear [ ^self projectEntities collect: [ :project | @@ -362,13 +363,14 @@ GitMetricExporter >> generateProjectsAnalysesDuringPeriod: period over: aDateWee over: aDateWeekMonthOrYear ] ] -{ #category : #analysis } +{ #category : 'analysis' } GitMetricExporter >> generateUsersAnalysesDuringPeriod: period over: aDateWeekMonthOrYear [ | userAnalysisReport newMetric result | ^ self userEntities collect: [ :user | userAnalysisReport := UserAnalysisReport new username: user name; + email: (user email ifNil: #public_email); period: period; over: aDateWeekMonthOrYear. @@ -389,7 +391,7 @@ GitMetricExporter >> generateUsersAnalysesDuringPeriod: period over: aDateWeekMo userAnalysisReport ] ] -{ #category : #utilities } +{ #category : 'utilities' } GitMetricExporter >> getAnalysisWithDate: date from: analysisCollection [ ^analysisCollection @@ -397,13 +399,13 @@ GitMetricExporter >> getAnalysisWithDate: date from: analysisCollection [ ifNone: [ nil ] ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> glhImporter: anImporter [ glhImporter := anImporter withInitialCommits: false; yourself. ] -{ #category : #adding } +{ #category : 'adding' } GitMetricExporter >> importAnalysesFromS3: bucketName accessKey: accessKey secretKey: secretKey region: region [ | s3 bucket xmlObjects contentElements filesContent | @@ -427,7 +429,7 @@ GitMetricExporter >> importAnalysesFromS3: bucketName accessKey: accessKey secre flattened ] -{ #category : #initialization } +{ #category : 'initialization' } GitMetricExporter >> initialize [ entities := OrderedCollection new. @@ -460,29 +462,29 @@ GitMetricExporter >> initialize [ CommitsNumberByJiraTicketsMetric } ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> jiraImporter: anObject [ jiraImporter := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> label: aString [ label := aString ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> maxCommitWindow: anInteger [ maxCommitWindow := anInteger abs ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> metrics: anObject [ metrics := anObject ] -{ #category : #adding } +{ #category : 'adding' } GitMetricExporter >> onlyImportProjectsOfGroup: groupId [ | group | @@ -490,25 +492,25 @@ GitMetricExporter >> onlyImportProjectsOfGroup: groupId [ projectCache := group toScope: GLHProject ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> projectAnalyses [ ^ analyses select: [ :analysis | analysis class = ProjectAnalysisReport ] ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> projectEntities [ ^ entities select: [ :entity | entity class = GLHProject ] ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> projectMetrics [ ^ metrics select: [ :metric | metric inheritsFrom: ProjectMetric ] ] -{ #category : #setup } +{ #category : 'setup' } GitMetricExporter >> setupAnalysisForProjectsWithIds: projectIds [ | projects | @@ -517,7 +519,7 @@ GitMetricExporter >> setupAnalysisForProjectsWithIds: projectIds [ entities addAll: projects ] -{ #category : #setup } +{ #category : 'setup' } GitMetricExporter >> setupAnalysisForUsersWithNames: userNames [ "import all the project since a certain time" @@ -540,25 +542,25 @@ GitMetricExporter >> setupAnalysisForUsersWithNames: userNames [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> userAnalyses [ ^ analyses select: [ :analysis | analysis class = UserAnalysisReport ] ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> userEntities [ ^ entities select: [ :entity | entity class = GLHUser ] ] -{ #category : #accessing } +{ #category : 'accessing' } GitMetricExporter >> userMetrics [ ^ metrics select: [ :metric | metric inheritsFrom: UserMetric ] ] -{ #category : #setup } +{ #category : 'setup' } GitMetricExporter >> withEmailDomain: anEmailDomain [ "define the email domain of your Git user. Usefull to link them between service (i.e. Jira)" diff --git a/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st b/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st index 8e2b064..68a1437 100644 --- a/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #JiraTimeMRTimeDifferenceMetric, - #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'JiraTimeMRTimeDifferenceMetric', + #superclass : 'UserJiraMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } JiraTimeMRTimeDifferenceMetric >> calculate [ | groupedByDate dateOver | @@ -51,13 +52,13 @@ JiraTimeMRTimeDifferenceMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } JiraTimeMRTimeDifferenceMetric >> description [ ^ 'average difference in seconds between jira estimate time and associated merge request time (time between first commit and merge date)' ] -{ #category : #loading } +{ #category : 'loading' } JiraTimeMRTimeDifferenceMetric >> load [ userMergeRequests := self diff --git a/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st b/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st index 8b49bc6..1cd32d1 100644 --- a/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #MergeRequestDurationMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'MergeRequestDurationMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } MergeRequestDurationMetric >> calculate [ | groupedByDate gitAnalyzer mergeRequestsValidation filterGroups | @@ -51,13 +52,13 @@ MergeRequestDurationMetric >> calculate [ ^ filterGroups average asSeconds ] -{ #category : #accessing } +{ #category : 'accessing' } MergeRequestDurationMetric >> description [ ^ 'average time to merge a merge request (in seconds)' ] -{ #category : #accessing } +{ #category : 'accessing' } MergeRequestDurationMetric >> name [ ^ 'mergeRequestDuration' diff --git a/src/GitLabHealth-Model-Analysis/MergedMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/MergedMergeRequestMetric.class.st index 39a6863..208a604 100644 --- a/src/GitLabHealth-Model-Analysis/MergedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/MergedMergeRequestMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #MergedMergeRequestMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'MergedMergeRequestMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } MergedMergeRequestMetric >> calculate [ | groupedByDate userMergedMergeRequests dateOver | @@ -28,13 +29,13 @@ MergedMergeRequestMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } MergedMergeRequestMetric >> description [ ^ 'number of merge request merged by this user' ] -{ #category : #loading } +{ #category : 'loading' } MergedMergeRequestMetric >> load [ userMergeRequests := self @@ -42,7 +43,7 @@ MergedMergeRequestMetric >> load [ until: (period at: #until) ] -{ #category : #accessing } +{ #category : 'accessing' } MergedMergeRequestMetric >> name [ ^ 'mergedMergeRequest' diff --git a/src/GitLabHealth-Model-Analysis/Metric.class.st b/src/GitLabHealth-Model-Analysis/Metric.class.st index 0019531..fa908bf 100644 --- a/src/GitLabHealth-Model-Analysis/Metric.class.st +++ b/src/GitLabHealth-Model-Analysis/Metric.class.st @@ -1,62 +1,63 @@ Class { - #name : #Metric, - #superclass : #Object, + #name : 'Metric', + #superclass : 'Object', #instVars : [ 'period', 'over', 'glhImporter', 'jiraImporter' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Metric >> accronym [ ^ (self name first uppercase asString), (self name select: #isUppercase) ] -{ #category : #calculating } +{ #category : 'calculating' } Metric >> calculate [ ^self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } Metric >> description [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } Metric >> glhImporter: anObject [ glhImporter := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } Metric >> jiraImporter: anObject [ jiraImporter := anObject ] -{ #category : #loading } +{ #category : 'loading' } Metric >> load [ ^self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } Metric >> name [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } Metric >> over: anObject [ over := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } Metric >> setPeriodSince: since until: until [ period := { @@ -64,7 +65,7 @@ Metric >> setPeriodSince: since until: until [ (#until -> until asDate) } asDictionary ] -{ #category : #'utils - date' } +{ #category : 'utils - date' } Metric >> setupGroupedDate [ | groupedByDate start end increment overSymbol | @@ -85,7 +86,7 @@ Metric >> setupGroupedDate [ over := #day ]. - [ groupedByDate keys last asDateAndTime < end ] whileTrue: [ + [ groupedByDate keys last asDate asDateAndTime < end ] whileTrue: [ | index | index := groupedByDate keys last asDateAndTime + (increment perform: overSymbol). @@ -110,7 +111,7 @@ Metric >> setupGroupedDate [ ^ groupedByDate ] -{ #category : #'utils - date' } +{ #category : 'utils - date' } Metric >> transformDate: date to: aWeekOrMonthOrYear [ aWeekOrMonthOrYear = Month ifTrue: [ ^ date asDate month asDate ]. diff --git a/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st index 6e349b4..69e5f85 100644 --- a/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #OpenedMergeRequestMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'OpenedMergeRequestMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } OpenedMergeRequestMetric >> calculate [ | groupedByDate dateOver | @@ -24,13 +25,13 @@ OpenedMergeRequestMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } OpenedMergeRequestMetric >> description [ ^'number of opened merge request' ] -{ #category : #accessing } +{ #category : 'accessing' } OpenedMergeRequestMetric >> name [ ^'openedMergeRequest' diff --git a/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st index 946d807..727c4e7 100644 --- a/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #PendingMergeRequestMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'PendingMergeRequestMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } PendingMergeRequestMetric >> calculate [ | groupedByDate userMergedMergeRequests dateOver | @@ -26,13 +27,13 @@ PendingMergeRequestMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } PendingMergeRequestMetric >> description [ ^ 'number of merge request opened during a period and left opened at the end of it' ] -{ #category : #accessing } +{ #category : 'accessing' } PendingMergeRequestMetric >> name [ ^'pendingMergeRequest' ] diff --git a/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st index a72b67c..5c107b1 100644 --- a/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st @@ -1,19 +1,20 @@ Class { - #name : #ProjectAnalysisReport, - #superclass : #AnalysisReport, + #name : 'ProjectAnalysisReport', + #superclass : 'AnalysisReport', #instVars : [ 'projectName' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #accessing } +{ #category : 'accessing' } ProjectAnalysisReport >> projectName [ ^ projectName ] -{ #category : #accessing } +{ #category : 'accessing' } ProjectAnalysisReport >> projectName: anObject [ projectName := anObject diff --git a/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st b/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st index c56ebef..13e703c 100644 --- a/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st @@ -1,8 +1,9 @@ Class { - #name : #ProjectMetric, - #superclass : #Metric, + #name : 'ProjectMetric', + #superclass : 'Metric', #instVars : [ 'project' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } diff --git a/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st index 0ca0e40..23eb761 100644 --- a/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #ReviewedByUserMergeRequestMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'ReviewedByUserMergeRequestMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } ReviewedByUserMergeRequestMetric >> calculate [ | groupedByDate mergedMergeRequest reviewedMergeRequests dateOver gitAnalyzer | @@ -36,13 +37,13 @@ ReviewedByUserMergeRequestMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } ReviewedByUserMergeRequestMetric >> description [ ^ 'number of merger request reviewed by the user' ] -{ #category : #loading } +{ #category : 'loading' } ReviewedByUserMergeRequestMetric >> load [ userMergeRequests := self @@ -50,7 +51,7 @@ ReviewedByUserMergeRequestMetric >> load [ until: (period at: #until) ] -{ #category : #accessing } +{ #category : 'accessing' } ReviewedByUserMergeRequestMetric >> name [ ^ 'reviewedMergeRequest' diff --git a/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st index 5c38042..2ad8d7a 100644 --- a/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #SelfMergedUnderAMinuteMergeRequestMetric, - #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'SelfMergedUnderAMinuteMergeRequestMetric', + #superclass : 'UserMergeRequestMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } SelfMergedUnderAMinuteMergeRequestMetric >> calculate [ | groupedByDate mergedMergeRequest noVerificationMergeRequests dateOver gitAnalyzer | @@ -43,13 +44,13 @@ SelfMergedUnderAMinuteMergeRequestMetric >> calculate [ ^ groupedByDate average asFloat ] -{ #category : #accessing } +{ #category : 'accessing' } SelfMergedUnderAMinuteMergeRequestMetric >> description [ ^ 'number of merge requests merged by its author under a minute after creation' ] -{ #category : #loading } +{ #category : 'loading' } SelfMergedUnderAMinuteMergeRequestMetric >> load [ userMergeRequests := self @@ -58,7 +59,7 @@ SelfMergedUnderAMinuteMergeRequestMetric >> load [ until: (period at: #until) ] -{ #category : #accessing } +{ #category : 'accessing' } SelfMergedUnderAMinuteMergeRequestMetric >> name [ ^ 'SelfMergedUnderAMinuteMergeRequest' diff --git a/src/GitLabHealth-Model-Analysis/String.extension.st b/src/GitLabHealth-Model-Analysis/String.extension.st index d6be4df..fd0ba7d 100644 --- a/src/GitLabHealth-Model-Analysis/String.extension.st +++ b/src/GitLabHealth-Model-Analysis/String.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #String } +Extension { #name : 'String' } -{ #category : #'*GitLabHealth-Model-Analysis' } +{ #category : '*GitLabHealth-Model-Analysis' } String >> absLevenshteinDistanceWith: aString [ ^ { self levenshteinDistanceWith: aString . aString levenshteinDistanceWith: self } max. ] -{ #category : #'*GitLabHealth-Model-Analysis' } +{ #category : '*GitLabHealth-Model-Analysis' } String >> levenshteinDistanceWith: aString [ | m n distances cost | diff --git a/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st b/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st index 8b39d2e..31ea48b 100644 --- a/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st @@ -1,10 +1,11 @@ Class { - #name : #TimeBetweenCommitMetric, - #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'TimeBetweenCommitMetric', + #superclass : 'UserCommitsMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } TimeBetweenCommitMetric >> calculate [ | commitSortedByDate commits1 commits2 differences groupedByDate dateOver average | @@ -44,7 +45,7 @@ TimeBetweenCommitMetric >> calculate [ ^ average ] -{ #category : #accessing } +{ #category : 'accessing' } TimeBetweenCommitMetric >> description [ ^ 'average time between commits (in seconds)' diff --git a/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st index 82b130e..d9b5535 100644 --- a/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st @@ -1,19 +1,33 @@ Class { - #name : #UserAnalysisReport, - #superclass : #AnalysisReport, + #name : 'UserAnalysisReport', + #superclass : 'AnalysisReport', #instVars : [ - 'username' + 'username', + 'email' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #accessing } +{ #category : 'accessing' } +UserAnalysisReport >> email [ + + ^ email +] + +{ #category : 'accessing' } +UserAnalysisReport >> email: anObject [ + + email := anObject +] + +{ #category : 'accessing' } UserAnalysisReport >> username [ ^ username ] -{ #category : #accessing } +{ #category : 'accessing' } UserAnalysisReport >> username: anObject [ username := anObject diff --git a/src/GitLabHealth-Model-Analysis/UserCommitsMetric.class.st b/src/GitLabHealth-Model-Analysis/UserCommitsMetric.class.st index a4de30c..953ab4f 100644 --- a/src/GitLabHealth-Model-Analysis/UserCommitsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserCommitsMetric.class.st @@ -1,22 +1,23 @@ Class { - #name : #UserCommitsMetric, - #superclass : #UserMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'UserCommitsMetric', + #superclass : 'UserMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } UserCommitsMetric >> calculate [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UserCommitsMetric >> description [ ^ self subclassResponsibility ] -{ #category : #loading } +{ #category : 'loading' } UserCommitsMetric >> load [ userCommits := self @@ -24,7 +25,7 @@ UserCommitsMetric >> load [ until: (period at: #until) ] -{ #category : #accessing } +{ #category : 'accessing' } UserCommitsMetric >> name [ ^ self class name asString diff --git a/src/GitLabHealth-Model-Analysis/UserJiraMetric.class.st b/src/GitLabHealth-Model-Analysis/UserJiraMetric.class.st index e7b6c78..2de1b38 100644 --- a/src/GitLabHealth-Model-Analysis/UserJiraMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserJiraMetric.class.st @@ -1,22 +1,23 @@ Class { - #name : #UserJiraMetric, - #superclass : #UserMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'UserJiraMetric', + #superclass : 'UserMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } UserJiraMetric >> calculate [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UserJiraMetric >> description [ ^ self subclassResponsibility ] -{ #category : #loading } +{ #category : 'loading' } UserJiraMetric >> load [ userMergeRequests := self @@ -24,7 +25,7 @@ UserJiraMetric >> load [ until: (period at: #until) ] -{ #category : #accessing } +{ #category : 'accessing' } UserJiraMetric >> name [ ^ self class name asString diff --git a/src/GitLabHealth-Model-Analysis/UserMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/UserMergeRequestMetric.class.st index 76258fc..2102b1d 100644 --- a/src/GitLabHealth-Model-Analysis/UserMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserMergeRequestMetric.class.st @@ -1,22 +1,23 @@ Class { - #name : #UserMergeRequestMetric, - #superclass : #UserMetric, - #category : 'GitLabHealth-Model-Analysis' + #name : 'UserMergeRequestMetric', + #superclass : 'UserMetric', + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #calculating } +{ #category : 'calculating' } UserMergeRequestMetric >> calculate [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UserMergeRequestMetric >> description [ ^ self subclassResponsibility ] -{ #category : #loading } +{ #category : 'loading' } UserMergeRequestMetric >> load [ userMergeRequests := self @@ -24,7 +25,7 @@ UserMergeRequestMetric >> load [ until: (period at: #until). ] -{ #category : #accessing } +{ #category : 'accessing' } UserMergeRequestMetric >> name [ ^ self class name asString diff --git a/src/GitLabHealth-Model-Analysis/UserMetric.class.st b/src/GitLabHealth-Model-Analysis/UserMetric.class.st index 5ed51cd..ab9d024 100644 --- a/src/GitLabHealth-Model-Analysis/UserMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserMetric.class.st @@ -1,41 +1,42 @@ Class { - #name : #UserMetric, - #superclass : #Metric, + #name : 'UserMetric', + #superclass : 'Metric', #instVars : [ 'user', 'userCommits', 'userMergeRequests', 'emailDomain' ], - #category : 'GitLabHealth-Model-Analysis' + #category : 'GitLabHealth-Model-Analysis', + #package : 'GitLabHealth-Model-Analysis' } -{ #category : #utils } +{ #category : 'utils' } UserMetric >> cacheSymbolFor: anEntityType since: since until: until [ ^ (anEntityType printString , ' since ' , since printString , ' to ' , until printString) asSymbol ] -{ #category : #calculating } +{ #category : 'calculating' } UserMetric >> calculate [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UserMetric >> description [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UserMetric >> emailDomain: anObject [ emailDomain := anObject ] -{ #category : #churn } +{ #category : 'churn' } UserMetric >> foundSuccessorOf: commits andCompleteImportForMax: commitLimit [ | analyzingCommits i size | @@ -57,18 +58,18 @@ UserMetric >> foundSuccessorOf: commits andCompleteImportForMax: commitLimit [ ^ analyzingCommits ] -{ #category : #initialization } +{ #category : 'initialization' } UserMetric >> initialize [ over := Date ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> load [ ^ self subclassResponsibility ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadCompleteMergeRequestsSince: since until: until [ | mergeRequests | @@ -82,7 +83,7 @@ UserMetric >> loadCompleteMergeRequestsSince: since until: until [ ^ mergeRequests ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadMergeRequestsSince: since until: until [ | cacheSymbol mergeRequests | @@ -110,7 +111,7 @@ UserMetric >> loadMergeRequestsSince: since until: until [ mergeRequest author = user ]" ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadMergeRequestsWithJiraIssueSince: since until: until [ | email mergeRequests | @@ -130,7 +131,7 @@ UserMetric >> loadMergeRequestsWithJiraIssueSince: since until: until [ mergeRequest jiraIssue isNotNil ] ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadUserCommitsSince: since until: until [ | cacheSymbol allCommits | @@ -161,7 +162,7 @@ UserMetric >> loadUserCommitsSince: since until: until [ ^ allCommits reject: [ :commit | commit commitCreator ~= user ] ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadUserCompleteCommitsSince: since until: until [ | commits | @@ -170,7 +171,7 @@ UserMetric >> loadUserCompleteCommitsSince: since until: until [ ^ commits ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadUserCompleteMergeRequestsSince: since until: until [ | mergeRequests | @@ -183,7 +184,7 @@ UserMetric >> loadUserCompleteMergeRequestsSince: since until: until [ ^ mergeRequests ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadUserCompleteMergeRequestsWithJiraIssueSince: since until: until [ | email mergeRequests | @@ -204,7 +205,7 @@ UserMetric >> loadUserCompleteMergeRequestsWithJiraIssueSince: since until: unti mergeRequest jiraIssue isNotNil ] ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadUserMergeRequestsSince: since until: until [ | mergeRequests | @@ -213,7 +214,7 @@ UserMetric >> loadUserMergeRequestsSince: since until: until [ ^ mergeRequests select: [ :mergeRequest | mergeRequest author = user ] ] -{ #category : #loading } +{ #category : 'loading' } UserMetric >> loadUserMergeRequestsWithJiraIssueSince: since until: until [ | email mergeRequests | @@ -232,19 +233,19 @@ UserMetric >> loadUserMergeRequestsWithJiraIssueSince: since until: until [ mergeRequest jiraIssue isNotNil ] ] -{ #category : #accessing } +{ #category : 'accessing' } UserMetric >> name [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UserMetric >> user: anObject [ user := anObject ] -{ #category : #email } +{ #category : 'email' } UserMetric >> userEmail [ user public_email = '' ifFalse: [ ^ user public_email ]. diff --git a/src/GitLabHealth-Model-Analysis/package.st b/src/GitLabHealth-Model-Analysis/package.st index b7288f0..d311de9 100644 --- a/src/GitLabHealth-Model-Analysis/package.st +++ b/src/GitLabHealth-Model-Analysis/package.st @@ -1 +1 @@ -Package { #name : #'GitLabHealth-Model-Analysis' } +Package { #name : 'GitLabHealth-Model-Analysis' }