packages feed

currycarbon 0.3.0.0 → 0.3.0.1

raw patch · 5 files changed

+32/−5 lines, 5 filesdep +hspec-corePVP ok

version bump matches the API change (PVP)

Dependencies added: hspec-core

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,4 @@+- V 0.3.0.1: The golden tests can not run on stackage as it stands, so I hid them behind an environment variable. - V 0.3.0.0: Major update with multiple breaking changes and new features: 	- Added a new mechanism to draw random age samples from a CalPDF (`sampleAgesFromCalPDF :: AgeSamplingConf -> CalPDF -> RandomAgeSample`). This is available from the command line with the options `samplesFile`, `--seed`, and `-n`/`--nrSamples`. 	- Added a new concept to the `CalExpr` data type: Age ranges with uniform probability for each year in the range (`TimeWindowBP` and `TimeWindowBCAD`).
README.md view
@@ -29,7 +29,7 @@ ```  ```-currycarbon v0.3.0.0 (UTF-8)+currycarbon v0.3.0.1 (UTF-8) Method: Bchron {distribution = StudentTDist {ndf = 100.0}} Curve: IntCal20 Calibrating...@@ -158,6 +158,16 @@ 1. Install the Haskell build tool [Stack](https://docs.haskellstack.org/en/stable/README/) 2. Clone the repository 3. Execute `stack install` inside the repository to build the tool and automatically copy the executables to `~/.local/bin` (which you may want to add to your path). This will install the compiler and all dependencies into folders that won't interfere with any installation you might already have.++#### Running the golden tests++Because the golden tests can not run on stackage as they are set up now (see the discussion [here](https://github.com/nevrome/currycarbon/issues/17)) I hid them behind an environment variable. You can run them with++```bash+CURRY_RUN_GOLDEN=true stack test --pedantic+```++Just calling `stack test --pedantic` without this variable will skip any test with the pattern `"Golden"` in their descriptors.  #### Preparing a new stable release 
currycarbon.cabal view
@@ -1,5 +1,5 @@ name:                currycarbon-version:             0.3.0.0+version:             0.3.0.1 synopsis:            A package for simple, fast radiocarbon calibration description:         Radiocarbon calibration with the intercept method optimised for fast calibration of many dates. homepage:            https://github.com/nevrome/currycarbon@@ -65,16 +65,18 @@     hs-source-dirs:       test     main-is:-      Spec.hs+      Main.hs     type:       exitcode-stdio-1.0     build-depends:         base >= 4.9 && < 5       , currycarbon       , hspec >= 2 && < 3+      , hspec-core >= 2.10 && < 3       , process >= 1.6 && < 1.7     other-modules:       ParserSpec,-      GoldenSpec+      GoldenSpec,+      Spec     default-language:       Haskell2010
+ test/Main.hs view
@@ -0,0 +1,14 @@+module Main where++import qualified Spec+import           System.Environment   (lookupEnv)+import           Test.Hspec.Core.Util+import           Test.Hspec.Runner++main :: IO ()+main = do+    goldenFlag <- maybe False (const True) <$> lookupEnv "CURRY_RUN_GOLDEN"+    let config = if goldenFlag+                 then defaultConfig+                 else defaultConfig {configSkipPredicate = Just $ filterPredicate "Golden"}+    hspecWith config Spec.spec
test/Spec.hs view
@@ -1,1 +1,1 @@-{-# OPTIONS_GHC -F -pgmF hspec-discover #-}+{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}