Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-gpaw
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-gpaw
Commits
f54c4668
Commit
f54c4668
authored
9 years ago
by
Mohamed, Fawzi Roberto (fawzi)
Browse files
Options
Downloads
Patches
Plain Diff
scalariform
parent
193e5aa7
Branches
Branches containing commit
Tags
Tags containing commit
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/GpawParser.scala
+7
-6
7 additions, 6 deletions
src/main/scala/eu/nomad_lab/parsers/GpawParser.scala
src/test/scala/eu/nomad_lab/parsers/GpawParserSpec.scala
+0
-2
0 additions, 2 deletions
src/test/scala/eu/nomad_lab/parsers/GpawParserSpec.scala
with
7 additions
and
8 deletions
src/main/scala/eu/nomad_lab/parsers/GpawParser.scala
+
7
−
6
View file @
f54c4668
package
eu.nomad_lab.parsers
import
eu.
{
nomad_lab
=>
lab
}
import
org.
{
json4s
=>
jn
}
import
eu.
{
nomad_lab
=>
lab
}
import
org.
{
json4s
=>
jn
}
import
scala.collection.breakOut
object
GpawParser
extends
SimpleExternalParserGenerator
(
...
...
@@ -10,8 +10,9 @@ object GpawParser extends SimpleExternalParserGenerator(
(
"parserId"
->
jn
.
JString
(
"GpawParser"
+
lab
.
GpawVersionInfo
.
version
))
::
(
"versionInfo"
->
jn
.
JObject
(
(
"nomadCoreVersion"
->
jn
.
JString
(
lab
.
NomadCoreVersionInfo
.
version
))
::
(
lab
.
GpawVersionInfo
.
toMap
.
map
{
case
(
key
,
value
)
=>
(
key
->
jn
.
JString
(
value
.
toString
))
(
lab
.
GpawVersionInfo
.
toMap
.
map
{
case
(
key
,
value
)
=>
(
key
->
jn
.
JString
(
value
.
toString
))
}(
breakOut
)
:
List
[(
String
,
jn.JString
)])
))
::
Nil
),
...
...
@@ -33,9 +34,9 @@ object GpawParser extends SimpleExternalParserGenerator(
)
++
lab
.
DefaultPythonInterpreter
.
commonDirMapping
()
)
{
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
))
else
else
None
}
}
This diff is collapsed.
Click to expand it.
src/test/scala/eu/nomad_lab/parsers/GpawParserSpec.scala
+
0
−
2
View file @
f54c4668
...
...
@@ -2,8 +2,6 @@ package eu.nomad_lab.parsers
import
org.specs2.mutable.Specification
object
GpawParserSpec
extends
Specification
{
"GpawParserTest"
>>
{
"test with json-events"
>>
{
...
...
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