Skip to content

Commit 7e637e4

Browse files
authored
Fix unittests and notebooks (#256)
Remove jupyterlab and use jupyter notebook instead (jupyterlab will be superceded by notebook v7) Pin notebook af v6.x. Reorganise github actions Suppress E704 for pycodestyle Remove PYTHONPATH setting in Dockerfile Upgrade tools. Reformat code according to latest black settings Fix pyproject.toml Suppress notebooks for python 3.12 because of incompatible pyzmq dependency. AB#9074
1 parent 59302cc commit 7e637e4

48 files changed

Lines changed: 90 additions & 54 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/python-package.yml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,28 @@ jobs:
4141
run: |
4242
python3 -m pip install --upgrade pip
4343
python3 -m pip install -r requirements-dev.txt
44+
./scripts/version.sh
4445
shell: bash
45-
- name: Run integrity checks
46+
- name: pycodestyle
4647
run: |
47-
./scripts/version.sh
4848
pycodestyle --format=pylint archivist examples functests unittests
49+
shell: bash
50+
- name: pylint
51+
run: |
4952
python3 -m pylint archivist examples functests unittests
50-
black archivist examples unittests functests
53+
shell: bash
54+
- name: black
55+
run: |
5156
modified=$(git status -s | wc -l)
57+
black archivist examples unittests functests
5258
if [ $modified -gt 0 ]
5359
then
5460
echo "there are $modified files that must be reformatted"
5561
exit 1
5662
fi
63+
shell: bash
64+
- name: unittests.sh
65+
run: |
5766
./scripts/unittests.sh
5867
shell: bash
5968
- name: Run type-hint checks

‎Dockerfile-builder‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ RUN python3 -m pip install --upgrade pip \
4141
ENV USER=builder
4242
ENV HOME=/home/${USER}
4343
ENV PATH=${HOME}/.local/bin:${PATH}
44-
ENV PYTHONPATH=${HOME}/archivist:${PYTHONPATH}
4544
RUN mkdir -p ${HOME}
4645
WORKDIR ${HOME}
4746

‎archivist/asset.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Asset data class
22
33
"""
4+
45
from contextlib import suppress
56

67

‎archivist/assets.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
2222
"""
2323

24-
2524
from copy import deepcopy
2625
from logging import getLogger
2726
from typing import TYPE_CHECKING, Any

‎archivist/compliance.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
2222
"""
2323

24-
2524
from logging import getLogger
2625
from typing import TYPE_CHECKING, Any
2726

‎archivist/compliance_policies.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
2626
"""
2727

28-
2928
from copy import deepcopy
3029
from logging import getLogger
3130
from typing import TYPE_CHECKING, Any, Union

‎archivist/compliance_policy_requests.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
"""
66

7-
87
from dataclasses import asdict, dataclass
98

109
from .compliance_policy_type import CompliancePolicyType

‎archivist/composite.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
2222
"""
2323

24-
2524
from logging import getLogger
2625
from typing import TYPE_CHECKING
2726

‎archivist/confirmer.py‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""assets confirmer interface
22
"""
33

4-
54
from copy import deepcopy
65
from logging import getLogger
76
from typing import TYPE_CHECKING, Any, Union, overload
@@ -54,23 +53,27 @@ def __on_giveup_confirmation(details: "Details"):
5453

5554

5655
@overload
57-
def _wait_for_confirmation(self: "_AssetsRestricted", identity: str) -> "Asset":
58-
... # pragma: no cover
56+
def _wait_for_confirmation(
57+
self: "_AssetsRestricted", identity: str
58+
) -> "Asset": ... # pragma: no cover
5959

6060

6161
@overload
62-
def _wait_for_confirmation(self: "_AssetsPublic", identity: str) -> "Asset":
63-
... # pragma: no cover
62+
def _wait_for_confirmation(
63+
self: "_AssetsPublic", identity: str
64+
) -> "Asset": ... # pragma: no cover
6465

6566

6667
@overload
67-
def _wait_for_confirmation(self: "_EventsRestricted", identity: str) -> "Event":
68-
... # pragma: no cover
68+
def _wait_for_confirmation(
69+
self: "_EventsRestricted", identity: str
70+
) -> "Event": ... # pragma: no cover
6971

7072

7173
@overload
72-
def _wait_for_confirmation(self: "_EventsPublic", identity: str) -> "Event":
73-
... # pragma: no cover
74+
def _wait_for_confirmation(
75+
self: "_EventsPublic", identity: str
76+
) -> "Event": ... # pragma: no cover
7477

7578

7679
@backoff.on_predicate(

‎archivist/dictmerge.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Archivist dict deep merge
22
"""
33

4-
54
from copy import deepcopy
65
from typing import Any
76

0 commit comments

Comments
 (0)