Skip to content

Commit

Permalink
Merge pull request #2 from biocad/develop
Browse files Browse the repository at this point in the history
version 0.1.0.2: BioSources added
  • Loading branch information
vks4git authored Mar 19, 2018
2 parents 030facf + f50c8b2 commit 7072b64
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.1.0.2] - 2018-03-19
### Added
- Data for `bio-sources` library.

## [0.1.0.1] - 2018-03-05
### Changed
- Class name for get config from JSON. Now it is `FromJsonConfig` with method `fromJsonConfig :: MonadIO m => m a`.
Expand Down
3 changes: 2 additions & 1 deletion bcd-config.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: bcd-config
version: 0.1.0.1
version: 0.1.0.2
description: Library to get config to different systems
homepage: https://github.com/biocad/bcd-config#readme
bug-reports: https://github.com/biocad/bcd-config/issues
Expand Down Expand Up @@ -31,6 +31,7 @@ library
, System.BCD.Config.Postgres
, System.BCD.Config.Schrodinger
, System.BCD.Config.FileSystem
, System.BCD.Config.BioSources
build-depends: base >=4.7 && <5
, text
, unordered-containers
Expand Down
21 changes: 21 additions & 0 deletions src/System/BCD/Config/BioSources.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{-# LANGUAGE OverloadedStrings #-}

module System.BCD.Config.BioSources
( BioSourcesConfig (..)
, FromJsonConfig (..)
) where

import Data.Aeson.Picker ((|--))
import System.BCD.Config (FromJsonConfig (..), getConfigText)

-- | This class contains information where to find files that are related to
-- semantic common used library [bio-sources](https://github.com/biocad/bio-sources).
-- That library includes dihedral angles, kmers, ideal aminoacids and functions to work with them.
newtype BioSourcesConfig = BioSourcesConfig { bioSourcesPath :: FilePath }
deriving (Show, Read, Eq)

instance FromJsonConfig BioSourcesConfig where
fromJsonConfig = do
jsonText <- getConfigText
let path = jsonText |-- ["deploy", "fs", "bio-sources"]
pure $ BioSourcesConfig path
3 changes: 1 addition & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ packages:
- '.'

# necessary extra-deps that are not included in the BCD-LTS
extra-deps:
- aeson-picker-0.1.0.2
extra-deps: []

# https://github.com/commercialhaskell/stack/issues/3520
ignore-revision-mismatch: true
Expand Down

0 comments on commit 7072b64

Please sign in to comment.