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

scalariform

parent 193e5aa7
package eu.nomad_lab.parsers package eu.nomad_lab.parsers
import eu.{nomad_lab => lab} import eu.{ nomad_lab => lab }
import org.{json4s => jn} import org.{ json4s => jn }
import scala.collection.breakOut import scala.collection.breakOut
object GpawParser extends SimpleExternalParserGenerator( object GpawParser extends SimpleExternalParserGenerator(
...@@ -10,8 +10,9 @@ object GpawParser extends SimpleExternalParserGenerator( ...@@ -10,8 +10,9 @@ object GpawParser extends SimpleExternalParserGenerator(
("parserId" -> jn.JString("GpawParser" + lab.GpawVersionInfo.version)) :: ("parserId" -> jn.JString("GpawParser" + lab.GpawVersionInfo.version)) ::
("versionInfo" -> jn.JObject( ("versionInfo" -> jn.JObject(
("nomadCoreVersion" -> jn.JString(lab.NomadCoreVersionInfo.version)) :: ("nomadCoreVersion" -> jn.JString(lab.NomadCoreVersionInfo.version)) ::
(lab.GpawVersionInfo.toMap.map{ case (key, value) => (lab.GpawVersionInfo.toMap.map {
(key -> jn.JString(value.toString)) case (key, value) =>
(key -> jn.JString(value.toString))
}(breakOut): List[(String, jn.JString)]) }(breakOut): List[(String, jn.JString)])
)) :: Nil )) :: Nil
), ),
...@@ -33,9 +34,9 @@ object GpawParser extends SimpleExternalParserGenerator( ...@@ -33,9 +34,9 @@ object GpawParser extends SimpleExternalParserGenerator(
) ++ lab.DefaultPythonInterpreter.commonDirMapping() ) ++ lab.DefaultPythonInterpreter.commonDirMapping()
) { ) {
override def isMainFile(filePath: String, bytePrefix: Array[Byte], stringPrefix: Option[String]): Option[ParserMatch] = { override def isMainFile(filePath: String, bytePrefix: Array[Byte], stringPrefix: Option[String]): Option[ParserMatch] = {
if (filePath.endsWith(".gpw")) if (filePath.endsWith(".gpw"))
Some(ParserMatch(mainFileMatchPriority, mainFileMatchWeak)) Some(ParserMatch(mainFileMatchPriority, mainFileMatchWeak))
else else
None None
} }
} }
...@@ -2,8 +2,6 @@ package eu.nomad_lab.parsers ...@@ -2,8 +2,6 @@ package eu.nomad_lab.parsers
import org.specs2.mutable.Specification import org.specs2.mutable.Specification
object GpawParserSpec extends Specification { object GpawParserSpec extends Specification {
"GpawParserTest" >> { "GpawParserTest" >> {
"test with json-events" >> { "test with json-events" >> {
......
Supports Markdown
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