atdd 0.7.4__py3-none-any.whl → 0.7.5__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.
- atdd/coach/commands/inventory.py +70 -8
- {atdd-0.7.4.dist-info → atdd-0.7.5.dist-info}/METADATA +1 -1
- {atdd-0.7.4.dist-info → atdd-0.7.5.dist-info}/RECORD +7 -7
- {atdd-0.7.4.dist-info → atdd-0.7.5.dist-info}/WHEEL +0 -0
- {atdd-0.7.4.dist-info → atdd-0.7.5.dist-info}/entry_points.txt +0 -0
- {atdd-0.7.4.dist-info → atdd-0.7.5.dist-info}/licenses/LICENSE +0 -0
- {atdd-0.7.4.dist-info → atdd-0.7.5.dist-info}/top_level.txt +0 -0
atdd/coach/commands/inventory.py
CHANGED
|
@@ -302,27 +302,89 @@ class RepositoryInventory:
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
def scan_telemetry(self) -> Dict[str, Any]:
|
|
305
|
-
"""Scan telemetry/ for signal definitions.
|
|
305
|
+
"""Scan telemetry/ for signal definitions.
|
|
306
|
+
|
|
307
|
+
Signal file pattern: {aspect}.{type}.{plane}[.{measure}].json
|
|
308
|
+
Examples: metric.ui.duration.json, event.be.json
|
|
309
|
+
|
|
310
|
+
Excludes: _telemetry.yaml, _taxonomy.yaml, .pack.* files
|
|
311
|
+
Falls back to _telemetry.yaml registry if no signal files found.
|
|
312
|
+
"""
|
|
306
313
|
telemetry_dir = self.repo_root / "telemetry"
|
|
307
314
|
|
|
308
315
|
if not telemetry_dir.exists():
|
|
309
|
-
return {"total": 0, "
|
|
316
|
+
return {"total": 0, "by_theme": {}, "source": "none"}
|
|
317
|
+
|
|
318
|
+
# Find JSON signal files (primary) and YAML signal files (legacy)
|
|
319
|
+
json_files = list(telemetry_dir.glob("**/*.json"))
|
|
320
|
+
yaml_files = list(telemetry_dir.glob("**/*.yaml"))
|
|
310
321
|
|
|
311
|
-
#
|
|
312
|
-
|
|
322
|
+
# Filter out manifest/registry/pack files
|
|
323
|
+
def is_signal_file(f: Path) -> bool:
|
|
324
|
+
name = f.name
|
|
325
|
+
# Exclude registry and manifest files
|
|
326
|
+
if name.startswith("_"):
|
|
327
|
+
return False
|
|
328
|
+
# Exclude pack files
|
|
329
|
+
if ".pack." in name:
|
|
330
|
+
return False
|
|
331
|
+
return True
|
|
313
332
|
|
|
314
|
-
|
|
333
|
+
signal_files = [f for f in json_files + yaml_files if is_signal_file(f)]
|
|
334
|
+
|
|
335
|
+
by_theme = defaultdict(int)
|
|
315
336
|
|
|
316
337
|
for signal_file in signal_files:
|
|
317
338
|
rel_path = signal_file.relative_to(telemetry_dir)
|
|
318
|
-
|
|
319
|
-
|
|
339
|
+
# First path segment is theme (per artifact-naming.convention.yaml v2.1)
|
|
340
|
+
theme = rel_path.parts[0] if rel_path.parts else "unknown"
|
|
341
|
+
by_theme[theme] += 1
|
|
342
|
+
|
|
343
|
+
# If no signal files found, fallback to registry
|
|
344
|
+
if not signal_files:
|
|
345
|
+
return self._scan_telemetry_from_registry(telemetry_dir)
|
|
320
346
|
|
|
321
347
|
return {
|
|
322
348
|
"total": len(signal_files),
|
|
323
|
-
"
|
|
349
|
+
"by_theme": dict(by_theme),
|
|
350
|
+
"source": "files"
|
|
324
351
|
}
|
|
325
352
|
|
|
353
|
+
def _scan_telemetry_from_registry(self, telemetry_dir: Path) -> Dict[str, Any]:
|
|
354
|
+
"""Fallback: count telemetry entries from _telemetry.yaml registry."""
|
|
355
|
+
registry_file = telemetry_dir / "_telemetry.yaml"
|
|
356
|
+
|
|
357
|
+
if not registry_file.exists():
|
|
358
|
+
return {"total": 0, "by_theme": {}, "source": "none"}
|
|
359
|
+
|
|
360
|
+
try:
|
|
361
|
+
with open(registry_file, 'r', encoding='utf-8') as f:
|
|
362
|
+
registry = yaml.safe_load(f) or {}
|
|
363
|
+
|
|
364
|
+
signals = registry.get("signals", [])
|
|
365
|
+
by_theme = defaultdict(int)
|
|
366
|
+
valid_count = 0
|
|
367
|
+
|
|
368
|
+
for signal in signals:
|
|
369
|
+
# Only count signals with non-empty ids
|
|
370
|
+
signal_id = signal.get("id") or signal.get("$id", "")
|
|
371
|
+
if not signal_id:
|
|
372
|
+
continue
|
|
373
|
+
|
|
374
|
+
valid_count += 1
|
|
375
|
+
# Parse theme from id (first segment before colon)
|
|
376
|
+
parts = signal_id.split(":")
|
|
377
|
+
theme = parts[0] if parts else "unknown"
|
|
378
|
+
by_theme[theme] += 1
|
|
379
|
+
|
|
380
|
+
return {
|
|
381
|
+
"total": valid_count,
|
|
382
|
+
"by_theme": dict(by_theme),
|
|
383
|
+
"source": "registry"
|
|
384
|
+
}
|
|
385
|
+
except Exception:
|
|
386
|
+
return {"total": 0, "by_theme": {}, "source": "error"}
|
|
387
|
+
|
|
326
388
|
def count_test_cases_in_file(self, test_file: Path) -> int:
|
|
327
389
|
"""Count number of test functions/cases in a test file."""
|
|
328
390
|
try:
|
|
@@ -12,7 +12,7 @@ atdd/coach/commands/gate.py,sha256=_V2GypqoGixTs_kLWxFF3HgEt-Wi2r6Iv0YL75yWrWo,5
|
|
|
12
12
|
atdd/coach/commands/infer_governance_status.py,sha256=MlLnx8SrJAOQq2rfuxLZMmyNylCQ-OYx4tSi_iFdhRA,4504
|
|
13
13
|
atdd/coach/commands/initializer.py,sha256=wuvzj7QwA11ilNjRZU6Bx2bLQXITdBHJxR9_mZK7xjA,6503
|
|
14
14
|
atdd/coach/commands/interface.py,sha256=FwBrJpWkfSL9n4n0HT_EC-alseXgU0bweKD4TImyHN0,40483
|
|
15
|
-
atdd/coach/commands/inventory.py,sha256=
|
|
15
|
+
atdd/coach/commands/inventory.py,sha256=rJO2mx-FSNgkoKXKz825xEhlPucegvJCgDp7A3kFhJw,27357
|
|
16
16
|
atdd/coach/commands/migration.py,sha256=wRxU7emvvHqWt1MvXKkNTkPBjp0sU9g8F5Uy5yV2YfI,8177
|
|
17
17
|
atdd/coach/commands/registry.py,sha256=Ri2X5AqzojNokxP5-yb3nZj6nO9DsNT-68vgsSOmgg0,71558
|
|
18
18
|
atdd/coach/commands/session.py,sha256=MhuWXd5TR6bB3w0t8vANeZx3L476qwLT6EUQMwg-wQA,14268
|
|
@@ -203,9 +203,9 @@ atdd/tester/validators/test_train_frontend_e2e.py,sha256=fpfUwTbAWzuqxbVKoaFw-ab
|
|
|
203
203
|
atdd/tester/validators/test_train_frontend_python.py,sha256=KK2U3oNFWLyBK7YHC0fU7shR05k93gVcO762AI8Q3pw,9018
|
|
204
204
|
atdd/tester/validators/test_typescript_test_naming.py,sha256=E-TyGv_GVlTfsbyuxrtv9sOWSZS_QcpH6rrJFbWoeeU,11280
|
|
205
205
|
atdd/tester/validators/test_typescript_test_structure.py,sha256=eV89SD1RaKtchBZupqhnJmaruoROosf3LwB4Fwe4UJI,2612
|
|
206
|
-
atdd-0.7.
|
|
207
|
-
atdd-0.7.
|
|
208
|
-
atdd-0.7.
|
|
209
|
-
atdd-0.7.
|
|
210
|
-
atdd-0.7.
|
|
211
|
-
atdd-0.7.
|
|
206
|
+
atdd-0.7.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
207
|
+
atdd-0.7.5.dist-info/METADATA,sha256=VXNpmw2-OTDxXYlver6fzx7C40SkPJFeRnFTQJoSuII,8716
|
|
208
|
+
atdd-0.7.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
209
|
+
atdd-0.7.5.dist-info/entry_points.txt,sha256=-C3yrA1WQQfN3iuGmSzPapA5cKVBEYU5Q1HUffSJTbY,38
|
|
210
|
+
atdd-0.7.5.dist-info/top_level.txt,sha256=VKkf6Uiyrm4RS6ULCGM-v8AzYN8K2yg8SMqwJLoO-xs,5
|
|
211
|
+
atdd-0.7.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|