Skip to content

Commit

Permalink
Add Ubuntu 24.04 to CI test matrix
Browse files Browse the repository at this point in the history
Bump pylint and flake8 for Python 3.12 compatibility and fix some lint
issues.
  • Loading branch information
johningve committed Jun 28, 2024
1 parent 93667fd commit bd404aa
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
--volume $PWD:/host \
--workdir /host/continuous-integration/linux \
--env "PYTHONDONTWRITEBYTECODE=1" \
ubuntu:23.10 \
ubuntu:24.04 \
bash -c "./setup.sh && ./install-sdk.sh && ./build.sh && ./lint.sh"
- name: Notify Teams
if: ${{ failure() && github.ref == 'refs/heads/master' }}
Expand Down Expand Up @@ -104,6 +104,7 @@ jobs:
- ubuntu:22.04
- ubuntu:23.04
- ubuntu:23.10
- ubuntu:24.04
- fedora:37
- fedora:38
steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Please visit [Zivid Knowledge Base][zivid-knowledge-base-url] for general inform

| Operating System | Python version |
|:-----------------|:--------------------------------|
| Ubuntu 24.04 | 3.12 |
| Ubuntu 23.10 | 3.11 |
| Ubuntu 23.04 | 3.11 |
| Ubuntu 22.04 | 3.10 |
Expand Down
4 changes: 2 additions & 2 deletions continuous-integration/python-requirements/lint.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
black
darglint
flake8
flake8>=6.1.0 # 6.1.0 contains bugfix for Python 3.12
flake8-docstrings
pylint
pylint>=3.0.0 # 3.0.0 is the first version to support Python 3.12
scikit-build
inflection
pytest
Expand Down
30 changes: 8 additions & 22 deletions continuous-integration/python-requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile continuous-integration/python-requirements/lint.in
#
astroid==2.15.4
astroid==3.2.2
# via pylint
black==23.3.0
# via -r continuous-integration/python-requirements/lint.in
Expand All @@ -16,13 +16,11 @@ click==8.1.3
# via black
darglint==1.8.1
# via -r continuous-integration/python-requirements/lint.in
dill==0.3.6
dill==0.3.8
# via pylint
distro==1.8.0
# via scikit-build
exceptiongroup==1.1.1
# via pytest
flake8==6.0.0
flake8==7.1.0
# via
# -r continuous-integration/python-requirements/lint.in
# flake8-docstrings
Expand All @@ -36,8 +34,6 @@ iniconfig==2.0.0
# via pytest
isort==5.12.0
# via pylint
lazy-object-proxy==1.9.0
# via astroid
mccabe==0.7.0
# via
# flake8
Expand All @@ -57,13 +53,13 @@ platformdirs==3.5.0
# pylint
pluggy==1.0.0
# via pytest
pycodestyle==2.10.0
pycodestyle==2.12.0
# via flake8
pydocstyle==6.3.0
# via flake8-docstrings
pyflakes==3.0.1
pyflakes==3.2.0
# via flake8
pylint==2.17.4
pylint==3.2.4
# via -r continuous-integration/python-requirements/lint.in
pytest==7.3.1
# via -r continuous-integration/python-requirements/lint.in
Expand All @@ -73,22 +69,12 @@ scikit-build==0.17.3
# via -r continuous-integration/python-requirements/lint.in
snowballstemmer==2.2.0
# via pydocstyle
tomli==2.0.1
# via
# black
# pylint
# pytest
# scikit-build
tomlkit==0.11.8
# via pylint
typing-extensions==4.5.0
# via astroid
urllib3==2.0.2
# via requests
wheel==0.40.0
# via scikit-build
wrapt==1.15.0
# via astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools
4 changes: 2 additions & 2 deletions samples/sample_capture_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def _main():
_capture_async(cameras)
end = time.monotonic()
print(
f"Time taken to capture asynchronously from {len(cameras)} camera(s): {end-start} seconds"
f"Time taken to capture asynchronously from {len(cameras)} camera(s): {end - start} seconds"
)

start = time.monotonic()
_capture_sync(cameras)
end = time.monotonic()
print(
f"Time taken to capture synchronously from {len(cameras)} camera(s): {end-start} seconds"
f"Time taken to capture synchronously from {len(cameras)} camera(s): {end - start} seconds"
)

for camera in cameras:
Expand Down
2 changes: 1 addition & 1 deletion samples/sample_infield_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _main():
)
camera_verification = verify_camera(infield_input)
print(
f"Local dimension trueness: {camera_verification.local_dimension_trueness()*100:.3f}%"
f"Local dimension trueness: {camera_verification.local_dimension_trueness() * 100:.3f}%"
)


Expand Down

0 comments on commit bd404aa

Please sign in to comment.