Skip to content

Commit

Permalink
Upgrade Python requirements
Browse files Browse the repository at this point in the history
This fixes a build error in the CI caused by an incompatibility between
scikit-build and setuptools versions.

Formatting has changed for datamodels after this upgrade. Hence, the
datamodels are update also in this commit.
  • Loading branch information
johningve committed Sep 9, 2024
1 parent 4e8aacc commit 9781a86
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 173 deletions.
30 changes: 20 additions & 10 deletions continuous-integration/python-requirements/build.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile continuous-integration/python-requirements/build.in
# pip-compile --config=pyproject.toml continuous-integration/python-requirements/build.in
#
certifi==2024.6.2
certifi==2024.8.30
# via requests
charset-normalizer==3.3.2
# via requests
cmake==3.29.6
cmake==3.30.3
# via -r continuous-integration/python-requirements/build.in
colorama==0.4.6
# via conan
conan==2.4.1
conan==2.7.0
# via -r continuous-integration/python-requirements/build.in
distro==1.8.0
distro==1.9.0
# via scikit-build
fasteners==0.19
# via conan
idna==3.7
idna==3.8
# via requests
importlib-metadata==6.7.0
# via cmake
jinja2==3.1.4
# via conan
markupsafe==2.1.5
Expand All @@ -30,7 +32,7 @@ packaging==24.0
# via
# -r continuous-integration/python-requirements/build.in
# scikit-build
patch-ng==1.17.4
patch-ng==1.18.0
# via conan
python-dateutil==2.9.0.post0
# via conan
Expand All @@ -40,11 +42,17 @@ requests==2.31.0
# via
# -r continuous-integration/python-requirements/build.in
# conan
scikit-build==0.18.0
scikit-build==0.18.1
# via -r continuous-integration/python-requirements/build.in
six==1.16.0
# via python-dateutil
urllib3==1.26.19
tomli==2.0.1
# via scikit-build
typing-extensions==4.7.1
# via
# importlib-metadata
# scikit-build
urllib3==1.26.20
# via
# -r continuous-integration/python-requirements/build.in
# conan
Expand All @@ -53,6 +61,8 @@ wheel==0.42.0
# via
# -r continuous-integration/python-requirements/build.in
# scikit-build
zipp==3.15.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
82 changes: 59 additions & 23 deletions continuous-integration/python-requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,80 +1,116 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile continuous-integration/python-requirements/lint.in
# pip-compile --config=pyproject.toml continuous-integration/python-requirements/lint.in
#
astroid==3.2.2
astroid==2.11.7
# via pylint
black==24.4.2
black==23.3.0
# via -r continuous-integration/python-requirements/lint.in
certifi==2024.6.2
certifi==2024.8.30
# via requests
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via black
colorama==0.4.6
# via
# click
# pylint
# pytest
darglint==1.8.1
# via -r continuous-integration/python-requirements/lint.in
dill==0.3.8
dill==0.3.7
# via pylint
distro==1.9.0
# via scikit-build
flake8==7.1.0
exceptiongroup==1.2.2
# via pytest
flake8==5.0.4
# via
# -r continuous-integration/python-requirements/lint.in
# flake8-docstrings
flake8-docstrings==1.7.0
# via -r continuous-integration/python-requirements/lint.in
idna==3.7
idna==3.8
# via requests
importlib-metadata==4.2.0
# via
# click
# flake8
# pluggy
# pydocstyle
# pytest
inflection==0.5.1
# via -r continuous-integration/python-requirements/lint.in
iniconfig==2.0.0
# via pytest
isort==5.13.2
isort==5.11.5
# via pylint
lazy-object-proxy==1.9.0
# via astroid
mccabe==0.7.0
# via
# flake8
# pylint
mypy-extensions==1.0.0
# via black
packaging==24.1
packaging==24.0
# via
# black
# pytest
# scikit-build
pathspec==0.12.1
pathspec==0.11.2
# via black
platformdirs==4.2.2
platformdirs==4.0.0
# via
# black
# pylint
pluggy==1.5.0
pluggy==1.2.0
# via pytest
pycodestyle==2.12.0
pycodestyle==2.9.1
# via flake8
pydocstyle==6.3.0
# via flake8-docstrings
pyflakes==3.2.0
pyflakes==2.5.0
# via flake8
pylint==3.2.4
pylint==2.13.9
# via -r continuous-integration/python-requirements/lint.in
pytest==8.2.2
pytest==7.4.4
# via -r continuous-integration/python-requirements/lint.in
requests==2.32.3
requests==2.31.0
# via -r continuous-integration/python-requirements/lint.in
scikit-build==0.18.0
scikit-build==0.18.1
# via -r continuous-integration/python-requirements/lint.in
snowballstemmer==2.2.0
# via pydocstyle
tomlkit==0.12.5
# via pylint
urllib3==2.2.2
tomli==2.0.1
# via
# black
# pylint
# pytest
# scikit-build
typed-ast==1.5.5
# via
# astroid
# black
typing-extensions==4.7.1
# via
# astroid
# black
# importlib-metadata
# platformdirs
# pylint
# scikit-build
urllib3==2.0.7
# via requests
wheel==0.43.0
wheel==0.42.0
# via scikit-build
wrapt==1.16.0
# via astroid
zipp==3.15.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
8 changes: 4 additions & 4 deletions continuous-integration/python-requirements/setup.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile continuous-integration/python-requirements/setup.in
# pip-compile --config=pyproject.toml continuous-integration/python-requirements/setup.in
#
certifi==2024.6.2
certifi==2024.8.30
# via requests
charset-normalizer==3.3.2
# via requests
idna==3.7
idna==3.8
# via requests
requests==2.31.0
# via -r continuous-integration/python-requirements/setup.in
Expand Down
23 changes: 18 additions & 5 deletions continuous-integration/python-requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile continuous-integration/python-requirements/test.in
# pip-compile --config=pyproject.toml continuous-integration/python-requirements/test.in
#
certifi==2024.6.2
certifi==2024.8.30
# via requests
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via pytest
idna==3.7
exceptiongroup==1.2.2
# via pytest
idna==3.8
# via requests
importlib-metadata==6.7.0
# via
# pluggy
# pytest
# pytest-randomly
iniconfig==2.0.0
# via pytest
packaging==24.0
Expand All @@ -30,13 +37,19 @@ pytest==7.4.4
# pytest-timeout
pytest-helpers-namespace==2021.12.29
# via -r continuous-integration/python-requirements/test.in
pytest-randomly==3.12.0
pytest-randomly==3.12
# via -r continuous-integration/python-requirements/test.in
pytest-timeout==2.3.1
# via -r continuous-integration/python-requirements/test.in
requests==2.31.0
# via -r continuous-integration/python-requirements/test.in
tomli==2.0.1
# via pytest
typing-extensions==4.7.1
# via importlib-metadata
urllib3==2.0.7
# via
# -r continuous-integration/python-requirements/test.in
# requests
zipp==3.15.0
# via importlib-metadata
4 changes: 0 additions & 4 deletions modules/zivid/_suggest_settings_parameters.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
"""Auto generated, do not edit."""

