Skip to content

Commit

Permalink
Merge branch 'master' into fix/xx/mock-for-cod-query-test
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz authored Nov 10, 2023
2 parents 4b8fdba + 9277a67 commit 3600ab3
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
steps:

- name: Check out app
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -64,7 +64,7 @@ jobs:
**/pyproject.toml
**/requirements*.txt
- name: Install package
- name: Install package test dependencies
run: pip install -e .[dev]

- name: Set jupyter token env
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
steps:

- name: Check out app
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v2
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ filterwarnings = [
# TODO: This comes from a transitive dependency of optimade_client
# Remove this when this issue is addressed:
# https://github.com/CasperWA/ipywidgets-extended/issues/85
'ignore:metadata.*trait.*<traitlets.traitlets.Unicode object:DeprecationWarning:traitlets',
'ignore::DeprecationWarning:ipywidgets_extended',
'ignore:metadata.*traitlets.traitlets.Unicode object:DeprecationWarning:traitlets',
# For some reason we get this error, perhaps because we do
# not unload the AiiDA profile? Let's ignore this for now.
# E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Popen.__del__>
Expand All @@ -24,6 +25,7 @@ filterwarnings = [
# E _warn("subprocess %s is still running" % self.pid,
# E ResourceWarning: subprocess 382685 is still running
'ignore:Exception ignored in:pytest.PytestUnraisableExceptionWarning:_pytest',
'ignore::DeprecationWarning:pytest_html',
'ignore::DeprecationWarning:jupyter_client',
'ignore::DeprecationWarning:selenium',
'ignore::DeprecationWarning:pytest_selenium',
Expand Down
8 changes: 6 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ install_requires =
bokeh~=2.0
humanfriendly~=10.0
ipytree~=0.2
traitlets~=5.9.0
ipywidgets~=7.7
widgetsnbextension<3.6.3
more-itertools~=8.0
Expand All @@ -45,9 +46,12 @@ dev =
bumpver==2021.1114
pgtest==1.3.1
pre-commit==2.10.1
pytest~=6.2
# NOTE: pytest-selenium currently incompatible with pytest>=7.2
# Maybe could be made to work by installing 'py' dependency, see:
# https://docs.pytest.org/en/7.4.x/changelog.html#pytest-7-2-0-2022-10-23
pytest~=7.1.0
pytest-cov~=4.0
pytest-docker~=1.0
pytest-docker~=2.0
pytest-selenium~=4.0
pytest-timeout~=2.2
selenium~=4.7.0
Expand Down
10 changes: 5 additions & 5 deletions tests/test_computational_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def test_resource_setup_widget_default():
# and the computer/code setup widget will be updated accordingly.
w.comp_resources_database.domain_selector.value = "daint.cscs.ch"
w.comp_resources_database.computer_selector.value = "mc"
w.comp_resources_database.code_selector.value = "QE-7.2-exe-template"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.2"

# Test before the template is filled, the warning message is displayed.
w._on_quick_setup()
Expand Down Expand Up @@ -584,7 +584,7 @@ def test_resource_setup_widget_for_password_configure(monkeypatch, tmp_path):
# and the computer/code setup widget will be updated accordingly.
w.comp_resources_database.domain_selector.value = "merlin.psi.ch"
w.comp_resources_database.computer_selector.value = "cpu"
w.comp_resources_database.code_selector.value = "QE-7.0-exe-template"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.0"

# Fill in the computer name and trigger the setup button again, the message should be updated.
for (
Expand Down Expand Up @@ -651,7 +651,7 @@ def test_resource_setup_widget_computer_change_code_reset():
# and the computer/code setup widget will be updated accordingly.
w.comp_resources_database.domain_selector.value = "daint.cscs.ch"
w.comp_resources_database.computer_selector.value = "mc"
w.comp_resources_database.code_selector.value = "QE-7.2-exe-template"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.2"

assert w.template_code._help_text.layout.display == "block"

Expand All @@ -668,7 +668,7 @@ def test_resource_setup_widget_detailed_setup():

w.comp_resources_database.domain_selector.value = "daint.cscs.ch"
w.comp_resources_database.computer_selector.value = "mc"
w.comp_resources_database.code_selector.value = "pw-7.0"
w.comp_resources_database.code_selector.value = "cp2k-9.1"

# Test the detailed setup widget is displayed with the label updated because the
# information can get from the default of the template variables.
Expand Down Expand Up @@ -735,7 +735,7 @@ def test_computer_resource_setup_widget_default(monkeypatch, tmp_path):

w_resource.comp_resources_database.domain_selector.value = "merlin.psi.ch"
w_resource.comp_resources_database.computer_selector.value = "cpu"
w_resource.comp_resources_database.code_selector.value = "QE-7.0-exe-template"
w_resource.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.0"

# Fill in the computer name and trigger the setup button again, the message should be updated.
for (
Expand Down
2 changes: 1 addition & 1 deletion tests_notebooks/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def notebook_service(docker_ip, docker_services, aiidalab_exec):
aiidalab_exec("chmod -R a+rw /home/jovyan/apps/aiidalab-widgets-base", user="root")

# Install AWB with extra dependencies for SmilesWidget
aiidalab_exec("pip install -U .[smiles]")
aiidalab_exec("pip install --no-cache-dir .[smiles]")

# `port_for` takes a container port and returns the corresponding host port
port = docker_services.port_for("aiidalab", 8888)
Expand Down
4 changes: 2 additions & 2 deletions tests_notebooks/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_computational_resources_code_setup(
selenium_driver, aiidalab_exec, final_screenshot
):
"""Test the quicksetup of the code"""
# check the code cp2k is not in code list
# check the code CP2K is not in code list
output = aiidalab_exec("verdi code list").decode().strip()
assert "cp2k" not in output

Expand Down Expand Up @@ -148,6 +148,6 @@ def test_computational_resources_code_setup(
).click()
time.sleep(1.0)

# check the new code pw-7.0@daint-mc is in code list
# check the new code cp2k-9.1@daint-mc is in code list
output = aiidalab_exec("verdi code list").decode().strip()
assert "cp2k-9.1@daint-mc" in output

0 comments on commit 3600ab3

Please sign in to comment.