Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue workchain viewer not designated for workchains except QeAppWorkchain #348

Merged
merged 4 commits into from
Feb 20, 2023

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Feb 10, 2023

Combined with aiidalab/aiidalab-widgets-base#430 should fix #344

fixes #344

The register_viewer_widget decorator registers the viewer by class and the new viewer for QeAppWorkchain specifically also become the viewer of other WorkChain. It will raise the KeyError and raised which is not expected.
Instead of raising the exception, nothing is returned. This is a workaround since ideally if there is no new specific viewer defined for a specific work chain, it needs to fall back to the native one of AWB. As tried in aiidalab/aiidalab-widgets-base#430

@unkcpz unkcpz changed the title Fix/344/workchain Fix issue workchain viewer not designated for workchains except QeAppWorkchain Feb 17, 2023
@unkcpz unkcpz marked this pull request as ready for review February 17, 2023 16:50
Copy link
Contributor

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

I have one question, otherwise looks good.
(though I haven't tested it since I don't work with QeApp generally)

aiidalab_qe/node_view.py Outdated Show resolved Hide resolved
@unkcpz
Copy link
Member Author

unkcpz commented Feb 20, 2023

(though I haven't tested it since I don't work with QeApp generally)

Don't worry 😄, I'll ask @superstar54 to give it a test after I revert the wrong change. Thanks a lot for reviewing.

@unkcpz
Copy link
Member Author

unkcpz commented Feb 20, 2023

@superstar54, can you give a look at this? Thanks!

@superstar54
Copy link
Member

superstar54 commented Feb 20, 2023

I tested the example reported in #344. No error anymore. 👍

@unkcpz
Copy link
Member Author

unkcpz commented Feb 20, 2023

Thanks @superstar54. Can you approve it then? 😄

Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

LGTM!

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 report: node view check the process label too strigent
3 participants