Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-dl-poly
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nomad-lab
parser-dl-poly
Commits
cc261e34
Commit
cc261e34
authored
9 years ago
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Downloads
Patches
Plain Diff
scalariform
parent
2e894d75
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/eu/nomad_lab/parsers/DlPolyParser.scala
+5
-4
5 additions, 4 deletions
src/main/scala/eu/nomad_lab/parsers/DlPolyParser.scala
src/test/scala/eu/nomad_lab/parsers/DlPolyParserSpec.scala
+4
-6
4 additions, 6 deletions
src/test/scala/eu/nomad_lab/parsers/DlPolyParserSpec.scala
with
9 additions
and
10 deletions
src/main/scala/eu/nomad_lab/parsers/DlPolyParser.scala
+
5
−
4
View file @
cc261e34
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
DlPolyParser
extends
SimpleExternalParserGenerator
(
...
...
@@ -12,8 +12,9 @@ object DlPolyParser extends SimpleExternalParserGenerator(
(
"parserId"
->
jn
.
JString
(
"DlPolyParser"
+
lab
.
DlPolyVersionInfo
.
version
))
::
(
"versionInfo"
->
jn
.
JObject
(
(
"nomadCoreVersion"
->
jn
.
JString
(
lab
.
NomadCoreVersionInfo
.
version
))
::
(
lab
.
DlPolyVersionInfo
.
toMap
.
map
{
case
(
key
,
value
)
=>
(
key
->
jn
.
JString
(
value
.
toString
))
(
lab
.
DlPolyVersionInfo
.
toMap
.
map
{
case
(
key
,
value
)
=>
(
key
->
jn
.
JString
(
value
.
toString
))
}(
breakOut
)
:
List
[(
String
,
jn.JString
)])
))
::
Nil
),
...
...
This diff is collapsed.
Click to expand it.
src/test/scala/eu/nomad_lab/parsers/DlPolyParserSpec.scala
+
4
−
6
View file @
cc261e34
...
...
@@ -2,15 +2,13 @@ package eu.nomad_lab.parsers
import
org.specs2.mutable.Specification
object
DlPolyParserSpec
extends
Specification
{
"DlPolyParserTest"
>>
{
"test with json-events"
>>
{
ParserRun
.
parse
(
DlPolyParser
,
"parsers/dl-poly/test/examples/dl-poly-test1/OUTPUT"
,
"json-events"
)
must_==
ParseResult
.
ParseSuccess
"test with json-events"
>>
{
ParserRun
.
parse
(
DlPolyParser
,
"parsers/dl-poly/test/examples/dl-poly-test1/OUTPUT"
,
"json-events"
)
must_==
ParseResult
.
ParseSuccess
}
"test with json"
>>
{
ParserRun
.
parse
(
DlPolyParser
,
"parsers/dl-poly/test/examples/dl-poly-test1/OUTPUT"
,
"json"
)
must_==
ParseResult
.
ParseSuccess
"test with json"
>>
{
ParserRun
.
parse
(
DlPolyParser
,
"parsers/dl-poly/test/examples/dl-poly-test1/OUTPUT"
,
"json"
)
must_==
ParseResult
.
ParseSuccess
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment