Skip to content

Commit

Permalink
Printing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Sep 27, 2024
1 parent dea8302 commit 40a9b13
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nomad_parser_wannier90/parsers/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,31 +530,39 @@ def parse(
# Checking if other mainfiles are present, if the closest is a DFT code, tries to create the
# DFT+TB workflow and link it with the corresponding Wannier90 entry
dft_files = self.workflow_dft_files(filename=self.mainfile)
print(dft_files)
if len(dft_files) == 1:
dft_path = dft_files[-1].split('raw/')[-1]
filepath_stripped = self.mainfile.split('raw/')[-1]
print(dft_path, filepath_stripped)
try:
# For automatic workflows
from nomad.app.v1.models import MetadataRequired
from nomad.search import search

upload_id = self.archive.metadata.upload_id
print(upload_id)
search_ids = search(
owner='visible',
user_id=self.archive.metadata.main_author.user_id,
query={'upload_id': upload_id},
required=MetadataRequired(include=['entry_id', 'mainfile']),
).data
print(search_ids)
metadata = [[sid['entry_id'], sid['mainfile']] for sid in search_ids]
print(metadata)
if len(metadata) > 1:
for entry_id, mainfile in metadata:
print(entry_id, mainfile, filepath_stripped)
if (
mainfile == filepath_stripped
): # we skipped the current parsed mainfile
continue
print(self.archive.m_context)
entry_archive = self.archive.m_context.load_archive(
entry_id, upload_id, None
)
print(entry_archive)
if dft_path == mainfile:
dft_archive = entry_archive

Expand Down

1 comment on commit 40a9b13

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/nomad_parser_wannier90
   __init__.py4250%3–4
   _version.py11282%5–6
src/nomad_parser_wannier90/parsers
   __init__.py10280%24–26
   band_parser.py511571%4, 24, 50–51, 73–74, 77–78, 85–89, 98–99, 104–105
   dos_parser.py18194%13
   hr_parser.py48981%4, 28, 46–47, 59–60, 94–96
   parser.py2253784%8–9, 215, 269–270, 310, 367–368, 385, 402, 419, 475–478, 508, 541–596
   win_parser.py1082081%5, 35–36, 65, 162, 169–171, 210, 221–222, 252–255, 262, 264–265, 269, 286–290
src/nomad_parser_wannier90/parsers/utils
   utils.py291355%4, 35–37, 56–71
src/nomad_parser_wannier90/schema_packages
   __init__.py8275%9–11
   package.py550%1–11
TOTAL51810879% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 14.307s ⏱️

Please sign in to comment.