Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
parser-lib-atoms
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
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-lib-atoms
Commits
a451b8ac
Commit
a451b8ac
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Remove dependency on old metainfo.
parent
c0de955c
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
libatomsparser/libAtomsParser.py
+1
-7
1 addition, 7 deletions
libatomsparser/libAtomsParser.py
libatomsparser/setup_paths.py
+0
-20
0 additions, 20 deletions
libatomsparser/setup_paths.py
with
1 addition
and
27 deletions
libatomsparser/libAtomsParser.py
+
1
−
7
View file @
a451b8ac
...
...
@@ -22,7 +22,6 @@ import logging
import
numpy
as
np
from
nomadcore.local_meta_info
import
loadJsonFile
,
InfoKindEl
from
nomadcore.parser_backend
import
JsonParseEventsWriterBackend
from
contextlib
import
contextmanager
from
libatomsparser.libLibAtomsParser
import
*
...
...
@@ -48,13 +47,9 @@ class LibAtomsParserWrapper():
self
.
backend_factory
=
backend
def
parse
(
self
,
mainfile
):
import
nomad_meta_info
metaInfoPath
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
nomad_meta_info
.
__file__
)),
"
lib_atoms.nomadmetainfo.json
"
))
metaInfoEnv
,
warnings
=
loadJsonFile
(
filePath
=
metaInfoPath
,
dependencyLoader
=
None
,
extraArgsHandling
=
InfoKindEl
.
ADD_EXTRA_ARGS
,
uri
=
None
)
from
unittest.mock
import
patch
logging
.
info
(
'
lib-atoms parser started
'
)
logging
.
getLogger
(
'
nomadcore
'
).
setLevel
(
logging
.
WARNING
)
backend
=
self
.
backend_factory
(
meta
I
nfo
Env
)
backend
=
self
.
backend_factory
(
"
lib_atoms.nomad
meta
i
nfo
.json
"
)
# Call the old parser without a class.
parserInfo
=
{
'
name
'
:
'
lib_atoms-parser
'
,
'
version
'
:
'
0.0
'
}
backend
=
parse_without_class
(
mainfile
,
backend
,
parserInfo
)
...
...
@@ -102,7 +97,6 @@ def parse_without_class(output_file_name, backend, parser_info):
jbe
.
startedParsingSession
(
output_file_name
,
parser_info
)
base_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
output_file_name
))
# jbe = JsonParseEventsWriterBackend(meta_info_env)
# jbe.startedParsingSession(output_file_name, parser_info)
# base_dir = os.path.dirname(os.path.abspath(output_file_name))
...
...
This diff is collapsed.
Click to expand it.
libatomsparser/setup_paths.py
deleted
100644 → 0
+
0
−
20
View file @
c0de955c
# Copyright 2016-2018 Fawzi Mohamed, Carl Poelking, Daria Tomecka
#
# 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.
import
sys
,
os
,
os
.
path
baseDir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
commonDir
=
os
.
path
.
normpath
(
os
.
path
.
join
(
baseDir
,
"
../../../../python-common/common/python
"
))
if
not
commonDir
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
commonDir
)
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