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

Handle plugin gracefully #713

Merged
merged 6 commits into from
May 2, 2024

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented May 1, 2024

This PR tries to handle plugin gracefully in two ways:

  • when the user installs the plugin from the plugin page, after the installation, it will try to load the entry point; if it failed, show the message and uninstall.
qeapp-plugin-gracefully.mp4
  • if user install a plugin manually, when run the QEApp, it will show warning message if QEApp can not load the entry point. Here, I created a bug in xas plugin and test:

Screenshot from 2024-05-01 11-15-05

@superstar54
Copy link
Member Author

Hi @AndresOrtegaGuerrero , I added a check for ComputationalResourcesWidget explicitly, so that when you install aiidalab-qe-vibroscopy, it will show the error.

Copy link
Member

@AndresOrtegaGuerrero AndresOrtegaGuerrero left a comment

Choose a reason for hiding this comment

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

LGTM! , I tested both cases you considered and it works perfectly ! Nice!

" else:\n",
" # uninstall the package\n",
" message_container.value = f\"\"\"<div style=\"color: #FF0000;\">The plugin '{package_name}' was installed successfully but plugin functionality test failed: {result.stderr}. </div>\"\"\"\n",
" message_container.value += \"\"\"<div style=\"color: #FF0000;\">This may be due to compatibility issues with the current QEApp version. Please contact the plugin author for further assistance.</div>\"\"\"\n",

Choose a reason for hiding this comment

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

current AiiDAlab QEApp ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I added AiiDAlab.

@superstar54 superstar54 merged commit a54c031 into aiidalab:main May 2, 2024
14 checks passed
@superstar54 superstar54 deleted the handle_plugin_gracefully branch May 2, 2024 08:22
@superstar54
Copy link
Member Author

@AndresOrtegaGuerrero , thanks for your review!

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.

None yet

2 participants