refactor: collapse Config proxy, migrate tracker to SQLite, split reconcile module
- Config: remove _ConfigAccessor and ConfigManager; use __getattr__ for lazy loading on single _Config class; re-register self as _instance in __getattr__ so reset() always clears the correct object (item 1) - upload_tracker: replace hand-rolled JSON store with sqlite3; auto-migrates existing JSON on first run; remove dead record_frigate_file function; connection re-opens when CACHE_DIR changes for test isolation (items 2, 8) - diversity: move ThreadPoolExecutor import to module level; inject optional fetch_fn parameter for testability (items 3, 6) - pyproject: consolidate 4 variant files into extras (gpu/rocm/intel/cpu); update Dockerfile to use --extra flag; delete variant pyproject/lock files; uv.lock needs regen with `uv lock` after this change (item 4) - jobs: extract _build_job helper to separate business logic from terminal I/O; auto_configure delegates dedup/selection to _build_job (item 5) - logging: convert f-string log calls to % interpolation throughout all winnow/ modules (item 7) - reconcile: new module with reconcile_frigate_mappings and enrich_asset_with_face_data extracted from executor.py (item 9) - scheduler: print next scheduled run time after startup and after each run; fix f-string logger.error call (item 10)
This commit is contained in:
+15
-8
@@ -17,11 +17,7 @@ classifiers = [
|
||||
dependencies = [
|
||||
"croniter>=5.0.2",
|
||||
"insightface>=0.7.3",
|
||||
"nvidia-cudnn-cu12>=9.0.0",
|
||||
"numpy>=2.2.6",
|
||||
"onnxruntime-gpu>=1.23.2; sys_platform == 'linux' and platform_machine == 'x86_64'",
|
||||
"onnxruntime>=1.23.2; sys_platform == 'linux' and platform_machine != 'x86_64'",
|
||||
"onnxruntime>=1.23.2; sys_platform != 'linux'",
|
||||
"opencv-python-headless>=4.12.0.88",
|
||||
"pillow>=12.1.0",
|
||||
"python-dotenv>=1.2.1",
|
||||
@@ -29,6 +25,12 @@ dependencies = [
|
||||
"rich>=14.2.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
gpu = ["onnxruntime-gpu>=1.23.2", "nvidia-cudnn-cu12>=9.0.0"]
|
||||
rocm = ["onnxruntime-rocm>=1.16.0"]
|
||||
intel = ["onnxruntime-openvino>=1.20.0"]
|
||||
cpu = ["onnxruntime>=1.23.2"]
|
||||
|
||||
[project.scripts]
|
||||
winnow = "winnow.cli:main"
|
||||
|
||||
@@ -38,10 +40,13 @@ Changelog = "https://github.com/sudolulo/winnow/blob/main/CHANGELOG.md"
|
||||
Documentation = "https://github.com/sudolulo/winnow/wiki"
|
||||
|
||||
[tool.uv]
|
||||
index-strategy = "unsafe-best-match"
|
||||
conflicts = [
|
||||
[
|
||||
{ package = "onnxruntime" },
|
||||
{ package = "onnxruntime-gpu" },
|
||||
{ extra = "gpu" },
|
||||
{ extra = "rocm" },
|
||||
{ extra = "intel" },
|
||||
{ extra = "cpu" },
|
||||
],
|
||||
]
|
||||
required-environments = [
|
||||
@@ -77,11 +82,14 @@ insightface = "insightface"
|
||||
numpy = "numpy"
|
||||
nvidia-cudnn-cu12 = "nvidia.cudnn"
|
||||
onnxruntime-gpu = "onnxruntime"
|
||||
onnxruntime-rocm = "onnxruntime"
|
||||
onnxruntime-openvino = "onnxruntime"
|
||||
onnxruntime = "onnxruntime"
|
||||
requests = "requests"
|
||||
rich = "rich"
|
||||
|
||||
[tool.deptry.per_rule_ignores]
|
||||
DEP002 = ["onnxruntime-gpu", "nvidia-cudnn-cu12"]
|
||||
DEP002 = ["onnxruntime-gpu", "nvidia-cudnn-cu12", "onnxruntime-rocm", "onnxruntime-openvino", "onnxruntime"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
@@ -89,4 +97,3 @@ testpaths = ["tests"]
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user