Skip to content

Commit

Permalink
Merge pull request #10 from Andros-Spica/main
Browse files Browse the repository at this point in the history
update to v0.7.0 in adaptation to schema v0.3.0
  • Loading branch information
Andros-Spica authored Oct 13, 2022
2 parents 35fd4fe + 54a6393 commit 5a54e15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- V 0.7.0: Adapted checks on softwareDependencies to nassa-schema v0.3.0
- V 0.6.1: Discarded checks on designDetailsFile field
- V 0.6.0: Added all the necessary mechanisms to make nassa aware of the NASSA standard versions of modules
- V 0.5.0: Added a cli subcommand validate
Expand Down
2 changes: 1 addition & 1 deletion nassa.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nassa
version: 0.6.0
version: 0.7.0
synopsis: A package to validate NASSA modules
description: NASSA maintains a library of agent-based-modelling algorithms in individual code modules. Each module is defined by a NASSA.yml file. nassa-hs validates these .yml files.
license: MIT
Expand Down
6 changes: 3 additions & 3 deletions src/NASSA/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ data NassaModuleYamlStruct = NassaModuleYamlStruct {
, _nassaYamlModellingKeywords :: [String]
, _nassaYamlProgrammingKeywords :: [String]
, _nassaYamlImplementations :: [Implementation]
, _nassaYamlSoftwareDependencies :: [String]
, _nassaYamlInputs :: Maybe [ModuleInput]
, _nassaYamlOutputs :: Maybe [ModuleOutput]
-- , _nassaYamlDocsCheckList :: DocsCheckList
Expand All @@ -60,7 +59,6 @@ instance FromJSON NassaModuleYamlStruct where
<*> v .: "modellingKeywords"
<*> v .: "programmingKeywords"
<*> v .: "implementations"
<*> v .: "softwareDependencies"
<*> v .:? "inputs"
<*> v .:? "outputs"
-- <*> v .: "docsCheckList"
Expand All @@ -82,7 +80,7 @@ instance FromJSON ModuleID where
type NassaVersion = Version

validNassaVersions :: [NassaVersion]
validNassaVersions = map makeVersion [[0,1,0]]
validNassaVersions = map makeVersion [[0,3,0]]

latestNassaVersion :: NassaVersion
latestNassaVersion = last validNassaVersions
Expand Down Expand Up @@ -227,13 +225,15 @@ instance FromJSON DomainKeyword where
data Implementation = Implementation
{ _implementationLanguage :: ProgrammingLanguage
, _implementationCodeDir :: FilePath
, _nassaYamlSoftwareDependencies :: [String]
}
deriving (Show, Eq)

instance FromJSON Implementation where
parseJSON = withObject "implementations" $ \v -> Implementation
<$> v .: "language"
<*> v .: "codeDir"
<*> v .: "softwareDependencies"

data ProgrammingLanguage =
LanguageR
Expand Down

0 comments on commit 5a54e15

Please sign in to comment.