packages feed

cobot-io 0.1.5.2 → 0.1.5.3

raw patch · 4 files changed

+39/−20 lines, 4 filesdep ~bytestringdep ~deepseqdep ~hspecPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring, deepseq, hspec, megaparsec, text

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -2,6 +2,9 @@  ## [Unreleased] +## [0.1.5.3] - 2023-12-08+- Update tests and dependencies.+ ## [0.1.5.2] - 2023-11-09 - Add Ord for Fasta and related types. 
cobot-io.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           cobot-io-version:        0.1.5.2+version:        0.1.5.3 synopsis:       Biological data file formats and IO description:    Please see the README on GitHub at <https://github.com/biocad/cobot-io#readme> category:       Bio@@ -21,6 +21,9 @@     GHC ==8.10.7  || ==9.0.2  || ==9.2.8+ || ==9.4.8+ || ==9.6.3+ || ==9.8.1  extra-source-files:     README.md@@ -187,11 +190,11 @@     , attoparsec >=0.10 && <0.15     , base >=4.14 && <5     , binary >=0.8.3.0 && <1.0-    , bytestring >=0.10.8.1 && <0.12+    , bytestring >=0.10.8.1 && <0.13     , cobot >=0.1.1.7     , containers >=0.5.7.1 && <0.7     , data-msgpack >=0.0.9 && <0.1-    , deepseq ==1.4.*+    , deepseq >=1.4 && <1.6     , filepath     , http-conduit ==2.3.*     , hyraxAbif >=0.2.3.27 && <0.2.5.0@@ -201,7 +204,7 @@     , mtl >=2.2.1 && <2.4     , parser-combinators >=1.2.1     , split-    , text >=1.2.2.1 && <2.1+    , text >=1.2.2.1 && <2.2     , vector   default-language: Haskell2010   if impl(ghc >= 9.0)@@ -240,24 +243,24 @@     , attoparsec >=0.10 && <0.15     , base >=4.14 && <5     , binary >=0.8.3.0 && <1.0-    , bytestring >=0.10.8.1 && <0.12+    , bytestring >=0.10.8.1 && <0.13     , cobot >=0.1.1.7     , cobot-io     , containers >=0.5.7.1 && <0.7     , data-msgpack >=0.0.9 && <0.1-    , deepseq ==1.4.*+    , deepseq >=1.4 && <1.6     , directory     , filepath-    , hspec >=2.4.1 && <2.11+    , hspec >=2.4.1 && <2.12     , http-conduit ==2.3.*     , hyraxAbif >=0.2.3.27 && <0.2.5.0     , lens >=4.16 && <5.3     , linear-    , megaparsec <9.3+    , megaparsec     , mtl >=2.2.1 && <2.4     , neat-interpolation >=0.3     , parser-combinators >=1.2.1     , split-    , text >=1.2.2.1 && <2.1+    , text >=1.2.2.1 && <2.2     , vector   default-language: Haskell2010
src/Bio/Uniprot/Parser.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}@@ -9,8 +10,13 @@ import           Prelude              hiding (null) import qualified Prelude              as P (concat, init, last, null, tail) -import           Bio.Uniprot.Type+#if MIN_VERSION_base(4, 18, 0)+import           Control.Applicative  ((<|>))+#else import           Control.Applicative  (liftA2, (<|>))+#endif++import           Bio.Uniprot.Type import           Control.Monad        (unless) import           Data.Attoparsec.Text import           Data.Bifunctor       (second)
test/FASTASpec.hs view
@@ -2,16 +2,19 @@  module FASTASpec where -import Bio.FASTA              (fastaP, fromFile, toFile)-import Bio.FASTA.Parser       (parseOnly)-import Bio.FASTA.Type         (Fasta, FastaItem (..))-import Bio.Sequence           (bareSequence)-import Control.Monad.IO.Class (liftIO)-import Data.Text.IO           (readFile)-import Prelude                hiding (readFile, writeFile)-import System.Directory       (removeFile)-import Test.Hspec+import           Control.Monad.IO.Class (liftIO)+import           Data.Bifunctor         (first)+import qualified Data.Text              as T+import           Data.Text.IO           (readFile)+import           Prelude                hiding (readFile, writeFile)+import           System.Directory       (removeFile)+import           Test.Hspec +import Bio.FASTA        (fastaP, fromFile, toFile)+import Bio.FASTA.Parser (parseOnly)+import Bio.FASTA.Type   (Fasta, FastaItem (..))+import Bio.Sequence     (bareSequence)+ correctFasta1 :: Fasta Char correctFasta1 = [ FastaItem "3HMX:A|PDBID|CHAIN|SEQUENCE" (bareSequence "IWELKKDVYVVELDWYPDAPGEMVVLTCDTPEEDGITWTLDQSSEVLGSGKTLTIQVKEFGDAGQYTCHKGGEVLSHSLL")                 , FastaItem "7HMX:A|PDBID|CHAIN|SEQUENCE" (bareSequence "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEVLGSGKTLTIQVKEFGDAGQYTCHKGGEVLSHSLL")@@ -70,7 +73,7 @@     it ("correctly parses bad fasta from file " <> path) $ do         res <- liftIO (readFile path)         let badRes = parseOnly fastaP res-        badRes `shouldBe` cf+        noSpaces badRes `shouldBe` noSpaces cf  writeFile :: FilePath -> Fasta Char -> Spec writeFile path cf =@@ -79,3 +82,7 @@         fasta <- fromFile path         removeFile path         fasta `shouldBe` cf++-- | megaparsec >= 9.3 added more spaces to error messages, so that our old ones do not match.+noSpaces :: Either String a -> Either String a+noSpaces = first $ T.unpack . T.replace " " "" . T.pack