Skip to content

Commit

Permalink
Add unit test for workchain (#472)
Browse files Browse the repository at this point in the history
This commit adds tests for the `QeAppWorkChain` which test the workchain widget and behavior as a whole. 

It also includes the test for plugins: `bands` and `pdos`.
The test generates the projection data and bands data, then mounts them to the `QeAppWorkChain`. The final result is then checked.
  • Loading branch information
superstar54 committed Sep 21, 2023
1 parent 06bcc9d commit 658882b
Show file tree
Hide file tree
Showing 15 changed files with 458 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ jobs:

runs-on: ubuntu-latest
timeout-minutes: 30

services:
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672

steps:

- name: Check out app
Expand Down
8 changes: 0 additions & 8 deletions miscellaneous/structures/SiO2.xyz

This file was deleted.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ dev =
[options.package_data]
aiidalab_qe.app.parameters = qeapp.yaml
aiidalab_qe.app.static = *
aiidalab_qe.app.structure.examples = *

[options.entry_points]
aiidalab_qe.properties =
Expand Down
14 changes: 8 additions & 6 deletions src/aiidalab_qe/app/structure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Authors: AiiDAlab team
"""
import pathlib
import warnings

import aiida
Expand All @@ -27,13 +28,14 @@

# The Examples list of (name, file) tuple curretly passed to
# StructureExamplesWidget.
file_path = pathlib.Path(__file__).parent
Examples = [
("Silicon (diamond)", "miscellaneous/structures/Si.xyz"),
("Silicon oxide", "miscellaneous/structures/SiO2.xyz"),
("Diamond", "miscellaneous/structures/diamond.cif"),
("Gallium arsenide", "miscellaneous/structures/GaAs.xyz"),
("Gold (fcc)", "miscellaneous/structures/Au.cif"),
("Cobalt (hcp)", "miscellaneous/structures/Co.cif"),
("Silicon (diamond)", file_path / "examples" / "Si.xyz"),
("Silicon oxide", file_path / "examples" / "SiO2.xyz"),
("Diamond", file_path / "examples" / "diamond.cif"),
("Gallium arsenide", file_path / "examples" / "GaAs.xyz"),
("Gold (fcc)", file_path / "examples" / "Au.cif"),
("Cobalt (hcp)", file_path / "examples" / "Co.cif"),
]


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions src/aiidalab_qe/app/structure/examples/SiO2.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
6
Lattice="4.1801 0.0 0.0 0.0 4.1801 0.0 0.0 0.0 2.6678" Properties=species:S:1:pos:R:3:tags:I:1 spacegroup="P 42/m n m" unit_cell=conventional pbc="T T T"
Si 0.00000000 0.00000000 0.00000000 0
Si 2.09005000 2.09005000 1.33390000 0
O 1.28203667 1.28203667 0.00000000 1
O 2.89806333 2.89806333 0.00000000 1
O 3.37208667 0.80801333 1.33390000 1
O 0.80801333 3.37208667 1.33390000 1
Empty file.
File renamed without changes.
Loading

0 comments on commit 658882b

Please sign in to comment.