Skip to content

Commit

Permalink
first correct IV parser plus sample data
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Ternes committed Oct 29, 2024
1 parent b40228b commit 0780880
Show file tree
Hide file tree
Showing 29 changed files with 8,059 additions and 31 deletions.
32 changes: 23 additions & 9 deletions src/nomad_unitov_plugin/parsers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
from nomad.config.models.plugins import ParserEntryPoint
from pydantic import Field


class NewParserEntryPoint(ParserEntryPoint):
parameter: int = Field(0, description='Custom configuration parameter')
class HySprintParserEntryPoint(ParserEntryPoint):

def load(self):
from nomad_unitov_plugin.parsers.parser import NewParser
from nomad_hysprint.parsers.hysprint_parser import HySprintParser
return HySprintParser(**self.dict())

return NewParser(**self.dict())

class HySprintExperimentParserEntryPoint(ParserEntryPoint):

parser_entry_point = NewParserEntryPoint(
name='NewParser',
description='New parser entry point configuration.',
mainfile_name_re='.*\.newmainfilename',
def load(self):
from nomad_hysprint.parsers.hysprint_batch_parser import HySprintExperimentParser
return HySprintExperimentParser(**self.dict())


hysprint_parser = HySprintParserEntryPoint(
name='HySprintParser',
description='Parser for Hysprint files',
mainfile_name_re='^(.+\.?.+\.((eqe|jv|jvi|pl|pli|hy|spv|env|uvvis|PL|JV|PLI|EQE|SEM|sem|xrd|mppt)\..{1,4})|.+\.nk)$',
mainfile_mime_re='(application|text|image)/.*'
)


hysprint_experiment_parser = HySprintExperimentParserEntryPoint(
name='HySprintBatchParser',
description='Parser for Hysprint Batch xlsx files',
mainfile_name_re='^(.+\.xlsx)$',
#mainfile_contents_re='Experiment Info',
mainfile_mime_re='(application|text|image)/.*'
)
Loading

0 comments on commit 0780880

Please sign in to comment.