# pylint: disable=too-many-lines,protected-access,too-few-public-methods,too-many-arguments,line-too-long,missing-function-docstring,missing-class-docstring,redefined-builtin,too-many-branches,too-many-boolean-expressions
import datetime
import _zivid


class SuggestSettingsParameters:

class AmbientLightFrequency:

hz50 = "hz50"
hz60 = "hz60"
none = "none"
Expand All @@ -28,7 +25,6 @@ def __init__(
ambient_light_frequency=_zivid.capture_assistant.SuggestSettingsParameters.AmbientLightFrequency().value,
max_capture_time=_zivid.capture_assistant.SuggestSettingsParameters.MaxCaptureTime().value,
):

if isinstance(
ambient_light_frequency,
_zivid.capture_assistant.SuggestSettingsParameters.AmbientLightFrequency.enum,
Expand Down
8 changes: 0 additions & 8 deletions modules/zivid/camera_info.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
"""Auto generated, do not edit."""

# pylint: disable=too-many-lines,protected-access,too-few-public-methods,too-many-arguments,line-too-long,missing-function-docstring,missing-class-docstring,redefined-builtin,too-many-branches,too-many-boolean-expressions
import _zivid


class CameraInfo:

class Revision:

def __init__(
self,
major=_zivid.CameraInfo.Revision.Major().value,
minor=_zivid.CameraInfo.Revision.Minor().value,
):

if isinstance(major, (int,)):
self._major = _zivid.CameraInfo.Revision.Major(major)
else:
Expand Down Expand Up @@ -71,12 +67,10 @@ def __str__(self):
return str(_to_internal_camera_info_revision(self))

class UserData:

def __init__(
self,
max_size_bytes=_zivid.CameraInfo.UserData.MaxSizeBytes().value,
):

if isinstance(max_size_bytes, (int,)):
self._max_size_bytes = _zivid.CameraInfo.UserData.MaxSizeBytes(
max_size_bytes
Expand Down Expand Up @@ -112,7 +106,6 @@ def __str__(self):
return str(_to_internal_camera_info_user_data(self))

class Model:

zivid2PlusL110 = "zivid2PlusL110"
zivid2PlusM130 = "zivid2PlusM130"
zivid2PlusM60 = "zivid2PlusM60"
Expand Down Expand Up @@ -147,7 +140,6 @@ def __init__(
revision=None,
user_data=None,
):

if isinstance(firmware_version, (str,)):
self._firmware_version = _zivid.CameraInfo.FirmwareVersion(firmware_version)
else:
Expand Down
7 changes: 0 additions & 7 deletions modules/zivid/camera_intrinsics.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
"""Auto generated, do not edit."""

# pylint: disable=too-many-lines,protected-access,too-few-public-methods,too-many-arguments,line-too-long,missing-function-docstring,missing-class-docstring,redefined-builtin,too-many-branches,too-many-boolean-expressions
import _zivid


class CameraIntrinsics:

class CameraMatrix:

def __init__(
self,
cx=_zivid.CameraIntrinsics.CameraMatrix.CX().value,
cy=_zivid.CameraIntrinsics.CameraMatrix.CY().value,
fx=_zivid.CameraIntrinsics.CameraMatrix.FX().value,
fy=_zivid.CameraIntrinsics.CameraMatrix.FY().value,
):

if isinstance(
cx,
(
Expand Down Expand Up @@ -174,7 +170,6 @@ def __str__(self):
return str(_to_internal_camera_intrinsics_camera_matrix(self))

class Distortion:

def __init__(
self,
k1=_zivid.CameraIntrinsics.Distortion.K1().value,
Expand All @@ -183,7 +178,6 @@ def __init__(
p1=_zivid.CameraIntrinsics.Distortion.P1().value,
p2=_zivid.CameraIntrinsics.Distortion.P2().value,
):

if isinstance(
k1,
(
Expand Down Expand Up @@ -383,7 +377,6 @@ def __init__(
camera_matrix=None,
distortion=None,
):

if camera_matrix is None:
camera_matrix = self.CameraMatrix()
if not isinstance(camera_matrix, self.CameraMatrix):
Expand Down
Loading

0 comments on commit 9781a86

Please sign in to comment.