pumaguard 20.post161__py3-none-any.whl → 20.post165__py3-none-any.whl
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.
- pumaguard/model_downloader.py +27 -1
- pumaguard/presets.py +3 -0
- pumaguard/pumaguard-ui/flutter_bootstrap.js +1 -1
- pumaguard/pumaguard-ui/flutter_service_worker.js +1 -1
- pumaguard/server.py +14 -1
- {pumaguard-20.post161.dist-info → pumaguard-20.post165.dist-info}/METADATA +1 -1
- {pumaguard-20.post161.dist-info → pumaguard-20.post165.dist-info}/RECORD +11 -11
- {pumaguard-20.post161.dist-info → pumaguard-20.post165.dist-info}/WHEEL +0 -0
- {pumaguard-20.post161.dist-info → pumaguard-20.post165.dist-info}/entry_points.txt +0 -0
- {pumaguard-20.post161.dist-info → pumaguard-20.post165.dist-info}/licenses/LICENSE +0 -0
- {pumaguard-20.post161.dist-info → pumaguard-20.post165.dist-info}/top_level.txt +0 -0
pumaguard/model_downloader.py
CHANGED
|
@@ -114,7 +114,33 @@ def download_file(
|
|
|
114
114
|
try:
|
|
115
115
|
logger.info("Downloading %s to %s", url, destination)
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
# Respect custom CA bundle if provided via environment or system path
|
|
118
|
+
ca_bundle: Optional[str] = None
|
|
119
|
+
# Priority:
|
|
120
|
+
# 1. explicit PumaGuard var
|
|
121
|
+
# 2. then common envs
|
|
122
|
+
# 3. then system bundle
|
|
123
|
+
for var in (
|
|
124
|
+
"PUMAGUARD_CA_BUNDLE",
|
|
125
|
+
"REQUESTS_CA_BUNDLE",
|
|
126
|
+
"SSL_CERT_FILE",
|
|
127
|
+
):
|
|
128
|
+
val = os.environ.get(var)
|
|
129
|
+
if val and Path(val).exists():
|
|
130
|
+
ca_bundle = val
|
|
131
|
+
break
|
|
132
|
+
if ca_bundle is None:
|
|
133
|
+
# Debian/Ubuntu system bundle
|
|
134
|
+
sys_bundle = "/etc/ssl/certs/ca-certificates.crt"
|
|
135
|
+
if Path(sys_bundle).exists():
|
|
136
|
+
ca_bundle = sys_bundle
|
|
137
|
+
|
|
138
|
+
response = requests.get(
|
|
139
|
+
url,
|
|
140
|
+
stream=True,
|
|
141
|
+
timeout=60,
|
|
142
|
+
verify=ca_bundle if ca_bundle else True,
|
|
143
|
+
)
|
|
118
144
|
logger.debug("response: %s", response)
|
|
119
145
|
response.raise_for_status()
|
|
120
146
|
|
pumaguard/presets.py
CHANGED
|
@@ -153,6 +153,8 @@ class Preset:
|
|
|
153
153
|
self.intermediate_dir = str(
|
|
154
154
|
Path(self.classification_root_dir) / "intermediate"
|
|
155
155
|
)
|
|
156
|
+
# Default watch directory (incoming images)
|
|
157
|
+
self.default_watch_dir = str(data_root / "watch")
|
|
156
158
|
|
|
157
159
|
# Ensure directories exist
|
|
158
160
|
for d in [
|
|
@@ -160,6 +162,7 @@ class Preset:
|
|
|
160
162
|
self.classified_puma_dir,
|
|
161
163
|
self.classified_other_dir,
|
|
162
164
|
self.intermediate_dir,
|
|
165
|
+
self.default_watch_dir,
|
|
163
166
|
]:
|
|
164
167
|
try:
|
|
165
168
|
Path(d).mkdir(parents=True, exist_ok=True)
|
|
@@ -34,7 +34,7 @@ const RESOURCES = {"flutter.js": "24bc71911b75b5f8135c949e27a2984e",
|
|
|
34
34
|
"canvaskit/skwasm.js.symbols": "3a4aadf4e8141f284bd524976b1d6bdc",
|
|
35
35
|
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
|
|
36
36
|
"main.dart.wasm": "b7e85784e7cc42b937c6ddffca885d19",
|
|
37
|
-
"flutter_bootstrap.js": "
|
|
37
|
+
"flutter_bootstrap.js": "8af349f01d983096d891da7c60c86760",
|
|
38
38
|
"version.json": "d3ae24eea88b92d3d617cfcd1d6d057d",
|
|
39
39
|
"main.dart.js": "8d76816e4e65d2d9504d5fd4013ba7cf"};
|
|
40
40
|
// The application shell files that are downloaded before a service worker can
|
pumaguard/server.py
CHANGED
|
@@ -372,7 +372,20 @@ def main(options: argparse.Namespace, presets: Preset):
|
|
|
372
372
|
)
|
|
373
373
|
webui.start()
|
|
374
374
|
|
|
375
|
-
|
|
375
|
+
# Determine folders to watch: user-specified or default
|
|
376
|
+
if options.FOLDER and len(options.FOLDER) > 0:
|
|
377
|
+
folders_to_watch = list(options.FOLDER)
|
|
378
|
+
else:
|
|
379
|
+
folders_to_watch = [presets.default_watch_dir]
|
|
380
|
+
|
|
381
|
+
# Ensure default exists if used
|
|
382
|
+
for f in folders_to_watch:
|
|
383
|
+
try:
|
|
384
|
+
Path(f).mkdir(parents=True, exist_ok=True)
|
|
385
|
+
except OSError as exc: # pragma: no cover
|
|
386
|
+
logger.error("Could not create watch folder %s: %s", f, exc)
|
|
387
|
+
|
|
388
|
+
for folder in folders_to_watch:
|
|
376
389
|
manager.register_folder(folder, options.watch_method, start=False)
|
|
377
390
|
webui.add_image_directory(folder)
|
|
378
391
|
|
|
@@ -4,9 +4,9 @@ pumaguard/lock_manager.py,sha256=sYLl8Z7miOr_9R7ehoSFlKf8tToHNNUT6aH9Mlw2M9g,160
|
|
|
4
4
|
pumaguard/main.py,sha256=_dxt9P_SNIoFJA6HqU9KGeC9519c7CN4CA8_D-gPyEQ,6284
|
|
5
5
|
pumaguard/model-registry.yaml,sha256=V-pTaqJrk_jJo568okBDaVhs51qTHttSqKe6PqdX6Bc,10318
|
|
6
6
|
pumaguard/model_cli.py,sha256=nzDv0lXSvRKpLxs579tiHInJPPV-AFO4jzeLk5t2GaA,1394
|
|
7
|
-
pumaguard/model_downloader.py,sha256=
|
|
8
|
-
pumaguard/presets.py,sha256=
|
|
9
|
-
pumaguard/server.py,sha256=
|
|
7
|
+
pumaguard/model_downloader.py,sha256=zOIaXu_Bx_fWGTo5EH0JcERbgUMivJ-QHDfeXgFs064,12895
|
|
8
|
+
pumaguard/presets.py,sha256=Vf-SJPYk-tlMSnwjeilPZ7Cn-krYPkVEcReDHRCreew,25941
|
|
9
|
+
pumaguard/server.py,sha256=m7VSGqWM0n3DGDF7AbJw-iseCaTb-v7YYK14hDG-cnA,13655
|
|
10
10
|
pumaguard/sound.py,sha256=dBylHyuS8ro9tFJH5y3s6Bn2kSGnfrOyGeGYZlgYTsU,369
|
|
11
11
|
pumaguard/stats.py,sha256=ZwocfnFCQ-ky7me-YTTrEoJqsIHOWAgSzeoJHItsIU4,927
|
|
12
12
|
pumaguard/utils.py,sha256=w1EgOLSZGyjq_b49hvVZhBESy-lVP0yRtNHe-sXBoIU,19735
|
|
@@ -19,8 +19,8 @@ pumaguard/completions/pumaguard-train-completions.sh,sha256=lI8LG-QrncvhUqCeKtfr
|
|
|
19
19
|
pumaguard/pumaguard-ui/.last_build_id,sha256=2z9bkdHZlfzXSpHBHs18Lo4GUD8oTSkZDZxqAeZW6KE,32
|
|
20
20
|
pumaguard/pumaguard-ui/favicon.png,sha256=erJSX0uGtl0-THA1ihfloar29Df5nLzARtrXPVm7kBU,917
|
|
21
21
|
pumaguard/pumaguard-ui/flutter.js,sha256=7V1ZIKmGiouT15CpquQWWmKWJyjUq77FoU9gDXPFO9M,9412
|
|
22
|
-
pumaguard/pumaguard-ui/flutter_bootstrap.js,sha256=
|
|
23
|
-
pumaguard/pumaguard-ui/flutter_service_worker.js,sha256=
|
|
22
|
+
pumaguard/pumaguard-ui/flutter_bootstrap.js,sha256=U8J3Frvrv_OVLLNCdAx-_iNntK87_8XASBGavo1ktbQ,9858
|
|
23
|
+
pumaguard/pumaguard-ui/flutter_service_worker.js,sha256=mSmgOCIEJpkycLjwgiSJNx0UkkvPG155npHnHcyDYcU,8435
|
|
24
24
|
pumaguard/pumaguard-ui/index.html,sha256=901-ZY0WysVAZWPwj2xGatoezwm9TX9IV_jpMrlsaXg,1205
|
|
25
25
|
pumaguard/pumaguard-ui/main.dart.js,sha256=fFz7OvGMIyrSvIBcp1jK3P3x1xCh3i3anBpMHuaVgDo,2613988
|
|
26
26
|
pumaguard/pumaguard-ui/main.dart.mjs,sha256=u8D9JVFd7gNLKK-L2s_IjAfLkymktS1DXV25sXo4BsQ,33768
|
|
@@ -51,7 +51,7 @@ pumaguard/pumaguard-ui/icons/Icon-192.png,sha256=Pc6ZB3YC9wQhwcayokC8m4PWTYZoHUX
|
|
|
51
51
|
pumaguard/pumaguard-ui/icons/Icon-512.png,sha256=usyyBa5F8LQhvhZXJZtJQ6xAyVCUq4d_O8vhLNVE3L4,8252
|
|
52
52
|
pumaguard/pumaguard-ui/icons/Icon-maskable-192.png,sha256=0shC4iqfTsnZlrIzc6kFyI2aIDsiDFwVGIWtYh-XS1w,5594
|
|
53
53
|
pumaguard/pumaguard-ui/icons/Icon-maskable-512.png,sha256=au4Gzcq2sq73Sxc0xHePRCHS2hALD_nlKyG1UkAgKSk,20998
|
|
54
|
-
pumaguard-20.
|
|
54
|
+
pumaguard-20.post165.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
55
55
|
pumaguard-sounds/cougar_call.mp3,sha256=jdPzi7Qneect3ez2G6XAeHWtetU5vSOSB6pceuB26Wc,129048
|
|
56
56
|
pumaguard-sounds/cougarsounds.wav,sha256=hwVmmQ75dkOP3qd07YAvVOSm1neYtxLSzxw3Ulvs2cM,96346
|
|
57
57
|
pumaguard-sounds/dark-engine-logo-141942.mp3,sha256=Vw-qyLTMPJZvsgQcZtH0DpGcP1dd7nJq-9BnHuNPGug,372819
|
|
@@ -69,8 +69,8 @@ pumaguard-sounds/mixkit-vintage-telephone-ringtone-1356.wav,sha256=zWWY2uFF0-l7P
|
|
|
69
69
|
pumaguard-sounds/pumaguard-warning.mp3,sha256=wcCfHsulPo5P5s8MjpQAG2NYHQDsRpjqoMig1-o_MDI,232249
|
|
70
70
|
pumaguard-sounds/short-round-110940.mp3,sha256=vdskGD94SeH1UJyJyR0Ek_7xGXPIZfnPdoBvxGnUt98,450816
|
|
71
71
|
pumaguard-ui/ios/Flutter/ephemeral/flutter_lldb_helper.py,sha256=Bc_jl3_e5ZPvrSBJpPYtN05VxpztyKq-7lVms3rLg4Q,1276
|
|
72
|
-
pumaguard-20.
|
|
73
|
-
pumaguard-20.
|
|
74
|
-
pumaguard-20.
|
|
75
|
-
pumaguard-20.
|
|
76
|
-
pumaguard-20.
|
|
72
|
+
pumaguard-20.post165.dist-info/METADATA,sha256=ad1i5uTeM_8NONyX_OnRc681ecK4eNl8ckPiVruHQU0,7751
|
|
73
|
+
pumaguard-20.post165.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
74
|
+
pumaguard-20.post165.dist-info/entry_points.txt,sha256=rmCdBTPWrbJQvPPwABSVobXE9D7hrKsITGZ6nvCrko8,127
|
|
75
|
+
pumaguard-20.post165.dist-info/top_level.txt,sha256=B-PzS4agkQNhOYbLLIrMVOyMD_pl5F-yujPBm5zYYjY,40
|
|
76
|
+
pumaguard-20.post165.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|