Skip to content

Commit e1e6452

Browse files
committed
changed documentation parameter to get reasonable output
1 parent 0a98ed2 commit e1e6452

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Distribution/Server/Features/PackageRank.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ cabalScore p docum =
113113
tests = boolScor 50 (hasTests p)
114114
benchs = boolScor 10 (hasBenchmarks p)
115115
desc = scorer 30 (min 1 (int2Float (S.length $ description p) / 300))
116-
-- documentation = boolScor 30 ()
117116
homeP = boolScor 30 (not $ S.null $ homepage p)
118117
sourceRp = boolScor 8 (not $ null $ sourceRepos p)
119118
cats = boolScor 5 (not $ S.null $ category p)
@@ -230,7 +229,7 @@ codeScore documentS haskellL =
230229
boolScor 1 (haskellL > 700)
231230
<> boolScor 1 (haskellL < 80000)
232231
<> fracScor 2 (min 1 (haskellL / 5000))
233-
<> fracScor 2 (min 1 documentS / ((3000 + haskellL) * 200))
232+
<> fracScor 2 (min 1 documentS / ((3000 + haskellL) * 1600))
234233

235234
versionScore
236235
:: [Version]
@@ -281,11 +280,10 @@ temporalScore p lastUploads versionList recentDownloads = do
281280
where
282281
isApp = (isNothing . library) p && (not . null . executables) p
283282
downloadScore = calcDownScore recentDownloads
284-
calcDownScore i = Scorer 5 $ min
283+
calcDownScore i = scorer 5 $ min
285284
( (logBase 2 (int2Float $ max 0 (i - 100) + 100) - 6.6)
286285
/ (if isApp then 5 else 6)
287286
)
288-
5
289287
packageFreshness = case safeHead lastUploads of
290288
Nothing -> return 0
291289
(Just l) -> freshness versionList l isApp

0 commit comments

Comments
 (0)