diff --git a/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st index c2f60b6..210996f 100644 --- a/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st @@ -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 diff --git a/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st index 95146a0..56fd116 100644 --- a/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st @@ -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 | @@ -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' diff --git a/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st b/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st index cf4c0da..a368fd8 100644 --- a/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st @@ -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 | @@ -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' diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st index 4674adb..c6d5e94 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st @@ -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 | @@ -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 diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st index 813d829..3109cc7 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st @@ -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 | @@ -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 diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st index 3ea58bd..bd0acbf 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st @@ -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 | @@ -37,7 +36,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 62d81e4..a34aff2 100644 --- a/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st @@ -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 | @@ -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 ] diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st index bd3c7ab..9797a54 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st @@ -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 | @@ -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 diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st index b59d283..66e71b0 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st @@ -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 | @@ -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 diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st index 8feb8e8..e6f465c 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st @@ -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 | @@ -37,7 +36,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 f04d16d..5872abd 100644 --- a/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st @@ -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 | @@ -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 diff --git a/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st b/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st index f1e1855..10c7d36 100644 --- a/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st @@ -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 | @@ -22,7 +21,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 7988338..9114c13 100644 --- a/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'CommitsNumberByJiraTicketsMetric', - #superclass : 'UserJiraMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #CommitsNumberByJiraTicketsMetric, + #superclass : #UserJiraMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } CommitsNumberByJiraTicketsMetric >> calculate [ | groupedByDate dateOver | @@ -24,13 +23,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 725367e..8cc89bc 100644 --- a/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'ContributedProjectMetric', - #superclass : 'UserCommitsMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #ContributedProjectMetric, + #superclass : #UserCommitsMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } ContributedProjectMetric >> calculate [ | groupedByDate dateOver projects | @@ -26,7 +25,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 a610633..f6b0f08 100644 --- a/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st @@ -1,14 +1,13 @@ Class { - #name : 'DelayUntilFirstChurnMetric', - #superclass : 'UserCommitsMetric', + #name : #DelayUntilFirstChurnMetric, + #superclass : #UserCommitsMetric, #instVars : [ 'maxCommitWindow' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } DelayUntilFirstChurnMetric >> calculate [ | commits groupedByDate res average | @@ -70,14 +69,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 e4bdeda..808bbd6 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st @@ -1,15 +1,14 @@ Class { - #name : 'GLHUserCatalogue', - #superclass : 'Dictionary', + #name : #GLHUserCatalogue, + #superclass : #Dictionary, #instVars : [ 'users', 'anImporter' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'import' } +{ #category : #import } GLHUserCatalogue class >> loadFromJson: aString [ | catalogue dic | @@ -33,7 +32,7 @@ GLHUserCatalogue class >> loadFromJson: aString [ ^ catalogue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogue class >> scrapeContributedProjectsForCommitAuthorsRelatedToUser: aGLHUser [ "get all " @@ -64,7 +63,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 " @@ -88,13 +87,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 @@ -108,7 +107,7 @@ GLHUserCatalogue >> addUser: aGLHUser withName: name [ yourself ] ] -{ #category : 'adding' } +{ #category : #adding } GLHUserCatalogue >> addUser: aGLHUser withNames: aCollectionOfNames [ self @@ -122,20 +121,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 | @@ -151,7 +150,7 @@ GLHUserCatalogue >> collectUsernames [ ^ username2User ] -{ #category : 'completion' } +{ #category : #completion } GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser with: authorName [ self @@ -163,7 +162,7 @@ GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser with: authorName [ self addUser: aGLHUser withName: authorName ] -{ #category : 'completion' } +{ #category : #completion } GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self @@ -176,7 +175,7 @@ GLHUserCatalogue >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self addUser: aGLHUser withNames: authorNames ] -{ #category : 'export' } +{ #category : #export } GLHUserCatalogue >> exportToJson [ | tempDic | @@ -197,13 +196,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 | @@ -211,7 +210,7 @@ GLHUserCatalogue >> namesAt: aGLHUser [ ^ assoc value ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogue >> reImportAllUsers [ "use it after a catalogue import from JSON" @@ -224,7 +223,7 @@ GLHUserCatalogue >> reImportAllUsers [ assoc key: user ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogue >> scrapeAuthorNameForAllUsers [ | currentUsers | @@ -234,7 +233,7 @@ GLHUserCatalogue >> scrapeAuthorNameForAllUsers [ scrapeWithImporter: anImporter contributedProjectsForCommitAuthorsRelatedToUser: key) ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogue >> scrapeAuthorNameForUser: aGLHUser [ | assoc | @@ -244,7 +243,7 @@ GLHUserCatalogue >> scrapeAuthorNameForUser: aGLHUser [ contributedProjectsForCommitAuthorsRelatedToUser: aGLHUser) ] -{ #category : 'scrape' } +{ #category : #scrape } GLHUserCatalogue >> scrapeAuthorNamesForUsers: aUserCollection [ aUserCollection do: [ :aGLHUser | @@ -252,7 +251,7 @@ GLHUserCatalogue >> scrapeAuthorNamesForUsers: aUserCollection [ ]. ] -{ #category : 'completion' } +{ #category : #completion } GLHUserCatalogue >> searchModelForAuthorNamesOfUser: aGLHUser [ |assoc| assoc := self associationAt: aGLHUser. @@ -260,19 +259,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 7d6db7f..108c1d6 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st @@ -1,15 +1,14 @@ Class { - #name : 'GLHUserCatalogueItem', - #superclass : 'Dictionary', + #name : #GLHUserCatalogueItem, + #superclass : #Dictionary, #instVars : [ 'user', 'names' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'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 39a7c65..7376d60 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st @@ -1,11 +1,10 @@ Class { - #name : 'GLHUserCatalogueV2', - #superclass : 'GLHUserCatalogue', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #GLHUserCatalogueV2, + #superclass : #GLHUserCatalogue, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'import' } +{ #category : #import } GLHUserCatalogueV2 class >> loadFromJson: aString [ | catalogue dic | @@ -31,7 +30,7 @@ GLHUserCatalogueV2 class >> loadFromJson: aString [ ^ catalogue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogueV2 class >> scrapeContributedProjectsForCommitAuthorsRelatedToUser: aGLHUser [ "get all " @@ -62,7 +61,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 " @@ -86,7 +85,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| @@ -101,7 +100,7 @@ GLHUserCatalogueV2 >> RSHeatMapLevenshtein [ builder canvas open ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogueV2 >> RSHeatMapLevenshteinTrimedAt: aBlockCondition [ | builder matrice| @@ -126,21 +125,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 @@ -150,13 +149,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| @@ -166,14 +165,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| @@ -183,19 +182,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 | @@ -212,7 +211,7 @@ GLHUserCatalogueV2 >> collectUsernames [ ^ username2User ] -{ #category : 'completion' } +{ #category : #completion } GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser with: authorName [ self @@ -224,7 +223,7 @@ GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser with: authorName [ self addUser: aGLHUser withName: authorName ] -{ #category : 'completion' } +{ #category : #completion } GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self @@ -237,7 +236,7 @@ GLHUserCatalogueV2 >> completeAuthorNameOfUser: aGLHUser withAll: authorNames [ self addUser: aGLHUser withNames: authorNames ] -{ #category : 'export' } +{ #category : #export } GLHUserCatalogueV2 >> exportToJson [ | tempDic | @@ -264,7 +263,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 ]. @@ -274,7 +273,7 @@ GLHUserCatalogueV2 >> fuse: mainUser with: subUser [ ]. ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } GLHUserCatalogueV2 >> initACatalogueEntryForUser: aGLHUser [. ^ Dictionary new @@ -289,13 +288,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| @@ -312,17 +311,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" @@ -338,7 +337,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| @@ -354,7 +353,7 @@ GLHUserCatalogueV2 >> reImportUser: aGLHUser [ ] -{ #category : 'scrape' } +{ #category : #scrape } GLHUserCatalogueV2 >> scrapeAuthorNameForAllRealUsers [ |listOfUsers| @@ -362,7 +361,7 @@ GLHUserCatalogueV2 >> scrapeAuthorNameForAllRealUsers [ listOfUsers do: [ :user | self scrapeAuthorNameForUser: user ]. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GLHUserCatalogueV2 >> scrapeAuthorNameForAllUsers [ |listOfUsers| @@ -371,7 +370,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 @@ -379,7 +378,7 @@ GLHUserCatalogueV2 >> scrapeAuthorNameForUser: aGLHUser [ contributedProjectsForCommitAuthorsRelatedToUser: aGLHUser). ] -{ #category : 'scrape' } +{ #category : #scrape } GLHUserCatalogueV2 >> scrapeAuthorNamesForUsers: aUserCollection [ aUserCollection do: [ :aGLHUser | @@ -387,19 +386,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 | @@ -409,24 +408,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 21aaebb..dac8652 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,11 +8,10 @@ Class { 'onProject', 'maxChildCommits' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'analyze' } +{ #category : #analyze } GitAnalyzer >> analyseChurn [ | commitFiles totalContribution childCommits access | @@ -40,7 +39,7 @@ GitAnalyzer >> analyseChurn [ yourself ] ] -{ #category : 'analyze' } +{ #category : #analyze } GitAnalyzer >> analyseCommentContribution [ | numberOfComments | @@ -58,7 +57,7 @@ GitAnalyzer >> analyseCommentContribution [ ^ numberOfComments ] -{ #category : 'commit' } +{ #category : #commit } GitAnalyzer >> analyseCommitContribution [ @@ -69,7 +68,7 @@ GitAnalyzer >> analyseCommitContribution [ (#deletion -> fromCommit deletions). } asDictionary ] -{ #category : 'analyze' } +{ #category : #analyze } GitAnalyzer >> analyseCommitFrequencyFromCommits: initialCommits [ | commits response | @@ -88,7 +87,7 @@ GitAnalyzer >> analyseCommitFrequencyFromCommits: initialCommits [ ^ commits ] -{ #category : 'analyze' } +{ #category : #analyze } GitAnalyzer >> analyseCommitFrequencySince: since until: until [ | commits response | @@ -112,7 +111,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" @@ -133,7 +132,7 @@ GitAnalyzer >> analyseDelayUntilFirstChurn [ res] ] -{ #category : 'analyze' } +{ #category : #analyze } GitAnalyzer >> analyseMergeResquestValidation: aGLHPMergeRequest [ | creationDate mergedDate response | @@ -164,7 +163,7 @@ GitAnalyzer >> analyseMergeResquestValidation: aGLHPMergeRequest [ yourself ] ] -{ #category : 'filter' } +{ #category : #filter } GitAnalyzer >> arrangeCommitsByDate: commits [ | date2commits | @@ -183,7 +182,7 @@ GitAnalyzer >> arrangeCommitsByDate: commits [ ^ date2commits ] -{ #category : 'churn' } +{ #category : #churn } GitAnalyzer >> computeChurnOnFiles: aCollection [ | changesDic perFileChanges churns initialAuthor followingAuthors| @@ -242,7 +241,7 @@ GitAnalyzer >> computeChurnOnFiles: aCollection [ (#details -> perFileChanges) } asDictionary ] -{ #category : 'churn' } +{ #category : #churn } GitAnalyzer >> computeSpecificChurnOf: commit2Changes [ | changesDic | @@ -272,7 +271,7 @@ GitAnalyzer >> computeSpecificChurnOf: commit2Changes [ ^ self sortChangeDic: changesDic ] -{ #category : 'accessing' } +{ #category : #accessing } GitAnalyzer >> firstAmandmentFromChrun: aChurnAnalysis [ |details whereChangesOccurs firstCommitsPerFile| @@ -295,17 +294,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 @@ -313,7 +312,7 @@ GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit [ withMaxCommits: self maxChildCommits. ] -{ #category : 'churn' } +{ #category : #churn } GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit withMaxCommits: max [ | commitFiles | @@ -329,7 +328,7 @@ GitAnalyzer >> impactedFilesInFollowUpCommitsOf: aGLHCommit withMaxCommits: max ^ commitFiles ] -{ #category : 'initialization' } +{ #category : #initialization } GitAnalyzer >> initialize [ glModel := GLHModel new. @@ -339,7 +338,7 @@ GitAnalyzer >> initialize [ maxChildCommits := -1 ] -{ #category : 'insertion' } +{ #category : #insertion } GitAnalyzer >> insertDiff: aGLPHEDiffRange into: fileChangesDic startingFrom: from [ |index| index := from. @@ -357,38 +356,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 ]. @@ -412,7 +411,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 1c24ce7..a6c4f8f 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,11 +15,10 @@ Class { 'metrics', 'analyses' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } GitMetricExporter class >> demoPeriod [ ^ self new @@ -28,7 +27,7 @@ GitMetricExporter class >> demoPeriod [ addAPeriodFrom: '01 march 2024' to: '31 may 2024' ] -{ #category : 'adding' } +{ #category : #adding } GitMetricExporter >> addAPeriodFrom: since to: until [ runningPeriods add: { @@ -38,7 +37,7 @@ GitMetricExporter >> addAPeriodFrom: since to: until [ ^runningPeriods ] -{ #category : 'adding' } +{ #category : #adding } GitMetricExporter >> addEntitiesFromUserNames: userNames [ "import all the project since a certain time" @@ -86,7 +85,7 @@ GitMetricExporter >> addEntitiesFromUserNames: userNames [ ^ self ] -{ #category : 'adding' } +{ #category : #adding } GitMetricExporter >> addEntitiesFromUserNamesAndProjects: usersWithProjects [ self @@ -112,7 +111,7 @@ GitMetricExporter >> addEntitiesFromUserNamesAndProjects: usersWithProjects [ ^ self ] -{ #category : 'utilities' } +{ #category : #utilities } GitMetricExporter >> constructFilePath: runningOver [ | file | @@ -125,7 +124,7 @@ GitMetricExporter >> constructFilePath: runningOver [ ^ file ] -{ #category : 'exporting' } +{ #category : #exporting } GitMetricExporter >> csvMetricsFor: metricCollection at: date [ | csvMetrics | @@ -143,12 +142,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 @@ -164,7 +163,7 @@ GitMetricExporter >> exportFor: usersWithProjects [ Year } ] -{ #category : 'exporting' } +{ #category : #exporting } GitMetricExporter >> exportFor: usersWithProjects over: aCollectionOfDateWeekMonthOrYear [ self @@ -179,21 +178,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 | @@ -217,7 +216,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 | @@ -259,7 +258,7 @@ GitMetricExporter >> exportProjectAnalysesInCSV [ exportBrowserModel writeCSVOn: aStream ] ] ] -{ #category : 'exporting' } +{ #category : #exporting } GitMetricExporter >> exportUserAnalysesInCSV [ | exportBrowserModel groupedByOver group groupOver groupByName periods csvMetrics file | @@ -302,7 +301,7 @@ GitMetricExporter >> exportUserAnalysesInCSV [ exportBrowserModel writeCSVOn: aStream ] ] ] -{ #category : 'projects' } +{ #category : #projects } GitMetricExporter >> findParticipationOfCommitAuthorNamed: username amongProjects: aCollectionOfProjects [ | response itsProjects i size | @@ -332,12 +331,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. @@ -353,7 +352,7 @@ GitMetricExporter >> generateAnalysesOver: aDateWeekMonthOrYear [ ^ analyses ] -{ #category : 'analysis' } +{ #category : #analysis } GitMetricExporter >> generateProjectsAnalysesDuringPeriod: period over: aDateWeekMonthOrYear [ ^self projectEntities collect: [ :project | @@ -363,7 +362,7 @@ GitMetricExporter >> generateProjectsAnalysesDuringPeriod: period over: aDateWee over: aDateWeekMonthOrYear ] ] -{ #category : 'analysis' } +{ #category : #analysis } GitMetricExporter >> generateUsersAnalysesDuringPeriod: period over: aDateWeekMonthOrYear [ | userAnalysisReport newMetric result | @@ -391,7 +390,7 @@ GitMetricExporter >> generateUsersAnalysesDuringPeriod: period over: aDateWeekMo userAnalysisReport ] ] -{ #category : 'utilities' } +{ #category : #utilities } GitMetricExporter >> getAnalysisWithDate: date from: analysisCollection [ ^analysisCollection @@ -399,13 +398,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 | @@ -429,7 +428,7 @@ GitMetricExporter >> importAnalysesFromS3: bucketName accessKey: accessKey secre flattened ] -{ #category : 'initialization' } +{ #category : #initialization } GitMetricExporter >> initialize [ entities := OrderedCollection new. @@ -462,29 +461,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 | @@ -492,25 +491,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 | @@ -519,7 +518,7 @@ GitMetricExporter >> setupAnalysisForProjectsWithIds: projectIds [ entities addAll: projects ] -{ #category : 'setup' } +{ #category : #setup } GitMetricExporter >> setupAnalysisForUsersWithNames: userNames [ "import all the project since a certain time" @@ -542,25 +541,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 68a1437..6a969f3 100644 --- a/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'JiraTimeMRTimeDifferenceMetric', - #superclass : 'UserJiraMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #JiraTimeMRTimeDifferenceMetric, + #superclass : #UserJiraMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } JiraTimeMRTimeDifferenceMetric >> calculate [ | groupedByDate dateOver | @@ -52,13 +51,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 1cd32d1..609b404 100644 --- a/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'MergeRequestDurationMetric', - #superclass : 'UserMergeRequestMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #MergeRequestDurationMetric, + #superclass : #UserMergeRequestMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } MergeRequestDurationMetric >> calculate [ | groupedByDate gitAnalyzer mergeRequestsValidation filterGroups | @@ -52,13 +51,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 208a604..4217136 100644 --- a/src/GitLabHealth-Model-Analysis/MergedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/MergedMergeRequestMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'MergedMergeRequestMetric', - #superclass : 'UserMergeRequestMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #MergedMergeRequestMetric, + #superclass : #UserMergeRequestMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } MergedMergeRequestMetric >> calculate [ | groupedByDate userMergedMergeRequests dateOver | @@ -29,13 +28,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 @@ -43,7 +42,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 5643853..7e7f8e8 100644 --- a/src/GitLabHealth-Model-Analysis/Metric.class.st +++ b/src/GitLabHealth-Model-Analysis/Metric.class.st @@ -1,63 +1,62 @@ Class { - #name : 'Metric', - #superclass : 'Object', + #name : #Metric, + #superclass : #Object, #instVars : [ 'period', 'over', 'glhImporter', 'jiraImporter' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'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 := { @@ -65,7 +64,7 @@ Metric >> setPeriodSince: since until: until [ (#until -> until asDate) } asDictionary ] -{ #category : 'utils - date' } +{ #category : #'utils - date' } Metric >> setupGroupedDate [ | groupedByDate start end increment overSymbol | @@ -86,9 +85,9 @@ Metric >> setupGroupedDate [ over := #day ]. - [ groupedByDate keys last asDateAndTime < end ] whileTrue: [ + [ groupedByDate keys last asDate < end ] whileTrue: [ | index | - index := groupedByDate keys last asDateAndTime + index := groupedByDate keys last asDate + (increment perform: overSymbol). index := self transformDate: index to: over. groupedByDate @@ -111,7 +110,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 69e5f85..2e1c4b2 100644 --- a/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'OpenedMergeRequestMetric', - #superclass : 'UserMergeRequestMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #OpenedMergeRequestMetric, + #superclass : #UserMergeRequestMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } OpenedMergeRequestMetric >> calculate [ | groupedByDate dateOver | @@ -25,13 +24,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 727c4e7..185e7c5 100644 --- a/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'PendingMergeRequestMetric', - #superclass : 'UserMergeRequestMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #PendingMergeRequestMetric, + #superclass : #UserMergeRequestMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } PendingMergeRequestMetric >> calculate [ | groupedByDate userMergedMergeRequests dateOver | @@ -27,13 +26,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 5c107b1..f9990bd 100644 --- a/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st @@ -1,20 +1,19 @@ Class { - #name : 'ProjectAnalysisReport', - #superclass : 'AnalysisReport', + #name : #ProjectAnalysisReport, + #superclass : #AnalysisReport, #instVars : [ 'projectName' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'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 13e703c..fbb90de 100644 --- a/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st @@ -1,9 +1,8 @@ Class { - #name : 'ProjectMetric', - #superclass : 'Metric', + #name : #ProjectMetric, + #superclass : #Metric, #instVars : [ 'project' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } diff --git a/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st index 23eb761..ca408fe 100644 --- a/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'ReviewedByUserMergeRequestMetric', - #superclass : 'UserMergeRequestMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #ReviewedByUserMergeRequestMetric, + #superclass : #UserMergeRequestMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } ReviewedByUserMergeRequestMetric >> calculate [ | groupedByDate mergedMergeRequest reviewedMergeRequests dateOver gitAnalyzer | @@ -37,13 +36,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 @@ -51,7 +50,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 2ad8d7a..cf25445 100644 --- a/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'SelfMergedUnderAMinuteMergeRequestMetric', - #superclass : 'UserMergeRequestMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #SelfMergedUnderAMinuteMergeRequestMetric, + #superclass : #UserMergeRequestMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } SelfMergedUnderAMinuteMergeRequestMetric >> calculate [ | groupedByDate mergedMergeRequest noVerificationMergeRequests dateOver gitAnalyzer | @@ -44,13 +43,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 @@ -59,7 +58,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 fd0ba7d..d6be4df 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 31ea48b..5af9688 100644 --- a/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st @@ -1,11 +1,10 @@ Class { - #name : 'TimeBetweenCommitMetric', - #superclass : 'UserCommitsMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #TimeBetweenCommitMetric, + #superclass : #UserCommitsMetric, + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'calculating' } +{ #category : #calculating } TimeBetweenCommitMetric >> calculate [ | commitSortedByDate commits1 commits2 differences groupedByDate dateOver average | @@ -45,7 +44,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 d9b5535..5288793 100644 --- a/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st @@ -1,33 +1,32 @@ Class { - #name : 'UserAnalysisReport', - #superclass : 'AnalysisReport', + #name : #UserAnalysisReport, + #superclass : #AnalysisReport, #instVars : [ 'username', 'email' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } -{ #category : 'accessing' } +{ #category : #accessing } UserAnalysisReport >> email [ ^ email ] -{ #category : 'accessing' } +{ #category : #accessing } UserAnalysisReport >> email: anObject [ email := anObject ] -{ #category : 'accessing' } +{ #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 953ab4f..e891e4a 100644 --- a/src/GitLabHealth-Model-Analysis/UserCommitsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserCommitsMetric.class.st @@ -1,23 +1,22 @@ Class { - #name : 'UserCommitsMetric', - #superclass : 'UserMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #UserCommitsMetric, + #superclass : #UserMetric, + #category : #'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 @@ -25,7 +24,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 2de1b38..ba19b36 100644 --- a/src/GitLabHealth-Model-Analysis/UserJiraMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserJiraMetric.class.st @@ -1,23 +1,22 @@ Class { - #name : 'UserJiraMetric', - #superclass : 'UserMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #UserJiraMetric, + #superclass : #UserMetric, + #category : #'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 @@ -25,7 +24,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 2102b1d..83a07b9 100644 --- a/src/GitLabHealth-Model-Analysis/UserMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserMergeRequestMetric.class.st @@ -1,23 +1,22 @@ Class { - #name : 'UserMergeRequestMetric', - #superclass : 'UserMetric', - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #name : #UserMergeRequestMetric, + #superclass : #UserMetric, + #category : #'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 @@ -25,7 +24,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 ab9d024..7e5ac75 100644 --- a/src/GitLabHealth-Model-Analysis/UserMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/UserMetric.class.st @@ -1,42 +1,41 @@ Class { - #name : 'UserMetric', - #superclass : 'Metric', + #name : #UserMetric, + #superclass : #Metric, #instVars : [ 'user', 'userCommits', 'userMergeRequests', 'emailDomain' ], - #category : 'GitLabHealth-Model-Analysis', - #package : 'GitLabHealth-Model-Analysis' + #category : #'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 | @@ -58,18 +57,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 | @@ -83,7 +82,7 @@ UserMetric >> loadCompleteMergeRequestsSince: since until: until [ ^ mergeRequests ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadMergeRequestsSince: since until: until [ | cacheSymbol mergeRequests | @@ -111,7 +110,7 @@ UserMetric >> loadMergeRequestsSince: since until: until [ mergeRequest author = user ]" ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadMergeRequestsWithJiraIssueSince: since until: until [ | email mergeRequests | @@ -131,7 +130,7 @@ UserMetric >> loadMergeRequestsWithJiraIssueSince: since until: until [ mergeRequest jiraIssue isNotNil ] ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadUserCommitsSince: since until: until [ | cacheSymbol allCommits | @@ -162,7 +161,7 @@ UserMetric >> loadUserCommitsSince: since until: until [ ^ allCommits reject: [ :commit | commit commitCreator ~= user ] ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadUserCompleteCommitsSince: since until: until [ | commits | @@ -171,7 +170,7 @@ UserMetric >> loadUserCompleteCommitsSince: since until: until [ ^ commits ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadUserCompleteMergeRequestsSince: since until: until [ | mergeRequests | @@ -184,7 +183,7 @@ UserMetric >> loadUserCompleteMergeRequestsSince: since until: until [ ^ mergeRequests ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadUserCompleteMergeRequestsWithJiraIssueSince: since until: until [ | email mergeRequests | @@ -205,7 +204,7 @@ UserMetric >> loadUserCompleteMergeRequestsWithJiraIssueSince: since until: unti mergeRequest jiraIssue isNotNil ] ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadUserMergeRequestsSince: since until: until [ | mergeRequests | @@ -214,7 +213,7 @@ UserMetric >> loadUserMergeRequestsSince: since until: until [ ^ mergeRequests select: [ :mergeRequest | mergeRequest author = user ] ] -{ #category : 'loading' } +{ #category : #loading } UserMetric >> loadUserMergeRequestsWithJiraIssueSince: since until: until [ | email mergeRequests | @@ -233,19 +232,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 d311de9..b7288f0 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' }