Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Ternes committed Nov 1, 2024
1 parent 2ae5b24 commit 2f8fab3
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ where = ["src"]
parser_entry_point = "nomad_unitov_plugin.parsers:parser_entry_point"
schema_package_entry_point = "nomad_unitov_plugin.schema_packages:schema_package_entry_point"
solution_entry_point = "nomad_unitov_plugin.schema_packages:solution_entry_point"

#because not defined in hysprint

[tool.cruft]
# Avoid updating workflow files, this leads to permissions issues
Expand Down
5 changes: 3 additions & 2 deletions src/nomad_unitov_plugin/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
class HySprintParserEntryPoint(ParserEntryPoint):

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


class HySprintExperimentParserEntryPoint(ParserEntryPoint):

def load(self):
from nomad_hysprint.parsers.hysprint_batch_parser import HySprintExperimentParser
from nomad_unitov_plugin.parsers.hysprint_batch_parser import HySprintExperimentParser
return HySprintExperimentParser(**self.dict())


Expand All @@ -22,6 +22,7 @@ def load(self):
mainfile_mime_re='(application|text|image)/.*'
)

parser_entry_point = hysprint_parser; #Added to address AttributeError: module 'nomad_unitov_plugin.parsers' has no attribute 'parser_entry_point'. Did you mean: 'ParserEntryPoint'?

hysprint_experiment_parser = HySprintExperimentParserEntryPoint(
name='HySprintBatchParser',
Expand Down
2 changes: 1 addition & 1 deletion src/nomad_unitov_plugin/parsers/hysprint_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from nomad.datamodel import EntryArchive
from nomad.parsing import MatchingParser

from nomad_hysprint.schema_packages.hysprint_package import (
from nomad_unitov_plugin.schema_packages.hysprint_package import (
HySprint_JVmeasurement,
HySprint_TimeResolvedPhotoluminescence,
HySprint_EQEmeasurement,
Expand Down
26 changes: 26 additions & 0 deletions src/nomad_unitov_plugin/schema_packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,29 @@ def load(self):
name='HySprint',
description='Package for HZB HySprint Lab',
)

class MySchemaPackageEntryPoint(SchemaPackageEntryPoint):

def load(self):
from nomad_hysprint.schema_packages.schema_package import m_package
return m_package


schema_package_entry_point = MySchemaPackageEntryPoint(
name='SchemaHySprint',
description='SchemaPackage for HZB HySprint Lab',
)


class MySolutionPackageEntryPoint(SchemaPackageEntryPoint):

def load(self):
from nomad_hysprint.schema_packages.solution import m_package

return m_package


solution_entry_point = MySolutionPackageEntryPoint(
name='SchemaHySprint',
description='SchemaPackage for HZB HySprint Lab',
)
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def read_file_multiple(filedata):
return result


import os;
abs_path = os.path.dirname(os.path.abspath(__file__))+'\\';
print(read_file(abs_path+r"..\..\..\..\tests\data\example_measurement\EQE.txt", header_lines=24)[3]);
#import os;
#abs_path = os.path.dirname(os.path.abspath(__file__))+'\\';
#print(read_file(abs_path+r"..\..\..\..\tests\data\example_measurement\EQE.txt", header_lines=24)[3]);
#print(get_jv_data_unitov(file.read()))
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def read_mppt_file(filedata):

return mppt_dict

import os,io;
abs_path = os.path.dirname(os.path.abspath(__file__))+'\\';
file = io.open(abs_path+r"..\..\..\..\tests\data\example_measurement\001_Tracking.txt", "r",encoding='windows-1252')
print(read_mppt_file(file.read()))
#import os,io;
#abs_path = os.path.dirname(os.path.abspath(__file__))+'\\';
#file = io.open(abs_path+r"..\..\..\..\tests\data\example_measurement\001_Tracking.txt", "r",encoding='windows-1252')
#print(read_mppt_file(file.read()))


# file = "/home/a2853/Documents/Projects/nomad/hysprintlab/mppt/0a4d713aea22a9edaf1ac8b98fd5e44e.20211129_ re_02-2.mppt.txt"
Expand Down

0 comments on commit 2f8fab3

Please sign in to comment.