Skip to content

Commit d083d3f

Browse files
committed
enhancement #45: remove setup.cfg
1 parent e66ab45 commit d083d3f

File tree

5 files changed

+70
-70
lines changed

5 files changed

+70
-70
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2024 Pollen Robotics
189+
Copyright 2025 Pollen Robotics
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

pyproject.toml

+47-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,54 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools>=61"]
33
build-backend = "setuptools.build_meta"
44

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+
550
[tool.isort]
651
profile = "black"
752

853
[tool.black]
9-
line-length = 128
54+
line-length = 128

setup.cfg

-59
This file was deleted.

src/config_files/CONFIG_IMX296.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
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+
}

src/example/cam_config.py

+14
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import json
9+
import logging
910
from importlib.resources import files
1011
from typing import Any, List
1112

@@ -78,3 +79,16 @@ def get_config_file_path(name: str) -> Any:
7879
if file.stem == name:
7980
return file.resolve()
8081
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())

0 commit comments

Comments
 (0)