Skip to content

Include the old convension to call nexsu_parser in the aliases list.#776

Merged
RubelMozumder merged 1 commit into
masterfrom
773-bug-parser-aliasing
May 11, 2026
Merged

Include the old convension to call nexsu_parser in the aliases list.#776
RubelMozumder merged 1 commit into
masterfrom
773-bug-parser-aliasing

Conversation

@RubelMozumder
Copy link
Copy Markdown
Collaborator

closes #773

In some previous version of pynxtools, we registered the nexus parser in a different way, pynxtools.nomad.entrypoints:nexus_parser. But later changing the entry point name to pynxtools.nomad.parsers:nexus_parser causes an error in nomad. This is fixed by adding the old convention in aliases in NexusParserEntryPoint.

I tested if the aliases are registered properly.

In [1]: from nomad.parsing.parsers import match_parser, parser_dict, parsers

In [2]: for k, v in parser_dict.items():
   ...: 
   ...:     if 'pynxtools' in k:
   ...:         print(f"EntryPoint: {k}")
   ...:
EntryPoint: pynxtools.nomad.parsers:nexus_parser
EntryPoint: pynxtools.nomad.entrypoints:nexus_parser

@RubelMozumder RubelMozumder linked an issue May 8, 2026 that may be closed by this pull request
@RubelMozumder RubelMozumder requested a review from lukaspie May 8, 2026 08:44
@lukaspie
Copy link
Copy Markdown
Collaborator

lukaspie commented May 8, 2026

It looks good, but we need to check it works. I guess we can only find out if we reprocess older data in production (like what was reported in the issue). @lauri-codes that probably solves the issue, right?

@RubelMozumder
Copy link
Copy Markdown
Collaborator Author

RubelMozumder commented May 8, 2026

It looks good, but we need to check it works. I guess we can only find out if we reprocess older data in production (like what was reported in the issue). @lauri-codes that probably solves the issue, right?

Yeah, I logically checked if aliases refer to the correct entry point.

In [4]: for k, v in parser_dict.items():
   ...: 
   ...:     if 'pynxtools' in k:
   ...:         print(f"Entry point :\n {k}: {v}")
   ...: 
Entry point :
 pynxtools.nomad.parsers:nexus_parser: pynxtools.nomad.parsers:nexus_parser
Entry point :
 pynxtools.nomad.entrypoints:nexus_parser: pynxtools.nomad.parsers:nexus_parser

@RubelMozumder RubelMozumder requested a review from lauri-codes May 8, 2026 09:21
@RubelMozumder RubelMozumder force-pushed the 773-bug-parser-aliasing branch from b3d5858 to 891e845 Compare May 11, 2026 14:59
@RubelMozumder RubelMozumder merged commit 618bed0 into master May 11, 2026
17 checks passed
@RubelMozumder RubelMozumder deleted the 773-bug-parser-aliasing branch May 11, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Parser aliasing

2 participants