File tree 5 files changed +70
-70
lines changed
5 files changed +70
-70
lines changed Original file line number Diff line number Diff line change 186
186
same "printed page" as the copyright notice for easier
187
187
identification within third-party archives.
188
188
189
- Copyright 2024 Pollen Robotics
189
+ Copyright 2025 Pollen Robotics
190
190
191
191
Licensed under the Apache License, Version 2.0 (the "License");
192
192
you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change 1
1
[build-system ]
2
- requires = [" setuptools" ]
2
+ requires = [" setuptools>=61 " ]
3
3
build-backend = " setuptools.build_meta"
4
4
5
+ [project ]
6
+ name = " example"
7
+ version = " 0.1.0"
8
+ authors = [{
name =
" Pollen Robotics" ,
email =
" [email protected] " }]
9
+ description = " Python template project"
10
+ readme = " README.md"
11
+ requires-python = " >=3.10"
12
+ dependencies = [" numpy==1.25.1" ]
13
+
14
+ [project .optional-dependencies ]
15
+ dev = [
16
+ " black==25.1.0" ,
17
+ " flake8==7.2.0" ,
18
+ " Flake8-pyproject==1.2.3" ,
19
+ " pytest==8.3.5" ,
20
+ " coverage==7.8.0" ,
21
+ " mypy==1.15.0" ,
22
+ " isort==6.0.1" ,
23
+ " pdoc==15.0.1" ,
24
+ " pydocstyle==6.3.0" ,
25
+ ]
26
+
27
+ [project .scripts ]
28
+ example_entry_point = " example.celcius:main"
29
+ camera_entry_point = " example.cam_config:main"
30
+
31
+ [tool .flake8 ]
32
+ exclude = [" tests" ]
33
+ max-line-length = 128
34
+ extend-ignore = [" E203" ]
35
+ max-complexity = 10
36
+
37
+ [tool .coverage .run ]
38
+ branch = true
39
+
40
+ [tool .coverage .report ]
41
+ show_missing = true
42
+
43
+ [tool .mypy ]
44
+ ignore_missing_imports = true
45
+ exclude = [" tests" ]
46
+ strict = true
47
+ plugins = [" numpy.typing.mypy_plugin" ]
48
+ explicit_package_bases = true
49
+
5
50
[tool .isort ]
6
51
profile = " black"
7
52
8
53
[tool .black ]
9
- line-length = 128
54
+ line-length = 128
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
- "socket_to_name" : {
3
- "CAM_B" : " right" ,
4
- "CAM_C" : " left"
5
- },
6
- "inverted" : false ,
7
- "fisheye" : true ,
8
- "mono" : false
9
- }
2
+ "socket_to_name" : {
3
+ "CAM_B" : " right" ,
4
+ "CAM_C" : " left"
5
+ },
6
+ "inverted" : false ,
7
+ "fisheye" : true ,
8
+ "mono" : false
9
+ }
Original file line number Diff line number Diff line change 6
6
"""
7
7
8
8
import json
9
+ import logging
9
10
from importlib .resources import files
10
11
from typing import Any , List
11
12
@@ -78,3 +79,16 @@ def get_config_file_path(name: str) -> Any:
78
79
if file .stem == name :
79
80
return file .resolve ()
80
81
return None
82
+
83
+
84
+ def main () -> None :
85
+ """The main function that demonstrates the usage of the CamConfig class.
86
+
87
+ This function creates an instance of the CamConfig class, reads the camera configuration
88
+ data from a JSON file, and prints the configuration details. It also activates logging at
89
+ the INFO level.
90
+ """
91
+ logging .basicConfig (level = logging .INFO )
92
+
93
+ cam_conf = CamConfig (get_config_file_path ("CONFIG_IMX296" ))
94
+ logging .info (cam_conf .to_string ())
You can’t perform that action at this time.
0 commit comments