-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing of magres files #193
Conversation
@ladinesa here you have the changes. Bear in mind I defined Let me know what you think, I need still to parse the Thanks! |
can you paste the error here? |
This is it (again, only when defining in /magres/metainfo/magres.py and importing them in the utils.py using ERROR nomad.client 2024-01-17T14:05:29 parsing was not successful
- exception: Traceback (most recent call last):
File "/home/josepizarro/nomad/nomad/parsing/parsers.py", line 215, in run_parser
parser.parse(mainfile_path, entry_archive, logger=logger, **kwargs)
File "/home/josepizarro/nomad/nomad/parsing/parser.py", line 460, in parse
self.mainfile_parser.parse(mainfile, archive, logger)
File "/home/josepizarro/nomad/nomad/parsing/parser.py", line 451, in mainfile_parser
raise e
File "/home/josepizarro/nomad/nomad/parsing/parser.py", line 446, in mainfile_parser
Parser = self.import_parser_class()
File "/home/josepizarro/nomad/nomad/parsing/parser.py", line 463, in import_parser_class
return import_class(self._parser_class_name, 'parser')
File "/home/josepizarro/nomad/nomad/parsing/parser.py", line 419, in import_class
raise e
File "/home/josepizarro/nomad/nomad/parsing/parser.py", line 412, in import_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/fhiaims/__init__.py", line 19, in <module>
from .parser import FHIAimsParser
File "/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/fhiaims/parser.py", line 59, in <module>
from ..utils import BeyondDFTWorkflowsParser
File "/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/utils/__init__.py", line 19, in <module>
from .utils import get_files, numpy_type_to_json_serializable, BeyondDFTWorkflowsParser
File "/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/utils/utils.py", line 51, in <module>
from ..magres.metainfo.magres import (
File "/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/magres/__init__.py", line 19, in <module>
from .parser import MagresParser
File "/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/magres/parser.py", line 48, in <module>
from ..utils import BeyondDFTWorkflowsParser
ImportError: cannot import name 'BeyondDFTWorkflowsParser' from partially initialized module 'electronicparsers.utils' (most likely due to a circular import) (/home/josepizarro/nomad/dependencies/parsers/electronic/electronicparsers/utils/__init__.py)
- exception_hash: 1zAJbjhQvtS4kVzlN_6ggqkidb9j
- nomad.client.parser: parsers/fhi-aims
- nomad.commit:
- nomad.deployment: devel
- nomad.service: cli
- nomad.version: 1.2.2.dev304+g663ab7d9d.d20240117 |
This is expected and implies that we perhaps need to put the
can you remove all under utils/init.py and use the absolute path. |
How do you mean? Do you mean:
|
Do number 2 and do the utils imports as from electronicparsers.utils import. Then perhaps you can have NMRMagRes in magres/metainfo |
Ok, I managed to make it work. You will see a lot of files changed so now I am using the abs path for the utils in other parsers. Let me know what you think. If this is ready then, I will focus on finishing today / tomorrow the Gitlab side. |
Ok, it seems that, even tho the pathing is working in Github, it is completely broken from the central nomad (you can see the testing here). I guess one has to write the whole path, but the it brokes the local github testing. I will leave it to how it was: define |
fc62ade
to
06568de
Compare
Added Method.label to magres and CASTEP
Added test for magres
Added condition for DMFT workflow in w2dynamics
Fixed utils workflow extraction to new naming of workflow classes
Removed variables in warnings
06568de
to
bb5eb98
Compare
I still need to do:
isc
in the code).Related with the magres MR in Gitlab.