fix handling compressed files
This commit is contained in:
parent
010f0f46ab
commit
0708b746a9
@ -1,5 +1,5 @@
|
||||
name: geval
|
||||
version: 1.1.0.0
|
||||
version: 1.1.1.0
|
||||
synopsis: Machine learning evaluation tools
|
||||
description: Please see README.md
|
||||
homepage: http://github.com/name/project
|
||||
|
@ -336,9 +336,13 @@ checkAndGetFiles forceInput gevalSpec = do
|
||||
|
||||
checkMultipleOuts :: GEvalSpecification -> IO (Maybe [FilePath])
|
||||
checkMultipleOuts gevalSpec = do
|
||||
isSimpleOutThere <- D.doesFileExist (outTestDirectory </> outFile)
|
||||
-- if the out.tsv is there, just use it
|
||||
outFilePath <- lookForCompressedFiles (outTestDirectory </> outFile)
|
||||
isSimpleOutThere <- D.doesFileExist outFilePath
|
||||
|
||||
let patterns = Prelude.map (\ext -> compile ("out-*.tsv" ++ ext)) ["", ".gz", ".bz2", ".xz"]
|
||||
multipleOuts <- Prelude.concat <$> globDir patterns outTestDirectory
|
||||
|
||||
if outFile == "out.tsv" && not isSimpleOutThere && multipleOuts /= []
|
||||
then
|
||||
return $ Just multipleOuts
|
||||
|
Loading…
Reference in New Issue
Block a user