From 38d58bcbda4e05fa230a4069db75a1918b58bcc0 Mon Sep 17 00:00:00 2001
From: speckhard <dts@stanford.edu>
Date: Tue, 5 Feb 2019 14:14:38 +0100
Subject: [PATCH] Removed scala files.

---
 bigdftparser/scalainterface.py                | 31 -------
 bigdftparser/setup_paths.py                   | 31 -------
 .../eu/nomad_lab/parsers/BigDFTParser.scala   | 87 -------------------
 .../nomad_lab/parsers/BigDFTParserSpec.scala  | 31 -------
 4 files changed, 180 deletions(-)
 delete mode 100644 bigdftparser/scalainterface.py
 delete mode 100644 bigdftparser/setup_paths.py
 delete mode 100644 src/main/scala/eu/nomad_lab/parsers/BigDFTParser.scala
 delete mode 100644 src/test/scala/eu/nomad_lab/parsers/BigDFTParserSpec.scala

diff --git a/bigdftparser/scalainterface.py b/bigdftparser/scalainterface.py
deleted file mode 100644
index 8eed13c..0000000
--- a/bigdftparser/scalainterface.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-"""
-This is the access point to the parser for the scala layer in the
-nomad project.
-"""
-from __future__ import absolute_import
-import sys
-import setup_paths
-from nomadcore.parser_backend import JsonParseEventsWriterBackend
-from bigdftparser import BigDFTParser
-
-
-if __name__ == "__main__":
-
-    # Initialise the parser with the main filename and a JSON backend
-    main_file = sys.argv[1]
-    parser = BigDFTParser(backend=JsonParseEventsWriterBackend)
-    parser.parse(main_file)
diff --git a/bigdftparser/setup_paths.py b/bigdftparser/setup_paths.py
deleted file mode 100644
index 8e38ba9..0000000
--- a/bigdftparser/setup_paths.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-"""
-Setups the python-common library in the PYTHONPATH system variable.
-"""
-import sys
-import os
-import os.path
-
-baseDir = os.path.dirname(os.path.abspath(__file__))
-commonDir = os.path.normpath(os.path.join(baseDir, "../../../../../python-common/common/python"))
-parserDir = os.path.normpath(os.path.join(baseDir, "../../parser-big-dft"))
-
-# Using sys.path.insert(1, ...) instead of sys.path.insert(0, ...) based on
-# this discusssion:
-# http://stackoverflow.com/questions/10095037/why-use-sys-path-appendpath-instead-of-sys-path-insert1-path
-if commonDir not in sys.path:
-    sys.path.insert(1, commonDir)
-    sys.path.insert(1, parserDir)
diff --git a/src/main/scala/eu/nomad_lab/parsers/BigDFTParser.scala b/src/main/scala/eu/nomad_lab/parsers/BigDFTParser.scala
deleted file mode 100644
index cdac8de..0000000
--- a/src/main/scala/eu/nomad_lab/parsers/BigDFTParser.scala
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed
- * 
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package eu.nomad_lab.parsers
-
-import eu.{ nomad_lab => lab }
-import eu.nomad_lab.DefaultPythonInterpreter
-import org.{ json4s => jn }
-import scala.collection.breakOut
-
-object BigDFTParser extends SimpleExternalParserGenerator(
-  name = "BigDFTParser",
-  parserInfo = jn.JObject(
-    ("name" -> jn.JString("BigDFTParser")) ::
-      ("parserId" -> jn.JString("BigDFTParser" + lab.BigdftVersionInfo.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.BigdftVersionInfo.toMap.map {
-            case (key, value) =>
-              (key -> jn.JString(value.toString))
-          }(breakOut): List[(String, jn.JString)])
-      )) :: Nil
-  ),
-  mainFileTypes = Seq("text/.*"),
-  mainFileRe = """__________________________________ A fast and precise DFT wavelet code\s*
-   \|     \|     \|     \|     \|     \|\s*
-   \|     \|     \|     \|     \|     \|      BBBB         i       gggggg\s*
-   \|_____\|_____\|_____\|_____\|_____\|     B    B               g\s*
-   \|     \|  :  \|  :  \|     \|     \|    B     B        i     g\s*
-   \|     \|-0\+--\|-0\+--\|     \|     \|    B    B         i     g        g\s*
-   \|_____\|__:__\|__:__\|_____\|_____\|___ BBBBB          i     g         g\s*
-   \|  :  \|     \|     \|  :  \|     \|    B    B         i     g         g\s*
-   \|--\+0-\|     \|     \|-0\+--\|     \|    B     B     iiii     g         g\s*
-   \|__:__\|_____\|_____\|__:__\|_____\|    B     B        i      g        g\s*
-   \|     \|  :  \|  :  \|     \|     \|    B BBBB        i        g      g\s*
-   \|     \|-0\+--\|-0\+--\|     \|     \|    B        iiiii          gggggg\s*
-   \|_____\|__:__\|__:__\|_____\|_____\|__BBBBB\s*
-   \|     \|     \|     \|  :  \|     \|                           TTTTTTTTT\s*
-   \|     \|     \|     \|--\+0-\|     \|  DDDDDD          FFFFF        T\s*
-   \|_____\|_____\|_____\|__:__\|_____\| D      D        F        TTTT T\s*
-   \|     \|     \|     \|  :  \|     \|D        D      F        T     T\s*
-   \|     \|     \|     \|--\+0-\|     \|D         D     FFFF     T     T\s*
-   \|_____\|_____\|_____\|__:__\|_____\|D___      D     F         T    T\s*
-   \|     \|     \|  :  \|     \|     \|D         D     F          TTTTT\s*
-   \|     \|     \|--\+0-\|     \|     \| D        D     F         T    T\s*
-   \|_____\|_____\|__:__\|_____\|_____\|          D     F        T     T\s*
-   \|     \|     \|     \|     \|     \|         D               T    T\s*
-   \|     \|     \|     \|     \|     \|   DDDDDD       F         TTTT\s*
-   \|_____\|_____\|_____\|_____\|_____\|______                    www\.bigdft\.org""".r,
-  cmd = Seq(DefaultPythonInterpreter.pythonExe(), "${envDir}/parsers/big-dft/parser/parser-big-dft/bigdftparser/scalainterface.py",
-    "${mainFilePath}"),
-  cmdCwd = "${mainFilePath}/..",
-  resList = Seq(
-    "parser-big-dft/bigdftparser/__init__.py",
-    "parser-big-dft/bigdftparser/setup_paths.py",
-    "parser-big-dft/bigdftparser/parser.py",
-    "parser-big-dft/bigdftparser/scalainterface.py",
-    "parser-big-dft/bigdftparser/versions/__init__.py",
-    "parser-big-dft/bigdftparser/versions/bigdft18/__init__.py",
-    "parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py",
-    "parser-big-dft/bigdftparser/generic/__init__.py",
-    "parser-big-dft/bigdftparser/generic/libxc_codes.py",
-    "nomad_meta_info/public.nomadmetainfo.json",
-    "nomad_meta_info/common.nomadmetainfo.json",
-    "nomad_meta_info/meta_types.nomadmetainfo.json",
-    "nomad_meta_info/big_dft.nomadmetainfo.json"
-  ) ++ DefaultPythonInterpreter.commonFiles(),
-  dirMap = Map(
-    "parser-big-dft" -> "parsers/big-dft/parser/parser-big-dft",
-    "nomad_meta_info" -> "nomad-meta-info/meta_info/nomad_meta_info"
-  ) ++ DefaultPythonInterpreter.commonDirMapping()
-)
diff --git a/src/test/scala/eu/nomad_lab/parsers/BigDFTParserSpec.scala b/src/test/scala/eu/nomad_lab/parsers/BigDFTParserSpec.scala
deleted file mode 100644
index a6f4daf..0000000
--- a/src/test/scala/eu/nomad_lab/parsers/BigDFTParserSpec.scala
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed
- * 
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- */
-
-package eu.nomad_lab.parsers
-
-import org.specs2.mutable.Specification
-
-object BigDFTParserSpec extends Specification {
-  "BigDFTParserTest" >> {
-    "test with json-events" >> {
-      ParserRun.parse(BigDFTParser, "parsers/big-dft/test/examples/single_point/output.out", "json-events") must_== ParseResult.ParseSuccess
-    }
-  }
-
-  "test single_point with json" >> {
-    ParserRun.parse(BigDFTParser, "parsers/big-dft/test/examples/single_point/output.out", "json") must_== ParseResult.ParseSuccess
-  }
-}
-- 
GitLab