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

Add plugin entry point to workchain #458

Merged
merged 6 commits into from
Sep 6, 2023
Merged

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Sep 5, 2023

This PR uses bands property as an example to implement plugin design into the workchain.

  • to avoid cyclic import, I moved the plugins and common folders out from the app. This is also reasonable since both of them do not belong to the app.
  • Expose input and output of plugin workchain
  • run_plugin method to run all plugins in parallel.
    • pros: run plugins in parallel
    • cons: can not set dependency between plugins, e.g. share the scf foder between bands and pdos.

namespace_options={"required": False},
)
spec.exit_code(
404 + 1,
Copy link
Member

Choose a reason for hiding this comment

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

? 😸

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Patch coverage: 59.50% and project coverage change: +3.04% 🎉

Comparison is base (6716091) 56.68% compared to head (8e20da4) 59.73%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #458      +/-   ##
==========================================
+ Coverage   56.68%   59.73%   +3.04%     
==========================================
  Files          28       36       +8     
  Lines        2415     2826     +411     
==========================================
+ Hits         1369     1688     +319     
- Misses       1046     1138      +92     
Flag Coverage Δ
python-3.10 59.73% <59.50%> (+3.04%) ⬆️
python-3.8 59.77% <59.50%> (+3.03%) ⬆️
python-3.9 59.77% <59.50%> (+3.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/aiidalab_qe/common/__init__.py 100.00% <ø> (ø)
src/aiidalab_qe/common/node_view.py 42.64% <ø> (ø)
src/aiidalab_qe/common/process.py 30.23% <ø> (ø)
src/aiidalab_qe/common/widgets.py 31.74% <ø> (ø)
src/aiidalab_qe/app/result/workchain_viewer.py 23.20% <6.66%> (-1.50%) ⬇️
src/aiidalab_qe/app/configuration/__init__.py 32.52% <8.00%> (-3.29%) ⬇️
src/aiidalab_qe/plugins/bands/result.py 33.33% <33.33%> (ø)
src/aiidalab_qe/workflows/__init__.py 50.00% <49.09%> (+1.85%) ⬆️
src/aiidalab_qe/plugins/bands/setting.py 50.00% <50.00%> (ø)
src/aiidalab_qe/common/panel.py 75.55% <75.55%> (ø)
... and 11 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Perfect! Very clear now, thanks!

Comment on lines 20 to 21
# I removed the `validate_properties`, because the `properties` to be
# calculated are not fixed anymore. It depends on the installed plugins.
Copy link
Member

Choose a reason for hiding this comment

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

Remove this before merging.

@unkcpz
Copy link
Member

unkcpz commented Sep 5, 2023

Wait, seems there is a failed test, and it is caused by the plugin design. You can go and check the screenshot of the module loading failure in https://github.com/aiidalab/aiidalab-qe/actions/runs/6085956137?pr=458 (By download the artifact screenshot)
qe_app_select_silicon_and_confirm

@superstar54
Copy link
Member Author

Wait, seems there is a failed test, and it is caused by the plugin design.

Thanks for pointing out this. It was solved by adding __init__.py file to the plugins folder.

@superstar54 superstar54 merged commit c3ef810 into main Sep 6, 2023
12 of 13 checks passed
@superstar54 superstar54 deleted the plugin_band_workchain branch September 6, 2023 06:49
@superstar54 superstar54 mentioned this pull request Sep 6, 2023
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