Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-orca
Commits
803ebc00
Commit
803ebc00
authored
May 02, 2016
by
ankit kariryaa
Browse files
Initialize Orca with scala class and scala tests
parent
e9e857cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
0 → 100644
View file @
803ebc00
# use glob syntax.
syntax: glob
*.ser
*.class
*~
*.bak
#*.off
*.old
*.pyc
*.bk
*.swp
.DS_Store
# logging files
detailed.log
# eclipse conf file
.settings
.classpath
.project
.manager
.scala_dependencies
# idea
.idea
*.iml
# building
target
build
null
tmp*
temp*
dist
test-output
build.log
# other scm
.svn
.CVS
.hg*
# switch to regexp syntax.
# syntax: regexp
# ^\.pc/
#SHITTY output not in target directory
build.log
#emacs TAGS
TAGS
lib/
env/
.gitlab-ci.yml
0 → 100644
View file @
803ebc00
stages
:
-
test
testing
:
stage
:
test
script
:
-
cd .. && rm -rf nomad-lab-base
-
git clone --recursive git@gitlab.mpcdf.mpg.de:nomad-lab/nomad-lab-base.git
-
cd nomad-lab-base
-
git submodule foreach git checkout master
-
git submodule foreach git pull
-
sbt ocra/test
only
:
-
master
tags
:
-
test
-
spec2
allow_failure
:
true
\ No newline at end of file
src/main/scala/eu/nomad_lab/parsers/OrcaParser.scala
0 → 100644
View file @
803ebc00
package
eu.nomad_lab.parsers
import
eu.
{
nomad_lab
=>
lab
}
import
eu.nomad_lab.DefaultPythonInterpreter
import
org.
{
json4s
=>
jn
}
import
scala.collection.breakOut
object
OrcaParser
extends
SimpleExternalParserGenerator
(
name
=
"OrcaParser"
,
parserInfo
=
jn
.
JObject
(
(
"name"
->
jn
.
JString
(
"OrcaParser"
))
::
(
"parserId"
->
jn
.
JString
(
"OrcaParser"
+
lab
.
OrcaVersionInfo
.
version
))
::
(
"versionInfo"
->
jn
.
JObject
(
(
"nomadCoreVersion"
->
jn
.
JObject
(
lab
.
NomadCoreVersionInfo
.
toMap
.
map
{
case
(
k
,
v
)
=>
k
->
jn
.
JString
(
v
.
toString
)
}(
breakOut
)
:
List
[(
String
,
jn.JString
)]))
::
(
lab
.
OrcaVersionInfo
.
toMap
.
map
{
case
(
key
,
value
)
=>
(
key
->
jn
.
JString
(
value
.
toString
))
}(
breakOut
)
:
List
[(
String
,
jn.JString
)])
))
::
Nil
),
mainFileTypes
=
Seq
(
"text/.*"
),
//TODO: Update the replacement string (mainFileRe)
mainFileRe
=
""" """
.
r
,
cmd
=
Seq
(
DefaultPythonInterpreter
.
python2Exe
(),
"${envDir}/parsers/orca/parser/parser-orca/OrcaParser.py"
,
"--uri"
,
"${mainFileUri}"
,
"${mainFilePath}"
),
resList
=
Seq
(
"parser-orca/OrcaParser.py"
,
"parser-orca/setup_paths.py"
,
"nomad_meta_info/public.nomadmetainfo.json"
,
"nomad_meta_info/common.nomadmetainfo.json"
,
"nomad_meta_info/meta_types.nomadmetainfo.json"
,
"nomad_meta_info/orca.nomadmetainfo.json"
)
++
DefaultPythonInterpreter
.
commonFiles
(),
dirMap
=
Map
(
"parser-orca"
->
"parsers/orca/parser/parser-orca"
,
"nomad_meta_info"
->
"nomad-meta-info/meta_info/nomad_meta_info"
)
++
DefaultPythonInterpreter
.
commonDirMapping
()
)
src/test/scala/eu/nomad_lab/parsers/OrcaParserSpec.scala
0 → 100644
View file @
803ebc00
package
eu.nomad_lab.parsers
import
org.specs2.mutable.Specification
object
OrcaParserSpec
extends
Specification
{
"OrcaParserTest"
>>
{
"test with json-events"
>>
{
ParserRun
.
parse
(
OrcaParser
,
"parsers/orca/test/examples/"
,
"json-events"
)
must_==
ParseResult
.
ParseSuccess
}
"test with json"
>>
{
ParserRun
.
parse
(
OrcaParser
,
"parsers/orca/test/examples/"
,
"json"
)
must_==
ParseResult
.
ParseSuccess
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment