forked from filipg/gonito
update for GEval 1.1.0.0
This commit is contained in:
parent
4ec90bdb10
commit
306d9d0af6
@ -34,6 +34,8 @@ import Data.Attoparsec.Text
|
||||
|
||||
import Data.Text (pack, unpack)
|
||||
|
||||
import Data.Conduit.SmartSource
|
||||
|
||||
getShowChallengeR :: Text -> Handler Html
|
||||
getShowChallengeR name = do
|
||||
(Entity challengeId challenge) <- runDB $ getBy404 $ UniqueName name
|
||||
@ -325,7 +327,7 @@ checkOrInsertEvaluation repoDir chan out = do
|
||||
case resultOrException of
|
||||
Right (Left _) -> do
|
||||
err chan "Cannot parse options, check the challenge repo"
|
||||
Right (Right (_, Just [result])) -> do
|
||||
Right (Right (_, Just [(_, [result])])) -> do
|
||||
msg chan $ concat [ "Evaluated! Score ", (T.pack $ show result) ]
|
||||
time <- liftIO getCurrentTime
|
||||
_ <- runDB $ insert $ Evaluation {
|
||||
@ -342,7 +344,7 @@ checkOrInsertEvaluation repoDir chan out = do
|
||||
Left exception -> do
|
||||
err chan $ "Evaluation failed: " ++ (T.pack $ show exception)
|
||||
|
||||
rawEval :: FilePath -> Metric -> FilePath -> Text -> IO (Either GEvalException (Either (ParserResult GEvalOptions) (GEvalOptions, Maybe [MetricValue])))
|
||||
rawEval :: FilePath -> Metric -> FilePath -> Text -> IO (Either GEvalException (Either (ParserResult GEvalOptions) (GEvalOptions, Maybe [(SourceSpec, [MetricValue])])))
|
||||
rawEval challengeDir metric repoDir name = Import.try (runGEvalGetOptions [
|
||||
"--alt-metric", (show metric),
|
||||
"--expected-directory", challengeDir,
|
||||
|
@ -122,7 +122,7 @@ library
|
||||
, filemanip
|
||||
, cryptohash
|
||||
, markdown
|
||||
, geval >= 1.0.0.0
|
||||
, geval >= 1.1.0.0 && < 1.2
|
||||
, filepath
|
||||
, yesod-table
|
||||
, regex-tdfa
|
||||
|
@ -8,7 +8,7 @@ packages:
|
||||
git: https://github.com/bitemyapp/esqueleto
|
||||
commit: b81e0d951e510ebffca03c5a58658ad884cc6fbd
|
||||
extra-dep: true
|
||||
extra-deps: [../geval,wai-handler-fastcgi-3.0.0.2,murmur3-1.0.3,random-strings-0.1.1.0]
|
||||
extra-deps: [../geval,wai-handler-fastcgi-3.0.0.2,murmur3-1.0.3,random-strings-0.1.1.0,naturalcomp-0.0.3]
|
||||
resolver: lts-11.9
|
||||
image:
|
||||
container:
|
||||
|
Loading…
Reference in New Issue
Block a user