Skip to content

Commit

Permalink
Scolr stats
Browse files Browse the repository at this point in the history
  • Loading branch information
casco committed Sep 19, 2021
1 parent dd4b9cd commit 8c66bd6
Show file tree
Hide file tree
Showing 32 changed files with 148 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Scolr-stats.package/.filetree
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Empty file.
@@ -0,0 +1,4 @@
private
activeAccessCredentials
^ ReviewnatorFileBasedConfiguration singleton accessCredentials
reject: [ :each | each isAdmin | each isActive not ]
21 changes: 21 additions & 0 deletions Scolr-stats.package/ScolrStats.class/instance/asCsvOn..st
@@ -0,0 +1,21 @@
api
asCsvOn: aFilename
| writer |
writer := NeoCSVWriter on: aFilename asFileReference writeStream.
writer
writeHeader:
#('Owner' 'Created' 'Code' 'Sets' 'Articles' 'Included' 'Contributors' 'Tags' 'Reviews').
stats
do: [ :each |
writer
nextPut:
{each owner.
each creationDate ddmmyyyy.
each accessCode.
each resultSetsCount.
each totalArticleCount.
each includedArticleCount.
each contributors size.
each tagCloud size.
each reviewsCount} ].
writer close
@@ -0,0 +1,5 @@
private
repositoryNamed: name
^ ChangeUnawareJsonRepository
storageFolderName: ReviewnatorFileBasedConfiguration storageFoldername
repositoryFilename: name
9 changes: 9 additions & 0 deletions Scolr-stats.package/ScolrStats.class/instance/update.st
@@ -0,0 +1,9 @@
api
update
stats := self activeAccessCredentials
collect: [ :credential |
self
visitReview: (self repositoryNamed: credential repositoryFilename) coReview
withAccessCode: credential repositoryFilename
createdOn: credential modificationDate
requestedBy: credential requestorsEmail ]
@@ -0,0 +1,13 @@
private
visitReview: coReview withAccessCode: code createdOn: creationDate requestedBy: owner
^ ScolrStatsRecord new
accessCode: code;
creationDate: creationDate;
owner: owner;
resultSetsCount: coReview resultSets size;
totalArticleCount: coReview allArticles size;
includedArticleCount: coReview includedArticles size;
contributors: coReview users;
tagCloud: coReview tagsInUse;
reviewsCount: coReview reviews size;
yourself
13 changes: 13 additions & 0 deletions Scolr-stats.package/ScolrStats.class/properties.json
@@ -0,0 +1,13 @@
{
"commentStamp" : "",
"super" : "Object",
"category" : "Scolr-stats",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"stats"
],
"name" : "ScolrStats",
"type" : "normal"
}
Empty file.
@@ -0,0 +1,3 @@
accessing
accessCode: anObject
accessCode := anObject
@@ -0,0 +1,3 @@
accessing
accessCode
^ accessCode
@@ -0,0 +1,3 @@
accessing
contributors: anObject
contributors := anObject
@@ -0,0 +1,3 @@
accessing
contributors
^ contributors
@@ -0,0 +1,3 @@
accessing
creationDate: anObject
creationDate := anObject
@@ -0,0 +1,3 @@
accessing
creationDate
^ creationDate
@@ -0,0 +1,3 @@
accessing
includedArticleCount: anObject
includedArticleCount := anObject
@@ -0,0 +1,3 @@
accessing
includedArticleCount
^ includedArticleCount
3 changes: 3 additions & 0 deletions Scolr-stats.package/ScolrStatsRecord.class/instance/owner..st
@@ -0,0 +1,3 @@
accessing
owner: anObject
owner := anObject
3 changes: 3 additions & 0 deletions Scolr-stats.package/ScolrStatsRecord.class/instance/owner.st
@@ -0,0 +1,3 @@
accessing
owner
^ owner
@@ -0,0 +1,3 @@
accessing
resultSetsCount: anObject
resultSetsCount := anObject
@@ -0,0 +1,3 @@
accessing
resultSetsCount
^ resultSetsCount
@@ -0,0 +1,3 @@
accessing
reviewsCount: anObject
reviewsCount := anObject
@@ -0,0 +1,3 @@
accessing
reviewsCount
^ reviewsCount
@@ -0,0 +1,3 @@
accessing
tagCloud: anObject
tagCloud := anObject
@@ -0,0 +1,3 @@
accessing
tagCloud
^ tagCloud
@@ -0,0 +1,3 @@
accessing
totalArticleCount: anObject
totalArticleCount := anObject
@@ -0,0 +1,3 @@
accessing
totalArticleCount
^ totalArticleCount
21 changes: 21 additions & 0 deletions Scolr-stats.package/ScolrStatsRecord.class/properties.json
@@ -0,0 +1,21 @@
{
"commentStamp" : "",
"super" : "Object",
"category" : "Scolr-stats",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"owner",
"creationDate",
"accessCode",
"resultSetsCount",
"totalArticleCount",
"includedArticleCount",
"contributors",
"tagCloud",
"reviewsCount"
],
"name" : "ScolrStatsRecord",
"type" : "normal"
}
1 change: 1 addition & 0 deletions Scolr-stats.package/monticello.meta/categories.st
@@ -0,0 +1 @@
SystemOrganization addCategory: #'Scolr-stats'!
Empty file.
1 change: 1 addition & 0 deletions Scolr-stats.package/monticello.meta/package
@@ -0,0 +1 @@
(name 'Scolr-stats')
1 change: 1 addition & 0 deletions Scolr-stats.package/properties.json
@@ -0,0 +1 @@
{ }

0 comments on commit 8c66bd6

Please sign in to comment.