Skip to content

Commit

Permalink
create proper Entity ELN
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbrock authored and RubelMozumder committed Sep 12, 2024
1 parent f69cad9 commit 6e1cad5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/pynxtools/nomad/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from nomad.datamodel.metainfo.basesections import (
BaseSection, Component, CompositeSystem, CompositeSystemReference,
Entity, EntityReference, Instrument)
from nomad.datamodel.metainfo.eln import BasicEln
from nomad.metainfo import (Attribute, Bytes, Datetime, Definition, MEnum,
Package, Quantity, Section, SubSection)
from nomad.metainfo.data_type import (Bytes, Datatype, Datetime, Number,
Expand Down Expand Up @@ -839,8 +840,16 @@ def normalize_nxidentifier(self, archive, logger):
def create_Entity(lab_id, archive, f_name):
#entity = section.m_def
#new_archive = EntryArchive()
entity=Entity()

#entity=Entity()
#entity.lab_id=lab_id
entity=BasicEln()
entity.lab_id=lab_id
entity.entity=Entity()
entity.entity.lab_id=lab_id



#new_archive.data=entity
import json

Expand All @@ -855,7 +864,7 @@ def get_entry_reference(archive, f_name):
upload_id = archive.metadata.upload_id
entry_id = hash(upload_id, f_name)

return f"/entries/{entry_id}/archive#/data/data"
return f"/entries/{entry_id}/archive#/data"



Expand Down

0 comments on commit 6e1cad5

Please sign in to comment.