Skip to content

Commit

Permalink
Apply Ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaelman committed Sep 11, 2024
1 parent 2f7d42a commit d500ac4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 5 additions & 3 deletions src/nomad_parser_vasp/parsers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
from nomad.config.models.plugins import ParserEntryPoint
from nomad.config.models.plugins import EntryPoint
from pydantic import Field


class VasprunXMLEntryPoint(ParserEntryPoint):
class VasprunXMLEntryPoint(EntryPoint):
parameter: int = Field(0, description='Custom configuration parameter')

def load(self):
from nomad_parser_vasp.parsers.xml_parser import VasprunXMLParser

return VasprunXMLParser('nomad_parser_vasp/parser/xml_parser.py/VasprunXMLParser', **self.dict())
return VasprunXMLParser(
'nomad_parser_vasp/parser/xml_parser.py/VasprunXMLParser', **self.dict()
)


xml_entry_point = VasprunXMLEntryPoint(
Expand Down
4 changes: 1 addition & 3 deletions src/nomad_parser_vasp/parsers/myparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
from nomad.datamodel.results import Material, Results
from nomad.parsing.parser import MatchingParser

configuration = config.get_plugin_entry_point(
'nomad_parser_vasp.parsers:myparser'
)
configuration = config.get_plugin_entry_point('nomad_parser_vasp.parsers:myparser')


class MyParser(MatchingParser):
Expand Down
2 changes: 1 addition & 1 deletion src/nomad_parser_vasp/schema_packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class MySchemaPackageEntryPoint(SchemaPackageEntryPoint):

def load(self):
from nomad_parser_vasp.schema_packages.mypackage import m_package

return m_package


Expand Down
9 changes: 5 additions & 4 deletions src/nomad_parser_vasp/schema_packages/vasp_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
path='.calculation'
)

ModelSystem.cell.m_annotations['xml'] = MappingAnnotationModel(
path='.structure'
)
ModelSystem.cell.m_annotations['xml'] = MappingAnnotationModel(path='.structure')

Simulation.outputs.m_annotations['xml'] = MappingAnnotationModel(path='.calculation')

Expand Down Expand Up @@ -70,7 +68,10 @@
xml=MappingAnnotationModel(
operator=(
'mix_alpha',
[dft_path + '.i[?"@name"=="HFALPHA"]', dft_path + '.i[?"@name"=="LHFCALC"]'],
[
dft_path + '.i[?"@name"=="HFALPHA"]',
dft_path + '.i[?"@name"=="LHFCALC"]',
],
)
) # TODO convert vasp bool
)
Expand Down

0 comments on commit d500ac4

Please sign in to comment.