diff --git a/electronicparsers/magres/parser.py b/electronicparsers/magres/parser.py index 5426e3fa..06902c84 100644 --- a/electronicparsers/magres/parser.py +++ b/electronicparsers/magres/parser.py @@ -41,8 +41,6 @@ SpinSpinCoupling, ) from .metainfo.magres import m_package - -from nomad.app.v1.models import MetadataRequired from ..utils import BeyondDFTWorkflowsParser @@ -441,7 +439,7 @@ def parse(self, filepath, archive, logger): # Create Run with Program information sec_run = Run() - calculation_params = self.magres_file_parser.get('calculation') + calculation_params = self.magres_file_parser.get('calculation', {}) program_name = calculation_params.get('code', '') if program_name != 'CASTEP': self.logger.error( diff --git a/pyproject.toml b/pyproject.toml index bf32dd31..9bfafa1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,13 +10,13 @@ readme = "README.md" authors = [{ name = "The NOMAD Authors" }] license = { file = "LICENSE" } dependencies = [ + "h5py>=3.6.0", + "lxml>=5.2", "nomad-lab>=1.3.6.dev1", "nomad-schema-plugin-simulation-workflow>=1.0.1", "nomad-schema-plugin-run>=1.0.1", "nomad-parser-plugins-simulation>=1.0.2", - "lxml>=5.2", "netCDF4==1.6.5", - "h5py>=3.6.0", "pyyaml>=6.0", "pydantic>=1.10.8,<2.0.0", ] @@ -26,26 +26,18 @@ homepage = "https://github.com/nomad-coe/electronic-parsers" [project.optional-dependencies] dev = [ - 'mypy==1.0.1', - 'pytest==3.10.0', - 'pytest-timeout==1.4.2', - 'pytest-cov==2.7.1', 'astroid==2.11.7', - 'typing-extensions==4.7.1', - 'ruff==0.1.8' + 'mypy==1.0.1', + 'pytest>= 5.3.0, <8', + 'pytest-timeout>=1.4.2', + 'pytest-cov>=2.7.1', + 'ruff>=0.6', + 'typing-extensions>=4.12', ] # these are extra deps for nomad infra as a result of using nomad.search # TODO remove usage in magres and w2dynamics infrastructure = [ - "mongoengine>=0.20", - "pyjwt[crypto]==2.6.0", - "structlog", - "python-logstash==0.4.6", - "pydantic>=1.10.8,<2.0.0", - "fastapi<0.100", - "elasticsearch==7.17.1", - "elasticsearch-dsl==7.4.0", - "zipstream-new==1.1.5", + "nomad-lab[infrastructure]>=1.3.10", ] [tool.ruff]