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

Provide categorized example structures. #1019

Merged

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Dec 23, 2024

Fix #1018

[x] Provide categorized example structures, and only the respective examples are shown when the button is clicked.

  • Simple crystals
  • XPS examples
  • XAS examples

[x] The example catalog is extensible by the plugins.
[x] For the "Simple crystals" tab, replace the current ones with the following list (IMPORTANT: remove the string
[x] Remove the "Primitive cell" from everywhere, as done below, as we should always ONLY provide the primitive cell):

  • Bulk silicon
  • Diamond
  • Gallium arsenide
  • Gold
  • LiCoO2
  • Nickel
  • Silicon oxide

[x] For gold, replace the current one with its primitive cell.
[x] For Cobalt, remove it and replace with Nickel FCC.

Note for the Silicon oxide: I keep the alpha quartz because Silicon oxide has many possible structures, and it's important to tell which one we are using.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 52.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 68.80%. Comparing base (d4c495e) to head (f68f4c9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/aiidalab_qe/common/widgets.py 30.76% 9 Missing ⚠️
src/aiidalab_qe/app/structure/__init__.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1019      +/-   ##
==========================================
- Coverage   68.86%   68.80%   -0.06%     
==========================================
  Files         115      117       +2     
  Lines        6462     6486      +24     
==========================================
+ Hits         4450     4463      +13     
- Misses       2012     2023      +11     
Flag Coverage Δ
python-3.11 68.79% <52.00%> (-0.07%) ⬇️
python-3.9 68.83% <52.00%> (-0.06%) ⬇️

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

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

@superstar54 superstar54 force-pushed the feature/categorized_example_structures branch from adca192 to 8a12768 Compare December 23, 2024 12:32
@superstar54 superstar54 linked an issue Dec 23, 2024 that may be closed by this pull request
Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

LGTM @superstar54. Note that the new widget is not MVC compatible and will load on initialization. We're trying to avoid this. We should consider revisiting later (that is, if we don't go the React/Solara way). But for now, the widget is small enough that it should add much of an impact.

@superstar54
Copy link
Member Author

Note that the new widget is not MVC compatible and will load on initialization.

The widget CategorizedStructureExamplesWidget is inherited from StructureExamplesWidget, which is from aiidalab-widget-base, that's why I didn't use MVC. We need to refactor the aiidalab-widget-base using MVC, but in the future.

@superstar54 superstar54 merged commit 802bca8 into aiidalab:main Dec 23, 2024
7 of 8 checks passed
@superstar54 superstar54 deleted the feature/categorized_example_structures branch December 23, 2024 15:21
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.

Update the examples tab
2 participants