sr-robot3 2025.0.1__tar.gz → 2026.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/.github/workflows/test_build.yml +7 -7
  2. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/PKG-INFO +7 -7
  3. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/pyproject.toml +5 -5
  4. sr_robot3-2026.0.1/sr/robot3/_version.py +34 -0
  5. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/serial_wrapper.py +8 -4
  6. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/simulator/camera.py +3 -0
  7. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr_robot3.egg-info/PKG-INFO +7 -7
  8. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr_robot3.egg-info/requires.txt +3 -8
  9. sr_robot3-2025.0.1/sr/robot3/_version.py +0 -16
  10. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/.flake8 +0 -0
  11. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/.github/dependabot.yml +0 -0
  12. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/.gitignore +0 -0
  13. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/LICENSE +0 -0
  14. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/Makefile +0 -0
  15. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/README.md +0 -0
  16. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/setup.cfg +0 -0
  17. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/__init__.py +0 -0
  18. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/__init__.py +0 -0
  19. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/arduino.py +0 -0
  20. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/astoria.py +0 -0
  21. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/calibrations/__init__.py +0 -0
  22. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/camera.py +0 -0
  23. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/exceptions.py +0 -0
  24. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/game_specific.py +0 -0
  25. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/kch.py +0 -0
  26. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/logging.py +0 -0
  27. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/marker.py +0 -0
  28. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/motor_board.py +0 -0
  29. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/mqtt.py +0 -0
  30. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/power_board.py +0 -0
  31. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/py.typed +0 -0
  32. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/raw_serial.py +0 -0
  33. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/robot.py +0 -0
  34. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/servo_board.py +0 -0
  35. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/simulator/__init__.py +0 -0
  36. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/simulator/time_server.py +0 -0
  37. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/timeout.py +0 -0
  38. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr/robot3/utils.py +0 -0
  39. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr_robot3.egg-info/SOURCES.txt +0 -0
  40. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr_robot3.egg-info/dependency_links.txt +0 -0
  41. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/sr_robot3.egg-info/top_level.txt +0 -0
  42. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/stubs/RPi/GPIO.pyi +0 -0
  43. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/stubs/RPi/__init__.pyi +0 -0
  44. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/__init__.py +0 -0
  45. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/conftest.py +0 -0
  46. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_arduino.py +0 -0
  47. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/bad/metadata.json +0 -0
  48. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/empty/.gitkeep +0 -0
  49. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/marker_detections.json +0 -0
  50. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/marker_locations.csv +0 -0
  51. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/missing_key/metadata.json +0 -0
  52. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/nested/valid/metadata.json +0 -0
  53. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/not_object/metadata.json +0 -0
  54. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts/catch-base-exception.py +0 -0
  55. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts/catch-exception.py +0 -0
  56. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts/hot-loop.py +0 -0
  57. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts/sleep.py +0 -0
  58. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts/try-finally.py +0 -0
  59. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts_extra/early-exit.py +0 -0
  60. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/timeout_scripts_extra/exception.py +0 -0
  61. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_data/valid/metadata.json +0 -0
  62. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_logging.py +0 -0
  63. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_markers.py +0 -0
  64. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_motor_board.py +0 -0
  65. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_power_board.py +0 -0
  66. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_raw_serial.py +0 -0
  67. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_serial_wrapper.py +0 -0
  68. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_servo_board.py +0 -0
  69. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_sr_robot.py +0 -0
  70. {sr_robot3-2025.0.1 → sr_robot3-2026.0.1}/tests/test_timeout.py +0 -0
@@ -10,16 +10,16 @@ jobs:
10
10
  fail-fast: false
11
11
  matrix:
12
12
  os: [ubuntu-latest]
13
- py_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
13
+ py_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
14
14
  include:
15
15
  - os: windows-latest
16
- py_version: "3.8"
16
+ py_version: "3.9"
17
17
  - os: windows-latest
18
- py_version: "3.12"
18
+ py_version: "3.13"
19
19
  - os: macos-latest
20
- py_version: "3.8"
20
+ py_version: "3.9"
21
21
  - os: macos-latest
22
- py_version: "3.12"
22
+ py_version: "3.13"
23
23
  runs-on: ${{ matrix.os }}
24
24
  steps:
25
25
  - uses: actions/checkout@v4
@@ -55,10 +55,10 @@ jobs:
55
55
  - uses: actions/checkout@v4
56
56
  with:
57
57
  fetch-depth: 0
58
- - name: Set up Python 3.8
58
+ - name: Set up Python 3.10
59
59
  uses: actions/setup-python@v5
60
60
  with:
61
- python-version: "3.8"
61
+ python-version: "3.10"
62
62
  - name: Install dependencies
63
63
  run: |
64
64
  python -m pip install --upgrade pip build
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sr-robot3
3
- Version: 2025.0.1
3
+ Version: 2026.0.1
4
4
  Summary: Student Robotics API for Python 3
5
5
  Author-email: Student Robotics <kit-team@studentrobotics.org>
