Skip to content

Commit 7dccaf0

Browse files
authored
Merge branch 'main' into remove-artifacts
2 parents dabc273 + c1aeaec commit 7dccaf0

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
args: [--preserve-quotes]
1919

2020
- repo: https://github.com/psf/black
21-
rev: 23.12.1
21+
rev: 24.3.0
2222
hooks:
2323
- id: black
2424

stack/base/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ WORKDIR /opt/
1616

1717
ARG AIIDA_VERSION
1818

19-
# Pin shared requirements in the base environemnt.
20-
# The lower bound of aiida-core is set to the version of aiida-core to prevent
21-
# lower aiida-core DB version installed and trigger database downgrade.
19+
# Pin shared requirements in the base environment.
20+
# We pin aiida-core to the exact installed version,
21+
# to prevent accidental upgrade or downgrade, that might
22+
# induce DB migration or break shared dependencies of AiiDAlab Apps.
2223
RUN echo "pip==23.3.1" > /opt/requirements.txt && \
23-
echo "aiida-core>=${AIIDA_VERSION},<3" >> /opt/requirements.txt
24+
echo "aiida-core==${AIIDA_VERSION}" >> /opt/requirements.txt
2425

2526
# Install the shared requirements.
2627
RUN mamba install --yes \

tests/test-base-with-services.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Services related tests."""
2+
23
import json
34
from packaging.version import parse
45

tests/test-base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
"""This module contains tests for the base image, which are AiiDA and package management related tests."""
2+
23
import pytest
34
import json
45
from packaging.version import parse
56

67

7-
@pytest.mark.parametrize("incompatible_version", ["1.6.3"])
8+
@pytest.mark.parametrize("incompatible_version", ["2.3.0"])
89
def test_prevent_pip_install_of_incompatible_aiida_version(
910
aiidalab_exec, nb_user, aiida_version, incompatible_version
1011
):
1112
package_manager = "pip"
1213
assert parse(aiida_version) != parse(incompatible_version)
13-
# Expected to succeed:
14+
# Expected to succeed, although should be a no-op.
1415
aiidalab_exec(
1516
f"{package_manager} install aiida-core=={aiida_version}", user=nb_user
1617
)

tests/test-common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for all images, which are docker/docker-compose related tests."""
2+
23
import requests
34

45

0 commit comments

Comments
 (0)