From 075dc6c1b499fa7b60ed1288066df23858085a1c Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 2 Jun 2026 23:36:34 +0100 Subject: [PATCH 1/2] Test aiidalab@pip-uninstall branch --- stack/lab/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stack/lab/Dockerfile b/stack/lab/Dockerfile index faccacab..25a814c0 100644 --- a/stack/lab/Dockerfile +++ b/stack/lab/Dockerfile @@ -21,6 +21,9 @@ RUN mamba install --yes \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" +# TO-BE-REMOVED: TEST FEATURE BRANCH +RUN pip install --no-user aiidalab@git@https://github.com/danielhollas/aiidalab@pip-uninstall + # Pin aiidalab version. RUN echo "aiidalab==${AIIDALAB_VERSION}" >> /opt/requirements.txt RUN conda config --system --add pinned_packages "aiidalab=${AIIDALAB_VERSION}" From 71b3764caafe965c506163eb92f0a95f63ee59df Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 2 Jun 2026 23:36:52 +0100 Subject: [PATCH 2/2] Update generate_aiidalab_install_output fixture --- stack/lab/Dockerfile | 2 +- tests/test_aiidalab_apps.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/stack/lab/Dockerfile b/stack/lab/Dockerfile index 25a814c0..919061a7 100644 --- a/stack/lab/Dockerfile +++ b/stack/lab/Dockerfile @@ -22,7 +22,7 @@ RUN mamba install --yes \ fix-permissions "/home/${NB_USER}" # TO-BE-REMOVED: TEST FEATURE BRANCH -RUN pip install --no-user aiidalab@git@https://github.com/danielhollas/aiidalab@pip-uninstall +RUN pip install --no-user aiidalab@git+https://github.com/danielhollas/aiidalab@pip-uninstall # Pin aiidalab version. RUN echo "aiidalab==${AIIDALAB_VERSION}" >> /opt/requirements.txt diff --git a/tests/test_aiidalab_apps.py b/tests/test_aiidalab_apps.py index 1b20258d..d97ab886 100644 --- a/tests/test_aiidalab_apps.py +++ b/tests/test_aiidalab_apps.py @@ -1,3 +1,5 @@ +import json + import pytest pytestmark = pytest.mark.integration @@ -35,11 +37,14 @@ def _generate_aiidalab_install_output(package_name): if pkg: app_name = pkg.split("@")[0] aiidalab_exec(f"aiidalab uninstall --yes --force {app_name}", user=nb_user) - # TODO: Remove this after solving https://github.com/aiidalab/aiidalab/issues/405 pkg_name = app_name if app_name.lower() == "quantum-espresso": pkg_name = "aiidalab-qe" - aiidalab_exec(f"pip uninstall --yes {pkg_name}", user=nb_user) + else: + pkg_name = app_name + cmd = f"mamba list --json --full-name {pkg_name}" + pkg_info = json.loads(aiidalab_exec(cmd)) + assert len(pkg_info) == 0, f"Python package {pkg_name} was not uninstalled" @pytest.mark.parametrize("package_name", ["aiidalab-widgets-base", "quantum-espresso"])