generated from coulomb/repo-seed
REUSE-WP-0014: T11 docs, roster stats, workplan finished
Some checks failed
ci / validate-registry (push) Has been cancelled
Some checks failed
ci / validate-registry (push) Has been cancelled
Link local-repo-roster in RegistryFederation; rollout milestone history; update IntentScopeGapAnalysis (60 hub members). Add stats --roster --federation-ready for workstation federation readiness.
This commit is contained in:
@@ -40,7 +40,14 @@ from reuse_surface.registry_update import (
|
||||
format_suggestions_markdown,
|
||||
suggest_llm_updates,
|
||||
)
|
||||
from reuse_surface.stats import collect_stats, format_stats_json, format_stats_markdown
|
||||
from reuse_surface.stats import (
|
||||
collect_roster_stats,
|
||||
collect_stats,
|
||||
format_roster_stats_json,
|
||||
format_roster_stats_markdown,
|
||||
format_stats_json,
|
||||
format_stats_markdown,
|
||||
)
|
||||
from reuse_surface.registry import (
|
||||
ROOT,
|
||||
capability_paths,
|
||||
@@ -381,6 +388,18 @@ def cmd_hub_sync(args: argparse.Namespace) -> int:
|
||||
|
||||
|
||||
def cmd_stats(args: argparse.Namespace) -> int:
|
||||
if args.roster:
|
||||
roster_path = Path(args.roster).resolve()
|
||||
stats = collect_roster_stats(
|
||||
roster_path,
|
||||
federation_ready=args.federation_ready,
|
||||
)
|
||||
if args.format == "json":
|
||||
print(format_roster_stats_json(stats))
|
||||
else:
|
||||
print(format_roster_stats_markdown(stats), end="")
|
||||
return 0
|
||||
|
||||
repo_root = Path(args.path or ".").resolve()
|
||||
stats = collect_stats(
|
||||
repo_root,
|
||||
@@ -707,6 +726,10 @@ def main(argv: list[str] | None = None) -> int:
|
||||
|
||||
stats = subparsers.add_parser("stats", help="registry maturity and federation stats")
|
||||
stats.add_argument("--path", help="repo root (default: cwd)")
|
||||
stats.add_argument(
|
||||
"--roster",
|
||||
help="workstation roster YAML (e.g. registry/federation/local-repo-roster.yaml)",
|
||||
)
|
||||
stats.add_argument("--federation-ready", action="store_true")
|
||||
stats.add_argument("--raw-url", help="probe federation raw index URL")
|
||||
stats.add_argument("--hub-url", help="hub base URL (or REUSE_SURFACE_URL)")
|
||||
|
||||
Reference in New Issue
Block a user