6
6
  License: MIT License
@@ -34,11 +34,11 @@ Classifier: Operating System :: OS Independent
34
34
  Classifier: Development Status :: 5 - Production/Stable
35
35
  Classifier: Typing :: Typed
36
36
  Classifier: Topic :: Education
37
- Requires-Python: >=3.8
37
+ Requires-Python: >=3.9
38
38
  Description-Content-Type: text/markdown
39
39
  License-File: LICENSE
40
40
  Requires-Dist: pyserial<4,>=3
41
- Requires-Dist: april_vision==2.2.0
41
+ Requires-Dist: april_vision==3.0.0
42
42
  Requires-Dist: paho-mqtt<3,>=2
43
43
  Requires-Dist: pydantic<2,>=1.9.1
44
44
  Requires-Dist: typing-extensions; python_version < "3.10"
@@ -46,15 +46,15 @@ Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
46
46
  Provides-Extra: dev
47
47
  Requires-Dist: flake8; extra == "dev"
48
48
  Requires-Dist: isort; extra == "dev"
49
- Requires-Dist: mypy==1.10.0; python_version < "3.9" and extra == "dev"
50
- Requires-Dist: mypy<2,>=1.7; python_version >= "3.9" and extra == "dev"
49
+ Requires-Dist: mypy<2,>=1.7; extra == "dev"
51
50
  Requires-Dist: build; extra == "dev"
52
51
  Requires-Dist: types-pyserial; extra == "dev"
53
52
  Requires-Dist: pytest; extra == "dev"
54
53
  Requires-Dist: pytest-cov; extra == "dev"
55
54
  Requires-Dist: paho-mqtt<3,>=2; extra == "dev"
56
55
  Provides-Extra: vision
57
- Requires-Dist: opencv-python-headless<5,>=4; extra == "vision"
56
+ Requires-Dist: opencv-python-headless<5,>=4.10; extra == "vision"
57
+ Dynamic: license-file
58
58
 
59
59
  # sr-robot3
60
60
 
@@ -23,6 +23,7 @@ check_untyped_defs = true
23
23
  atomic = true
24
24
  balanced_wrapping = true
25
25
  known_first_party = "sr.robot3"
26
+ skip_gitignore = true
26
27
 
27
28
  # hanging grid grouped indent style wrapping
28
29
  multi_line_output = 5
@@ -50,10 +51,10 @@ authors = [{name = "Student Robotics", email = "kit-team@studentrobotics.org"}]
50
51
  readme = "README.md"
51
52
  license = {file = "LICENSE"}
52
53
  dynamic = ["version"]
53
- requires-python = ">=3.8"
54
+ requires-python = ">=3.9"
54
55
  dependencies = [
55
56
  "pyserial >=3,<4",
56
- "april_vision==2.2.0",
57
+ "april_vision==3.0.0",
57
58
  "paho-mqtt >=2,<3",
58
59
  "pydantic >=1.9.1,<2",
59
60
  "typing-extensions; python_version<'3.10'",
@@ -76,12 +77,11 @@ Documentation = "https://docs.studentrobotics.org"
76
77
  dev = [
77
78
  "flake8",
78
79
  "isort",
79
- "mypy==1.10.0; python_version<'3.9'",
80
- "mypy>=1.7,<2; python_version>='3.9'",
80
+ "mypy>=1.7,<2",
81
81
  "build",
82
82
  "types-pyserial",
83
83
  "pytest",
84
84
  "pytest-cov",
85
85
  "paho-mqtt >=2,<3"
86
86
  ]
87
- vision = ["opencv-python-headless >=4,<5"]
87
+ vision = ["opencv-python-headless >=4.10,<5"]
@@ -0,0 +1,34 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
13
+ TYPE_CHECKING = False
14
+ if TYPE_CHECKING:
15
+ from typing import Tuple
16
+ from typing import Union
17
+
18
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
20
+ else:
21
+ VERSION_TUPLE = object
22
+ COMMIT_ID = object
23
+
24
+ version: str
25
+ __version__: str
26
+ __version_tuple__: VERSION_TUPLE
27
+ version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '2026.0.1'
32
+ __version_tuple__ = version_tuple = (2026, 0, 1)
33
+
34
+ __commit_id__ = commit_id = 'g21d493108'
@@ -6,6 +6,7 @@ and for handling port timeouts and disconnections.
6
6
  """
7
7
  from __future__ import annotations
8
8
 
9
+ import atexit
9
10
  import logging
10
11
  import sys
11
12
  import threading
@@ -106,6 +107,8 @@ class SerialWrapper:
106
107
  do_not_open=True,
107
108
  )
108
109
 
110
+ atexit.register(self._disconnect, quiet=True)
111
+
109
112
  def start(self) -> None:
110
113
  """
111
114
  Helper method to open the serial port.
@@ -230,7 +233,7 @@ class SerialWrapper:
230
233
  )
231
234
  return True
232
235
 
