atdd 0.7.4__py3-none-any.whl → 0.7.6__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 +71 -8
- {atdd-0.7.4.dist-info → atdd-0.7.6.dist-info}/METADATA +1 -1
- {atdd-0.7.4.dist-info → atdd-0.7.6.dist-info}/RECORD +7 -7
- {atdd-0.7.4.dist-info → atdd-0.7.6.dist-info}/WHEEL +0 -0
- {atdd-0.7.4.dist-info → atdd-0.7.6.dist-info}/entry_points.txt +0 -0
- {atdd-0.7.4.dist-info → atdd-0.7.6.dist-info}/licenses/LICENSE +0 -0
- {atdd-0.7.4.dist-info → atdd-0.7.6.dist-info}/top_level.txt +0 -0
atdd/coach/commands/inventory.py
CHANGED
|
@@ -302,27 +302,90 @@ 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 patterns:
|
|
308
|
+
- Primary: {aspect}.{type}.{plane}[.{measure}].json (e.g., metric.ui.duration.json)
|
|
309
|
+
- Legacy: *.signal.yaml (backward compatibility)
|
|
310
|
+
|
|
311
|
+
Excludes: _telemetry.yaml, _taxonomy.yaml, .pack.* files
|
|
312
|
+
Falls back to _telemetry.yaml registry if no signal files found.
|
|
313
|
+
"""
|
|
306
314
|
telemetry_dir = self.repo_root / "telemetry"
|
|
307
315
|
|
|
308
316
|
if not telemetry_dir.exists():
|
|
309
|
-
return {"total": 0, "
|
|
317
|
+
return {"total": 0, "by_theme": {}, "source": "none"}
|
|
318
|
+
|
|
319
|
+
# Find JSON signal files (primary) and YAML signal files (legacy *.signal.yaml)
|
|
320
|
+
json_files = list(telemetry_dir.glob("**/*.json"))
|
|
321
|
+
yaml_files = list(telemetry_dir.glob("**/*.yaml")) # includes *.signal.yaml
|
|
310
322
|
|
|
311
|
-
#
|
|
312
|
-
|
|
323
|
+
# Filter out manifest/registry/pack files
|
|
324
|
+
def is_signal_file(f: Path) -> bool:
|
|
325
|
+
name = f.name
|
|
326
|
+
# Exclude registry and manifest files
|
|
327
|
+
if name.startswith("_"):
|
|
328
|
+
return False
|
|
329
|
+
# Exclude pack files
|
|
330
|
+
if ".pack." in name:
|
|
331
|
+
return False
|
|
332
|
+
return True
|
|
313
333
|
|
|
314
|
-
|
|
334
|
+
signal_files = [f for f in json_files + yaml_files if is_signal_file(f)]
|
|
335
|
+
|
|
336
|
+
by_theme = defaultdict(int)
|
|
315
337
|
|
|
316
338
|
for signal_file in signal_files:
|
|
317
339
|
rel_path = signal_file.relative_to(telemetry_dir)
|
|
318
|
-
|
|
319
|
-
|
|
340
|
+
# First path segment is theme (per artifact-naming.convention.yaml v2.1)
|
|
341
|
+
theme = rel_path.parts[0] if rel_path.parts else "unknown"
|
|
342
|
+
by_theme[theme] += 1
|
|
343
|
+
|
|
344
|
+
# If no signal files found, fallback to registry
|
|
345
|
+
if not signal_files:
|
|
346
|
+
return self._scan_telemetry_from_registry(telemetry_dir)
|
|
320
347
|
|
|
321
348
|
return {
|
|
322
349
|
"total": len(signal_files),
|
|
323
|
-
"
|
|
350
|
+
"by_theme": dict(by_theme),
|
|
351
|
+
"source": "files"
|
|
324
352
|
}
|
|
325
353
|
|
|
354
|
+
def _scan_telemetry_from_registry(self, telemetry_dir: Path) -> Dict[str, Any]:
|
|
355
|
+
"""Fallback: count telemetry entries from _telemetry.yaml registry."""
|
|
356
|
+
registry_file = telemetry_dir / "_telemetry.yaml"
|
|
357
|
+
|
|
358
|
+
if not registry_file.exists():
|
|
359
|
+
return {"total": 0, "by_theme": {}, "source": "none"}
|
|
360
|
+
|
|
361
|
+
try:
|
|
362
|
+
with open(registry_file, 'r', encoding='utf-8') as f:
|
|
363
|
+
registry = yaml.safe_load(f) or {}
|
|
364
|
+
|
|
365
|
+
signals = registry.get("signals", [])
|
|
366
|
+
by_theme = defaultdict(int)
|
|
367
|
+
valid_count = 0
|
|
368
|
+
|
|
369
|
+
for signal in signals:
|
|
370
|
+
# Only count signals with non-empty ids
|
|
371
|
+
signal_id = signal.get("id") or signal.get("$id", "")
|
|
372
|
+
if not signal_id:
|
|
373
|
+
continue
|
|
374
|
+
|
|
375
|
+
valid_count += 1
|
|
376
|
+
# Parse theme from id (first segment before colon)
|
|
377
|
+
parts = signal_id.split(":")
|
|
378
|
+
theme = parts[0] if parts else "unknown"
|
|
379
|
+
by_theme[theme] += 1
|
|
380
|
+
|
|
381
|
+
return {
|
|
382
|
+
"total": valid_count,
|
|
383
|
+
"by_theme": dict(by_theme),
|
|
384
|
+
"source": "registry"
|
|
385
|
+
}
|
|
386
|
+
except Exception:
|
|
387
|
+
return {"total": 0, "by_theme": {}, "source": "error"}
|
|
388
|
+
|
|
326
389
|
def count_test_cases_in_file(self, test_file: Path) -> int:
|
|
327
390
|
"""Count number of test functions/cases in a test file."""
|
|
328
391
|
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=YVeXTgw8bp7v-qE__u-9z9vbncKEzhOsqfNx0xV-PtQ,27449
|
|
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.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
207
|
+
atdd-0.7.6.dist-info/METADATA,sha256=uzeqv7lHaQIA7Ddik1bV6n8bbZn8u-4nmP-tae2_x0E,8716
|
|
208
|
+
atdd-0.7.6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
209
|
+
atdd-0.7.6.dist-info/entry_points.txt,sha256=-C3yrA1WQQfN3iuGmSzPapA5cKVBEYU5Q1HUffSJTbY,38
|
|
210
|
+
atdd-0.7.6.dist-info/top_level.txt,sha256=VKkf6Uiyrm4RS6ULCGM-v8AzYN8K2yg8SMqwJLoO-xs,5
|
|
211
|
+
atdd-0.7.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|