Commit bb382be9 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

scalariform

parent 64870722
package eu.nomad_lab.parsers
import eu.{nomad_lab=>lab}
import eu.{ nomad_lab => lab }
import eu.nomad_lab.DefaultPythonInterpreter
import org.{json4s => jn}
import org.{ json4s => jn }
import scala.collection.breakOut
object Cp2kParser extends SimpleExternalParserGenerator(
......@@ -12,8 +12,9 @@ object Cp2kParser extends SimpleExternalParserGenerator(
("parserId" -> jn.JString("Cp2kParser" + lab.Cp2kVersionInfo.version)) ::
("versionInfo" -> jn.JObject(
("nomadCoreVersion" -> jn.JString(lab.NomadCoreVersionInfo.version)) ::
(lab.Cp2kVersionInfo.toMap.map{ case (key, value) =>
(key -> jn.JString(value.toString))
(lab.Cp2kVersionInfo.toMap.map {
case (key, value) =>
(key -> jn.JString(value.toString))
}(breakOut): List[(String, jn.JString)])
)) :: Nil
),
......@@ -57,5 +58,6 @@ object Cp2kParser extends SimpleExternalParserGenerator(
) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map(
"parser-cp2k" -> "parsers/cp2k/parser/parser-cp2k",
"nomad_meta_info" -> "nomad-meta-info/meta_info/nomad_meta_info") ++ DefaultPythonInterpreter.commonDirMapping()
"nomad_meta_info" -> "nomad-meta-info/meta_info/nomad_meta_info"
) ++ DefaultPythonInterpreter.commonDirMapping()
)
......@@ -2,16 +2,14 @@ package eu.nomad_lab.parsers
import org.specs2.mutable.Specification
object Cp2kParserSpec extends Specification {
"Cp2kParserTest" >> {
"test with json-events" >> {
ParserRun.parse(Cp2kParser,"parsers/cp2k/test/examples/Si_bulk8/Si_bulk8.out","json-events") must_== ParseResult.ParseSuccess
"test with json-events" >> {
ParserRun.parse(Cp2kParser, "parsers/cp2k/test/examples/Si_bulk8/Si_bulk8.out", "json-events") must_== ParseResult.ParseSuccess
}
}
"test with json" >> {
ParserRun.parse(Cp2kParser,"parsers/cp2k/test/examples/Si_bulk8/Si_bulk8.out","json") must_== ParseResult.ParseSuccess
"test with json" >> {
ParserRun.parse(Cp2kParser, "parsers/cp2k/test/examples/Si_bulk8/Si_bulk8.out", "json") must_== ParseResult.ParseSuccess
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment