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

Register WorkChainNode viewer for calcfunctions and workfunctions as well #348

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Sep 4, 2022

In #335 I've implemented a simple workchain viewer that prints the output of verdi process report command. I didn't realize that the same viewer will work for calcfunctions and workfunctions as well. Note that calcjobs have their own viewer that follows the output file.

Before:
image

After:
image

Reusing an existing viewer for WorkChainNode
that prints the output of `verdi process report` command,
introduced in aiidalab#335.
@danielhollas danielhollas marked this pull request as ready for review September 6, 2022 16:26
@danielhollas
Copy link
Contributor Author

@yakutovicha one more tiny PR for you. 😊 I've modified the notebooks/aiida_datatypes_viewers.ipynb notebook for easier local testing.

@danielhollas danielhollas changed the title WIP: Register workchain viewer for calcfunctions and workfunctions as well Register WorkChainNode viewer for calcfunctions and workfunctions as well Sep 6, 2022
Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

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

Thanks, @danielhollas. A couple of suggestions.

aiidalab_widgets_base/viewers.py Outdated Show resolved Hide resolved
aiidalab_widgets_base/viewers.py Outdated Show resolved Hide resolved
@yakutovicha yakutovicha mentioned this pull request Sep 7, 2022
6 tasks
@danielhollas danielhollas self-assigned this Sep 7, 2022
@danielhollas danielhollas added the enhancement New feature or request label Sep 7, 2022
Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

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

Thanks, @danielhollas. A few more suggestions.

aiidalab_widgets_base/viewers.py Show resolved Hide resolved
aiidalab_widgets_base/viewers.py Show resolved Hide resolved
aiidalab_widgets_base/viewers.py Outdated Show resolved Hide resolved
Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @danielhollas!

@yakutovicha yakutovicha merged commit f4c3e3e into aiidalab:master Sep 13, 2022
@danielhollas danielhollas deleted the workchain-viewer-contd branch September 13, 2022 11:05
@danielhollas
Copy link
Contributor Author

Thanks @yakutovicha! It would be great if you could cut a new release. ☺️

@yakutovicha
Copy link
Member

Thanks @yakutovicha! It would be great if you could cut a new release. ☺️

done!

unkcpz added a commit to unkcpz/aiidalab-widgets-base that referenced this pull request Nov 16, 2023
…Workchain (aiidalab#348)

fixes aiidalab#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#430
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants