Skip to content

Commit 82444ac

Browse files
committed
added the column and redid some packageRank issues
1 parent 3ec7a86 commit 82444ac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

datafiles/static/browse.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const replaceRows = (response) => {
134134
tr.appendChild(createTags(row.tags));
135135
tr.appendChild(createLastUpload(row.lastUpload));
136136
tr.appendChild(createMaintainers(row.maintainers));
137+
tr.appendChild(createSimpleText(row.packageRank));
137138
l.appendChild(tr);
138139
}
139140
};

src/Distribution/Server/Features/PackageRank.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ freshness (x : xs) lastUpd app =
8989
versionLatest = versionNumbers x
9090
daysPastExpiration =
9191
age >>= (\a -> return $ max 0 a - expectedUpdateInterval)
92-
expectedUpdateInterval = int2Float
93-
(min (versionStabilityInterval versionLatest) $ length (x : xs))
92+
expectedUpdateInterval =
93+
int2Float (min (versionStabilityInterval versionLatest) $ length (x : xs))
9494
versionStabilityInterval v | patches v > 3 && major v > 0 = 700
9595
| patches v > 3 = 450
9696
| patches v > 0 = 300
@@ -177,8 +177,7 @@ authorScore :: Int -> PackageDescription -> Scorer
177177
authorScore maintainers desc =
178178
boolScor 1 (not $ S.null $ author desc) <> maintScore
179179
where
180-
maintScore =
181-
boolScor 3 (maintainers > 1) <> scorer 5 (int2Float maintainers)
180+
maintScore = boolScor 3 (maintainers > 1) <> scorer 5 (int2Float maintainers)
182181

183182
codeScore :: IO Float -> IO Float -> IO Scorer
184183
codeScore documentL haskellL = do
@@ -218,7 +217,7 @@ versionScore versionList versions lastUploads desc = do
218217
<> scorer
219218
15
220219
(int2Float $ length $ filter (\x -> major x > 0 || minor x > 0)
221-
intUse
220+
intUse
222221
)
223222
<> scorer
224223
20

0 commit comments

Comments
 (0)