Skip to content

Commit

Permalink
Update full-stack image version - aiida v2.6 (aiidalab#801)
Browse files Browse the repository at this point in the history
* Update full-stack image version - aiida v2.6
* Update test_verdi_status
* Tweak aiidalab_exec fixture
* Ignore some warnings
* use astral-sh/setup-uv@v1
  • Loading branch information
danielhollas authored Sep 18, 2024
1 parent 2c22abb commit 95e8f4b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ concurrency:

env:
FORCE_COLOR: 1
UV_VERSION: 0.3.0

jobs:

Expand Down Expand Up @@ -45,7 +44,9 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/${{ env.UV_VERSION }}/uv-installer.sh | sh
uses: astral-sh/setup-uv@v1
with:
version: 0.4.7

- name: Install package
run: uv pip install --system -e .[dev] aiida-core==${{ matrix.aiida-core-version }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG FULL_STACK_VER=2024.1021
ARG UV_VER=0.2.27
ARG FULL_STACK_VER=2024.1022
ARG UV_VER=0.4.7
ARG QE_VER=7.2
ARG QE_DIR=/opt/conda/envs/quantum-espresso-${QE_VER}

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = '--strict-config --strict-markers --durations=30 --durations-min=1 -ra'
filterwarnings = [
'ignore:Object of type .* not in session, .* operation along .* will not proceed:',
# This is needed since SQLAlchemy 2.0, see
# https://github.com/aiidalab/aiidalab-widgets-base/issues/605
'ignore:Object of type.*not in session,.*operation along.*will not proceed:',
'ignore:Creating AiiDA configuration:UserWarning:',
'ignore:metadata.*traitlets.traitlets.Unicode object:DeprecationWarning:',
# For some reason we get this error, see
# https://github.com/aiidalab/aiidalab-widgets-base/issues/551
'ignore:Exception ignored in:pytest.PytestUnraisableExceptionWarning:_pytest',
# This popped up in spglib 2.5. Since we still try to support spglib v1,
"ignore:dict interface.*is deprecated.Use attribute interface:DeprecationWarning:",
]

[tool.ruff]
Expand Down
4 changes: 2 additions & 2 deletions tests_integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ def execute(command, user=None, workdir=None, **kwargs):
opts = f"{opts} --workdir={workdir}"
command = f"exec {opts} aiidalab {command}"

return docker_compose.execute(command, **kwargs)
return docker_compose.execute(command, **kwargs).decode().strip()

return execute


@pytest.fixture(scope="session")
def nb_user(aiidalab_exec):
return aiidalab_exec("bash -c 'echo \"${NB_USER}\"'").decode().strip()
return aiidalab_exec("bash -c 'echo \"${NB_USER}\"'")


@pytest.fixture(scope="session")
Expand Down
9 changes: 6 additions & 3 deletions tests_integration/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ def test_notebook_service_available(notebook_service):
def test_verdi_status(aiidalab_exec, nb_user):
# Check the aiida service is running and connected to RabbitMQ
# The notebook_service fixture is needed to wait for the services to be up
output = aiidalab_exec("verdi status", user=nb_user).decode().strip()
assert "Connected to RabbitMQ" in output
output = aiidalab_exec("verdi status", user=nb_user)
for status in ("version", "config", "profile", "storage", "broker", "daemon"):
assert f"✔ {status}" in output
assert "/home/jovyan/.aiida" in output
assert "Daemon is running" in output
assert "Unable to connect to broker" not in output


@pytest.mark.usefixtures("notebook_service")
def test_pseudos_families_are_installed(aiidalab_exec, nb_user):
# Check the aiida service is running and connected to RabbitMQ
# The notebook_service fixture is needed to wait for the services to be up
output = aiidalab_exec("aiida-pseudo list", user=nb_user).decode().strip()
output = aiidalab_exec("aiida-pseudo list", user=nb_user)
assert "SSSP" in output
assert "PseudoDojo" in output

Expand Down

0 comments on commit 95e8f4b

Please sign in to comment.