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

Advanced override setting unification #457

Merged
merged 7 commits into from
Sep 5, 2023
Merged

Advanced override setting unification #457

merged 7 commits into from
Sep 5, 2023

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Sep 4, 2023

  • Remove override of sub-widgets of advanced setting
  • Proper white box tests are added for widgets
  • Move kpoints setting and totalchange setting into the advanced setting.

@unkcpz
Copy link
Member Author

unkcpz commented Sep 4, 2023

There is a follow-up PR required to improve the magnatization setting widget and add a unit test for it.

Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I added a few suggestions.

src/aiidalab_qe/app/configuration/__init__.py Outdated Show resolved Hide resolved
Comment on lines +148 to +153
settings = {
"kpoints_distance": self.kpoints_distance.value,
"total_charge": self.total_charge.value,
"degauss": self.smearing.degauss_value,
"smearing": self.smearing.smearing_value,
}
Copy link
Member

Choose a reason for hiding this comment

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

magnetization belongs to advanced settings, but its value is not used here.

src/aiidalab_qe/app/configuration/advanced.py Outdated Show resolved Hide resolved
def test_kpoints_settings():
"""Test KpointSettings widget."""
from aiidalab_qe.app.configuration.advanced import KpointSettings
def test_advanced_kpoints_settings():
Copy link
Member

Choose a reason for hiding this comment

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

For the kpoints_distance and total_charge, because they are basic ipywidget, I think it doesn't need to test them separately. You already tested them when testing the advanced setting as a whole.

@superstar54 superstar54 self-requested a review September 5, 2023 13:01
@unkcpz unkcpz merged commit 4e1911c into main Sep 5, 2023
8 of 10 checks passed
@unkcpz unkcpz deleted the adv-override-refac branch September 5, 2023 14:13
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.

2 participants