233
- def _disconnect(self) -> None:
236
+ def _disconnect(self, quiet: bool = False) -> None:
234
237
  """
235
238
  Close the class's serial port.
236
239
 
@@ -238,9 +241,10 @@ class SerialWrapper:
238
241
  The serial port will be reopened on the next message.
239
242
  """
240
243
  self.serial.close()
241
- logger.warning(
242
- f'Board {self.identity.board_type}:{self.identity.asset_tag} disconnected'
243
- )
244
+ if not quiet:
245
+ logger.warning(
246
+ f'Board {self.identity.board_type}:{self.identity.asset_tag} disconnected'
247
+ )
244
248
 
245
249
  def set_identity(self, identity: BoardIdentity) -> None:
246
250
  """
@@ -1,3 +1,4 @@
1
+ import atexit
1
2
  import struct
2
3
 
3
4
  import cv2
@@ -39,6 +40,8 @@ class WebotsRemoteCameraSource(FrameSource):
39
40
  self.image_size = tuple(map(int, response.split(b":")))
40
41
  assert len(self.image_size) == 2, f"Invalid image dimensions: {self.image_size}"
41
42
 
43
+ atexit.register(self.close)
44
+
42
45
  def read(self, fresh: bool = True) -> NDArray:
43
46
  """
44
47
  The method for getting a new frame.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sr-robot3
3
- Version: 2025.0.1
3
+ Version: 2026.0.1
4
4
  Summary: Student Robotics API for Python 3
5
5
  Author-email: Student Robotics <kit-team@studentrobotics.org>
6
6
  License: MIT License
@@ -34,11 +34,11 @@ Classifier: Operating System :: OS Independent
34
34
  Classifier: Development Status :: 5 - Production/Stable
35
35
  Classifier: Typing :: Typed
36
36
  Classifier: Topic :: Education
37
- Requires-Python: >=3.8
37
+ Requires-Python: >=3.9
38
38
  Description-Content-Type: text/markdown
39
39
  License-File: LICENSE
40
40
  Requires-Dist: pyserial<4,>=3
41
- Requires-Dist: april_vision==2.2.0
41
+ Requires-Dist: april_vision==3.0.0
42
42
  Requires-Dist: paho-mqtt<3,>=2
43
43
  Requires-Dist: pydantic<2,>=1.9.1
44
44
  Requires-Dist: typing-extensions; python_version < "3.10"
@@ -46,15 +46,15 @@ Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
46
46
  Provides-Extra: dev
47
47
  Requires-Dist: flake8; extra == "dev"
48
48
  Requires-Dist: isort; extra == "dev"
49
- Requires-Dist: mypy==1.10.0; python_version < "3.9" and extra == "dev"
50
- Requires-Dist: mypy<2,>=1.7; python_version >= "3.9" and extra == "dev"
49
+ Requires-Dist: mypy<2,>=1.7; extra == "dev"
51
50
  Requires-Dist: build; extra == "dev"
52
51
  Requires-Dist: types-pyserial; extra == "dev"
53
52
  Requires-Dist: pytest; extra == "dev"
54
53
  Requires-Dist: pytest-cov; extra == "dev"
55
54
  Requires-Dist: paho-mqtt<3,>=2; extra == "dev"
56
55
  Provides-Extra: vision
57
- Requires-Dist: opencv-python-headless<5,>=4; extra == "vision"
56
+ Requires-Dist: opencv-python-headless<5,>=4.10; extra == "vision"
57
+ Dynamic: license-file
58
58
 
59
59
  # sr-robot3
60
60
 
@@ -1,5 +1,5 @@
1
1
  pyserial<4,>=3
2
- april_vision==2.2.0
2
+ april_vision==3.0.0
3
3
  paho-mqtt<3,>=2
4
4
  pydantic<2,>=1.9.1
5
5
 
@@ -12,17 +12,12 @@ tomli<3,>=2.0.1
12
12
  [dev]
13
13
  flake8
14
14
  isort
15
+ mypy<2,>=1.7
15
16
  build
16
17
  types-pyserial
17
18
  pytest
18
19
  pytest-cov
19
20
  paho-mqtt<3,>=2
20
21
 
21
- [dev:python_version < "3.9"]
22
- mypy==1.10.0
23
-
24
- [dev:python_version >= "3.9"]
25
- mypy<2,>=1.7
26
-
27
22
  [vision]
28
- opencv-python-headless<5,>=4
23
+ opencv-python-headless<5,>=4.10
@@ -1,16 +0,0 @@
1
- # file generated by setuptools_scm
2
- # don't change, don't track in version control
3
- TYPE_CHECKING = False
4
- if TYPE_CHECKING:
5
- from typing import Tuple, Union
6
- VERSION_TUPLE = Tuple[Union[int, str], ...]
7
- else:
8
- VERSION_TUPLE = object
9
-
10
- version: str
11
- __version__: str
12
- __version_tuple__: VERSION_TUPLE
13
- version_tuple: VERSION_TUPLE
14
-
15
- __version__ = version = '2025.0.1'
16
- __version_tuple__ = version_tuple = (2025, 0, 1)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes