Do not use scientific formatting of scores
This commit is contained in:
parent
2ed724bf05
commit
1aafff1808
@ -338,8 +338,11 @@ testComparator (Entity _ a) (Entity _ b) =
|
||||
((fromMaybe unknownPriority $ testPriority b) `compare` (fromMaybe unknownPriority $ testPriority a))
|
||||
where unknownPriority = 9999
|
||||
|
||||
formatNonScientifically :: Double -> Text
|
||||
formatNonScientifically = T.pack . (printf "%f")
|
||||
|
||||
formatFullScore :: Maybe Evaluation -> Text
|
||||
formatFullScore (Just evaluation) = fromMaybe "???" (T.pack <$> show <$> evaluationScore evaluation)
|
||||
formatFullScore (Just evaluation) = fromMaybe "???" (formatNonScientifically <$> evaluationScore evaluation)
|
||||
formatFullScore Nothing = "N/A"
|
||||
|
||||
formatTruncatedScore :: Maybe Int -> Maybe Evaluation -> Text
|
||||
|
@ -419,7 +419,7 @@ checkOrInsertEvaluation repoDir chan out = do
|
||||
maybeEvaluation <- runDB $ getBy $ UniqueEvaluationTestChecksum (outTest out) (outChecksum out)
|
||||
case maybeEvaluation of
|
||||
Just (Entity _ evaluation) -> do
|
||||
msg chan $ concat ["Already evaluated with score ", (T.pack $ fromMaybe "???" $ show <$> evaluationScore evaluation)]
|
||||
msg chan $ concat ["Already evaluated with score ", (fromMaybe "???" $ formatNonScientifically <$> evaluationScore evaluation)]
|
||||
Nothing -> do
|
||||
msg chan $ "Start evaluation..."
|
||||
challengeDir <- getRepoDir $ challengePrivateRepo challenge
|
||||
@ -429,7 +429,7 @@ checkOrInsertEvaluation repoDir chan out = do
|
||||
Right (Left _) -> do
|
||||
err chan "Cannot parse options, check the challenge repo"
|
||||
Right (Right (_, Just [(_, [result])])) -> do
|
||||
msg chan $ concat [ "Evaluated! Score ", (T.pack $ show result) ]
|
||||
msg chan $ concat [ "Evaluated! Score ", (formatNonScientifically result) ]
|
||||
time <- liftIO getCurrentTime
|
||||
_ <- runDB $ insert $ Evaluation {
|
||||
evaluationTest=outTest out,
|
||||
|
Loading…
Reference in New Issue
Block a user