elynx-tools 0.7.2.2 → 0.8.0.0
raw patch · 8 files changed
+29/−24 lines, 8 filesdep ~optparse-applicativePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: optparse-applicative
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- README.md +5/−5
- elynx-tools.cabal +3/−3
- src/ELynx/Tools/ELynx.hs +4/−4
- src/ELynx/Tools/Equality.hs +1/−1
- src/ELynx/Tools/Logger.hs +2/−2
- src/ELynx/Tools/Options.hs +5/−5
- src/ELynx/Tools/Reproduction.hs +4/−4
ChangeLog.md view
@@ -5,6 +5,11 @@ ## Unreleased changes +## Version 0.8.0.0++- Adapt to breaking changes in upstream libraries (`data-default`).++ ## Version 0.7.2.0 - `slynx`: Allow global normalization of mixture models.
README.md view
@@ -2,7 +2,7 @@ # The ELynx Suite -Version: 0.7.2.1.+Version: 0.8.0.0. Reproducible evolution made easy. <p align="center"><img src="https://travis-ci.org/dschrempf/elynx.svg?branch=master"/></p>@@ -73,9 +73,9 @@ # OR: stack exec slynx -- --help # OR: slynx --help - ELynx Suite version 0.7.2.1.+ ELynx Suite version 0.8.0.0. Developed by Dominik Schrempf.- Compiled on June 15, 2023, at 19:54 pm, UTC.+ Compiled on October 27, 2024, at 07:14 am, UTC. Usage: slynx [-v|--verbosity VALUE] [-o|--output-file-basename NAME] [-f|--force] [--no-elynx-file] COMMAND@@ -143,9 +143,9 @@ # OR: stack exec slynx -- simulate --help # OR: slynx simulate --help - ELynx Suite version 0.7.2.1.+ ELynx Suite version 0.8.0.0. Developed by Dominik Schrempf.- Compiled on June 15, 2023, at 19:54 pm, UTC.+ Compiled on October 27, 2024, at 07:14 am, UTC. Usage: slynx simulate (-t|--tree-file Name) [-s|--substitution-model MODEL] [-m|--mixture-model MODEL] [-n|--global-normalization]
elynx-tools.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: elynx-tools-version: 0.7.2.2+version: 0.8.0.0 synopsis: Tools for ELynx description: Please see the README on GitHub at <https://github.com/dschrempf/elynx>.@@ -41,13 +41,13 @@ build-depends: , aeson , attoparsec- , base >=4.7 && <5+ , base >=4.7 && <5 , base16-bytestring , bytestring , cryptohash-sha256 , directory , hmatrix- , optparse-applicative >=0.18.1.0 && <1.0+ , optparse-applicative , random , template-haskell , time
src/ELynx/Tools/ELynx.hs view
@@ -35,7 +35,7 @@ -- | ELynx transformer to be used with all executables. type ELynx a = ReaderT (Environment a) IO -fixSeed :: Reproducible a => a -> IO a+fixSeed :: (Reproducible a) => a -> IO a fixSeed x = case getSeed x of (Just RandomUnset) -> do s <- uniformM globalStdGen :: IO Int@@ -101,7 +101,7 @@ -- Get out file path with extension. getOutFilePath ::- forall a. Reproducible a => String -> ELynx a (Maybe FilePath)+ forall a. (Reproducible a) => String -> ELynx a (Maybe FilePath) getOutFilePath ext = do a <- ask let bn = outFileBaseName . globalArguments $ a@@ -114,7 +114,7 @@ -- | Write a result with a given name to file with given extension or standard -- output. Supports compression.-out :: Reproducible a => String -> BL.ByteString -> String -> ELynx a ()+out :: (Reproducible a) => String -> BL.ByteString -> String -> ELynx a () out name res ext = do mfp <- getOutFilePath ext case mfp of@@ -132,7 +132,7 @@ -- | Get an output handle, does not support compression. The handle has to be -- closed after use!-outHandle :: Reproducible a => String -> String -> ELynx a Handle+outHandle :: (Reproducible a) => String -> String -> ELynx a Handle outHandle name ext = do mfp <- getOutFilePath ext case mfp of
src/ELynx/Tools/Equality.hs view
@@ -32,7 +32,7 @@ import Numeric.LinearAlgebra -- | Test if all elements of a list are equal; returns True for empty list.-allEqual :: Eq a => [a] -> Bool+allEqual :: (Eq a) => [a] -> Bool -- Well, maybe it should be False, but then, it is True that all elements are -- equal :). allEqual [] = True
src/ELynx/Tools/Logger.hs view
@@ -82,7 +82,7 @@ msgPrepare pref msg = BL.intercalate "\n" $ map (BL.append pref) $ BL.lines msg -- Make sure that concurrent output is not scrambled.-atomicAction :: HasLock e => IO () -> Logger e ()+atomicAction :: (HasLock e) => IO () -> Logger e () atomicAction a = do l <- reader getLock liftIO $ withMVar l (const a)@@ -181,7 +181,7 @@ renderDecimal n = alignRightWithNoTrim '0' 2 $ BB.toLazyByteString $ BB.intDec n -- Render a time stamp.-renderTime :: FormatTime t => t -> String+renderTime :: (FormatTime t) => t -> String renderTime = formatTime defaultTimeLocale "%B %-e, %Y, at %H:%M %P, %Z." -- | Log header.
src/ELynx/Tools/Options.hs view
@@ -137,11 +137,11 @@ } deriving (Eq, Show, Generic) -instance FromJSON a => FromJSON (Arguments a)+instance (FromJSON a) => FromJSON (Arguments a) -instance ToJSON a => ToJSON (Arguments a)+instance (ToJSON a) => ToJSON (Arguments a) -instance Reproducible a => Reproducible (Arguments a) where+instance (Reproducible a) => Reproducible (Arguments a) where inFiles = inFiles . local outSuffixes = outSuffixes . local getSeed = getSeed . local@@ -171,7 +171,7 @@ -- | Parse arguments. Provide a global description, header, footer, and so on. -- Custom additional description (first argument) and footer (second argument) -- can be provided. print help if needed.-parseArguments :: forall a. Reproducible a => IO (Arguments a)+parseArguments :: forall a. (Reproducible a) => IO (Arguments a) parseArguments = execParser $ elynxParserInfo (cmdDsc @a) (cmdFtr @a) (argumentsParser $ parser @a)@@ -194,7 +194,7 @@ -- | Create a command; convenience function. createCommandReproducible ::- forall a b. Reproducible a => (a -> b) -> Mod CommandFields b+ forall a b. (Reproducible a) => (a -> b) -> Mod CommandFields b createCommandReproducible f = command (cmdName @a) $ f
src/ELynx/Tools/Reproduction.hs view
@@ -75,7 +75,7 @@ cmdFtr = [] -- | A unique hash of the reproduction data type.-getReproductionHash :: forall a. Reproducible a => Reproduction a -> String+getReproductionHash :: forall a. (Reproducible a) => Reproduction a -> String getReproductionHash r = BS.unpack $ encode $@@ -97,7 +97,7 @@ where ri = reproducible r -setHash :: Reproducible a => Reproduction a -> Reproduction a+setHash :: (Reproducible a) => Reproduction a -> Reproduction a setHash r = r {rHash = Just h} where h = getReproductionHash r -- | Necessary information for a reproducible run. Notably, the input files are@@ -119,9 +119,9 @@ } deriving (Generic) -instance FromJSON a => FromJSON (Reproduction a)+instance (FromJSON a) => FromJSON (Reproduction a) -instance ToJSON a => ToJSON (Reproduction a)+instance (ToJSON a) => ToJSON (Reproduction a) -- | Helper function. hashFile :: FilePath -> IO BS.ByteString