aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
6 stars 17 forks source link

Integrate with WEAS viewer. #559

Open yakutovicha opened 4 months ago

yakutovicha commented 4 months ago

Requires https://github.com/superstar54/weas-widget/pull/22.

Here is the way to test it:

  1. Enter AiiDAlab's terminal, cd into the ~/apps/ folder
  2. Clone the awb repository, and enter it: cd aiidalab-widgets-base
  3. Switch to the feature/weas-viewer-integration branch
  4. Pip install it: pip install --user -e .
  5. Go to another location and git clone my fork of the weas-widget.
  6. Enter the folder and switch to the feature/integrate-with-structuremanager-widget branch.
  7. Pip install it: pip install --user -e .
  8. Open File Manager in AiiDAlab and enter the apps/aiidalab-widgets-base/notebooks folder
  9. Launch structures.ipynb and execute its cells.

Problems:

  1. When integrated with awb's StructureManager the control icons look weird: image

  2. When uploading a new structure with the StructureManager, the weas viewer doesn't show it. The only way for it to work is to launch a viewer in a separate cell and execute it:

image

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.50%. Comparing base (8808a3c) to head (1340e40). Report is 39 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #559 +/- ## ========================================== + Coverage 87.07% 87.50% +0.42% ========================================== Files 27 27 Lines 4649 5321 +672 ========================================== + Hits 4048 4656 +608 - Misses 601 665 +64 ``` | [Flag](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/559/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [python-3.10](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/559/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `87.50% <100.00%> (+0.42%)` | :arrow_up: | | [python-3.9](https://app.codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/559/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `87.53% <100.00%> (+0.42%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

superstar54 commented 4 months ago

Hi @yakutovicha ,

When integrated with awb's StructureManager the control icons look weird:

this is fixed. Also the undo and redo buttons hidden using the guiConfig parameter.

Besides, the text of the dropdown in the control was wrong; this has also been fixed.

When uploading a new structure with the StructureManager, the weas viewer doesn't show it.

This is also fixed.

Please test it again, and see is there any update required from the weas side.

superstar54 commented 4 months ago

Enter the folder and switch to the feature/integrate-with-structuremanager-widget branch. Pip install it: pip install --user -e .

now it also needs to run npm to install weas-widget locally

npm install
npm run build
pip install -e .