Skip to content

Commit 03c29dc

Browse files
authored
Test aiida 2.7 (#698)
* tests: merlin.psi.ch -> merlin7.psi.sh
1 parent 3f9e956 commit 03c29dc

5 files changed

Lines changed: 23 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
matrix:
2727
browser: [Chrome, Firefox]
2828
# test on the latest and the oldest supported version
29-
aiida-core-version: [2.1.2, 2.6.3]
29+
docker-tag: [aiida-2.1.2, aiida-2.7.1]
3030
fail-fast: false
3131

3232
runs-on: ubuntu-22.04
@@ -73,13 +73,13 @@ jobs:
7373
- name: Run pytest
7474
run: pytest -v --driver ${{ matrix.browser }} tests_notebooks
7575
env:
76-
TAG: aiida-${{ matrix.aiida-core-version }}
76+
TAG: ${{ matrix.docker-tag }}
7777

7878
- name: Upload screenshots as artifacts
7979
if: always()
8080
uses: actions/upload-artifact@v4
8181
with:
82-
name: Screenshots-aiida-${{ matrix.aiida-core-version }}-${{ matrix.browser }}
82+
name: Screenshots-aiida-${{ matrix.docker-tag }}-${{ matrix.browser }}
8383
path: screenshots/
8484
if-no-files-found: error
8585

@@ -89,7 +89,7 @@ jobs:
8989
matrix:
9090
python-version: ['3.9', '3.11']
9191
# Test on the latest and oldest supported version
92-
aiida-core-version: [2.2.2, 2.6.3]
92+
aiida-core-version: [2.2.2, 2.7.1]
9393
fail-fast: false
9494

9595
runs-on: ubuntu-24.04

tests/test_computational_resources.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,9 @@ def test_resource_setup_widget_for_password_configure(monkeypatch, tmp_path):
572572

573573
# Test select a new resource setup will update the output interface (e.g. ssh_config, computer_setup, code_setup)
574574
# and the computer/code setup widget will be updated accordingly.
575-
w.comp_resources_database.domain_selector.value = "merlin.psi.ch"
575+
w.comp_resources_database.domain_selector.value = "merlin7.psi.ch"
576576
w.comp_resources_database.computer_selector.value = "cpu"
577-
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.0"
577+
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.4"
578578

579579
# Fill in the computer name and trigger the setup button again, the message should be updated.
580580
for (
@@ -585,7 +585,7 @@ def test_resource_setup_widget_for_password_configure(monkeypatch, tmp_path):
585585
sub_widget = mapping_variable.widget
586586

587587
# Test the default value is filled in correctly.
588-
assert sub_widget.value == "merlin-cpu"
588+
assert sub_widget.value == "merlin7-cpu"
589589

590590
# Test the password box is displayed.
591591
assert w.password_box_container.layout.display == "block"
@@ -627,14 +627,14 @@ def test_resource_setup_widget_for_password_configure(monkeypatch, tmp_path):
627627

628628
assert w.success
629629
# check the code is really created
630-
assert orm.load_code("pw-7.0@merlin-cpu")
630+
assert orm.load_code("pw-7.4@merlin7-cpu")
631631

632632
# The key pair will be generated to the temporary directory
633633
# Check the content of the config is correct
634634
with open(tmp_path / ".ssh" / "config") as f:
635635
content = f.read()
636636
assert "User aiida" in content
637-
assert "Host merlin-l-01.psi.ch" in content
637+
assert "Host login001.merlin7.psi.ch" in content
638638

639639
# After reset the password box should be hidden again.
640640
w.reset()
@@ -732,9 +732,9 @@ def test_computer_resource_setup_widget_default(monkeypatch, tmp_path):
732732

733733
w_resource = w.resource_setup
734734

735-
w_resource.comp_resources_database.domain_selector.value = "merlin.psi.ch"
735+
w_resource.comp_resources_database.domain_selector.value = "merlin7.psi.ch"
736736
w_resource.comp_resources_database.computer_selector.value = "cpu"
737-
w_resource.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.0"
737+
w_resource.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.4"
738738

739739
# Fill in the computer name and trigger the setup button again, the message should be updated.
740740
for (
@@ -745,7 +745,7 @@ def test_computer_resource_setup_widget_default(monkeypatch, tmp_path):
745745
sub_widget = mapping_variable.widget
746746

747747
# Test the default value is filled in correctly.
748-
assert sub_widget.value == "merlin-cpu"
748+
assert sub_widget.value == "merlin7-cpu"
749749

750750
# Fill the computer configure template variables
751751
for (
@@ -781,17 +781,17 @@ def test_computer_resource_setup_widget_default(monkeypatch, tmp_path):
781781

782782
assert w_resource.success
783783
# check the code is really created
784-
assert orm.load_code("pw-7.0@merlin-cpu")
784+
assert orm.load_code("pw-7.4@merlin7-cpu")
785785

786786
# check the dropdown is updated
787-
assert "pw-7.0@merlin-cpu" in [c[0] for c in w.code_select_dropdown.options]
787+
assert "pw-7.4@merlin7-cpu" in [c[0] for c in w.code_select_dropdown.options]
788788

789789
# The key pair will be generated to the temporary directory
790790
# Check the content of the config is correct
791791
with open(tmp_path / ".ssh" / "config") as f:
792792
content = f.read()
793793
assert "User aiida" in content
794-
assert "Host merlin-l-01.psi.ch" in content
794+
assert "Host login001.merlin7.psi.ch" in content
795795

796796

797797
@pytest.mark.usefixtures("aiida_profile_clean")

tests/test_databases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_computational_resources_database_widget():
5151
# Same for the quick setup widget.
5252
widget = ComputationalResourcesDatabaseWidget(default_calc_job_plugin="cp2k")
5353
assert (
54-
"merlin.psi.ch" not in widget.database
54+
"merlin7.psi.ch" not in widget.database
5555
) # Merlin does not have CP2K installed.
5656

5757
# Select computer/code
@@ -104,9 +104,9 @@ def test_resource_database_widget_recognize_template_entry_points():
104104
widget = ComputationalResourcesDatabaseWidget(
105105
default_calc_job_plugin="quantumespresso.pw"
106106
)
107-
assert "merlin.psi.ch" in widget.database
107+
assert "merlin7.psi.ch" in widget.database
108108

109109
widget = ComputationalResourcesDatabaseWidget(
110110
default_calc_job_plugin="quantumespresso.ph"
111111
)
112-
assert "merlin.psi.ch" in widget.database
112+
assert "merlin7.psi.ch" in widget.database

tests/test_process.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,14 @@ def test_process_follower_widget(multiply_add_process_builder_ready, daemon_clie
9696

9797
@pytest.mark.usefixtures("aiida_profile_clean")
9898
def test_process_report_widget(
99-
multiply_add_process_builder_ready, daemon_client, await_for_process_completeness
99+
multiply_add_process_builder_ready,
100+
stopped_daemon_client,
101+
await_for_process_completeness,
100102
):
101103
"""Test ProcessReportWidget with a simple `WorkChainNode`"""
102104
# Test the widget can be instantiated with empty inputs
103105
awb.ProcessReportWidget()
104106

105-
# Stopping the daemon and submitting the process.
106-
if daemon_client.is_daemon_running:
107-
daemon_client.stop_daemon(wait=True)
108107
process = engine.submit(multiply_add_process_builder_ready)
109108

110109
# Test the widget can be instantiated with a process
@@ -114,11 +113,11 @@ def test_process_report_widget(
114113
) # No report produced yet.
115114

116115
# Starting the daemon and waiting for the process to complete.
117-
daemon_client.start_daemon()
116+
stopped_daemon_client.start_daemon()
118117
await_for_process_completeness(process)
119118

120119
widget.update()
121-
daemon_client.stop_daemon(wait=True)
120+
stopped_daemon_client.stop_daemon(wait=True)
122121

123122

124123
@pytest.mark.usefixtures("aiida_profile_clean")

tests_notebooks/docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
version: '3.4'
3-
42
services:
53

64
aiidalab:

0 commit comments

Comments
 (0)