ssot-core 0.2.25.dev5__tar.gz → 0.2.26.dev1__tar.gz
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.
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/PKG-INFO +5 -3
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/README.md +1 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/pyproject.toml +4 -3
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_core.egg-info/PKG-INFO +5 -3
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_core.egg-info/requires.txt +2 -2
- ssot_core-0.2.26.dev1/src/ssot_registry/api/graph.py +345 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/assets/lineage_graph/manifest.json +1 -1
- ssot_core-0.2.25.dev5/src/ssot_registry/api/graph.py +0 -373
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/setup.cfg +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_core.egg-info/SOURCES.txt +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_core.egg-info/dependency_links.txt +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_core.egg-info/top_level.txt +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/__main__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/acl/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/acl/policy.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/acl/wrapper.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/boundary.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/claims.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/config.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/documents.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/entity_ops.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/evidence.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/init.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/lifecycle.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/load.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/local_assurance.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/origin.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/packs.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/plan.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/profile_eval.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/profile_resolution.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/proof_graph.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/registry.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/release.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/save.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/status_sync.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/test_execution.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/upgrade.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/api/validate.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/assets/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/assets/lineage_graph/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/assets/lineage_graph/ssot-lineage-graph.css +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/assets/lineage_graph/ssot-lineage-graph.js +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/adr_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/boundary_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/claim_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/common.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/evidence_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/feature_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/graph_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/init_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/issue_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/main.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/profile_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/registry_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/release_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/risk_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/spec_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/test_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/upgrade_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/cli/validate_cmd.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/events.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/models.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/paths.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/scaffold.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/service.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/sqlite_store.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/control/sse.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/graph/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/graph/export_dot.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/graph/export_json.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/certification.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/claim_closure.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/claim_tier_gates.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/completion.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/document_lifecycle.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/document_supersession.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/feature_claims.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/feature_requirements.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/lifecycle.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/profile_requirements.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/promotion.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/guards/publication.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/maturation/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/maturation/selector.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/boundary.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/claim.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/document.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/enums.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/evidence.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/feature.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/ids.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/issue.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/profile.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/registry.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/release.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/risk.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/schema_version.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/model/test.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/proof_links.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/reports/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/reports/certification_report.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/reports/summary.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/reports/validation_report.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/snapshots/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/snapshots/boundary_snapshot.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/snapshots/hashing.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/snapshots/published_snapshot.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/snapshots/release_snapshot.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/templates/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/templates/registry.full.json +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/templates/registry.minimal.json +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/document_io.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/errors.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/formatting.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/fs.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/jcs.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/jsonio.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/registry_lock.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/util/time.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/bidirectional.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/bounds.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/claim_lineage.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/coverage.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/documents.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/feature_parent_links.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/filesystem.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/identity.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/lifecycle.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/origin.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/promotion.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/references.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/reservations.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/structure.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/validators/tiers.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/version.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/watch/__init__.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/watch/git_status.py +0 -0
- {ssot_core-0.2.25.dev5 → ssot_core-0.2.26.dev1}/src/ssot_registry/watch/observer.py +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ssot-core
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.26.dev1
|
|
4
4
|
Summary: Core Python runtime, registry model, validation, and release workflow APIs for SSOT.
|
|
5
5
|
Author-email: Jacob Stewart <jacob@swarmauri.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-core
|
|
8
8
|
Project-URL: Repository, https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-core
|
|
9
9
|
Project-URL: Issues, https://github.com/groupsum/ssot-registry/issues
|
|
10
|
+
Project-URL: Discord, https://discord.gg/mAjzxwSwRp
|
|
10
11
|
Keywords: ssot,core,registry,validation,release-management,governance,compliance
|
|
11
12
|
Classifier: Development Status :: 3 - Alpha
|
|
12
13
|
Classifier: Environment :: Console
|
|
@@ -36,9 +37,9 @@ Classifier: Topic :: Utilities
|
|
|
36
37
|
Requires-Python: <3.15,>=3.10
|
|
37
38
|
Description-Content-Type: text/markdown
|
|
38
39
|
Requires-Dist: orjson<4.0,>=3.10
|
|
39
|
-
Requires-Dist: ssot-contracts==0.2.
|
|
40
|
+
Requires-Dist: ssot-contracts==0.2.26.dev1
|
|
40
41
|
Requires-Dist: ssot-pack-contracts<0.3.0,>=0.2.23
|
|
41
|
-
Requires-Dist: ssot-views==0.2.
|
|
42
|
+
Requires-Dist: ssot-views==0.2.26.dev1
|
|
42
43
|
Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
43
44
|
|
|
44
45
|
<div align="center">
|
|
@@ -51,6 +52,7 @@ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
|
51
52
|
<a href="https://pypi.org/project/ssot-core/"><img src="https://img.shields.io/pypi/pyversions/ssot-core?label=Python" alt="Supported Python versions" /></a>
|
|
52
53
|
<a href="https://pepy.tech/project/ssot-core"><img src="https://static.pepy.tech/badge/ssot-core" alt="Downloads" /></a>
|
|
53
54
|
<a href="https://hits.sh/github.com/groupsum/ssot-registry/"><img src="https://hits.sh/github.com/groupsum/ssot-registry.svg?style=flat-square" alt="Hits" /></a>
|
|
55
|
+
<a href="https://discord.gg/mAjzxwSwRp"><img src="https://img.shields.io/badge/Discord-join%20chat-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
|
|
54
56
|
<!-- ssot-schema-badges:start -->
|
|
55
57
|
<img src="https://img.shields.io/badge/schema_version-0.8.0-blue" alt="schema_version 0.8.0" />
|
|
56
58
|
<img src="https://img.shields.io/badge/migration%20coverage-14%2F14-brightgreen" alt="Migration coverage 14/14" />
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<a href="https://pypi.org/project/ssot-core/"><img src="https://img.shields.io/pypi/pyversions/ssot-core?label=Python" alt="Supported Python versions" /></a>
|
|
9
9
|
<a href="https://pepy.tech/project/ssot-core"><img src="https://static.pepy.tech/badge/ssot-core" alt="Downloads" /></a>
|
|
10
10
|
<a href="https://hits.sh/github.com/groupsum/ssot-registry/"><img src="https://hits.sh/github.com/groupsum/ssot-registry.svg?style=flat-square" alt="Hits" /></a>
|
|
11
|
+
<a href="https://discord.gg/mAjzxwSwRp"><img src="https://img.shields.io/badge/Discord-join%20chat-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
|
|
11
12
|
<!-- ssot-schema-badges:start -->
|
|
12
13
|
<img src="https://img.shields.io/badge/schema_version-0.8.0-blue" alt="schema_version 0.8.0" />
|
|
13
14
|
<img src="https://img.shields.io/badge/migration%20coverage-14%2F14-brightgreen" alt="Migration coverage 14/14" />
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ssot-core"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.26.dev1"
|
|
8
8
|
description = "Core Python runtime, registry model, validation, and release workflow APIs for SSOT."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10,<3.15"
|
|
@@ -12,9 +12,9 @@ license = "Apache-2.0"
|
|
|
12
12
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
13
13
|
dependencies = [
|
|
14
14
|
"orjson>=3.10,<4.0",
|
|
15
|
-
"ssot-contracts==0.2.
|
|
15
|
+
"ssot-contracts==0.2.26.dev1",
|
|
16
16
|
"ssot-pack-contracts>=0.2.23,<0.3.0",
|
|
17
|
-
"ssot-views==0.2.
|
|
17
|
+
"ssot-views==0.2.26.dev1",
|
|
18
18
|
"tomli>=2.0.1; python_version < '3.11'",
|
|
19
19
|
]
|
|
20
20
|
keywords = ["ssot", "core", "registry", "validation", "release-management", "governance", "compliance"]
|
|
@@ -50,6 +50,7 @@ classifiers = [
|
|
|
50
50
|
Homepage = "https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-core"
|
|
51
51
|
Repository = "https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-core"
|
|
52
52
|
Issues = "https://github.com/groupsum/ssot-registry/issues"
|
|
53
|
+
Discord = "https://discord.gg/mAjzxwSwRp"
|
|
53
54
|
|
|
54
55
|
[tool.setuptools]
|
|
55
56
|
package-dir = {"" = "src"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ssot-core
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.26.dev1
|
|
4
4
|
Summary: Core Python runtime, registry model, validation, and release workflow APIs for SSOT.
|
|
5
5
|
Author-email: Jacob Stewart <jacob@swarmauri.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-core
|
|
8
8
|
Project-URL: Repository, https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-core
|
|
9
9
|
Project-URL: Issues, https://github.com/groupsum/ssot-registry/issues
|
|
10
|
+
Project-URL: Discord, https://discord.gg/mAjzxwSwRp
|
|
10
11
|
Keywords: ssot,core,registry,validation,release-management,governance,compliance
|
|
11
12
|
Classifier: Development Status :: 3 - Alpha
|
|
12
13
|
Classifier: Environment :: Console
|
|
@@ -36,9 +37,9 @@ Classifier: Topic :: Utilities
|
|
|
36
37
|
Requires-Python: <3.15,>=3.10
|
|
37
38
|
Description-Content-Type: text/markdown
|
|
38
39
|
Requires-Dist: orjson<4.0,>=3.10
|
|
39
|
-
Requires-Dist: ssot-contracts==0.2.
|
|
40
|
+
Requires-Dist: ssot-contracts==0.2.26.dev1
|
|
40
41
|
Requires-Dist: ssot-pack-contracts<0.3.0,>=0.2.23
|
|
41
|
-
Requires-Dist: ssot-views==0.2.
|
|
42
|
+
Requires-Dist: ssot-views==0.2.26.dev1
|
|
42
43
|
Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
43
44
|
|
|
44
45
|
<div align="center">
|
|
@@ -51,6 +52,7 @@ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
|
51
52
|
<a href="https://pypi.org/project/ssot-core/"><img src="https://img.shields.io/pypi/pyversions/ssot-core?label=Python" alt="Supported Python versions" /></a>
|
|
52
53
|
<a href="https://pepy.tech/project/ssot-core"><img src="https://static.pepy.tech/badge/ssot-core" alt="Downloads" /></a>
|
|
53
54
|
<a href="https://hits.sh/github.com/groupsum/ssot-registry/"><img src="https://hits.sh/github.com/groupsum/ssot-registry.svg?style=flat-square" alt="Hits" /></a>
|
|
55
|
+
<a href="https://discord.gg/mAjzxwSwRp"><img src="https://img.shields.io/badge/Discord-join%20chat-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
|
|
54
56
|
<!-- ssot-schema-badges:start -->
|
|
55
57
|
<img src="https://img.shields.io/badge/schema_version-0.8.0-blue" alt="schema_version 0.8.0" />
|
|
56
58
|
<img src="https://img.shields.io/badge/migration%20coverage-14%2F14-brightgreen" alt="Migration coverage 14/14" />
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import shutil
|
|
4
|
+
import subprocess
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from collections import Counter
|
|
7
|
+
import json
|
|
8
|
+
from importlib.resources import files
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from ssot_views.graph import build_graph_dot, build_graph_json
|
|
12
|
+
from ssot_registry.util.jsonio import save_json
|
|
13
|
+
|
|
14
|
+
from .load import load_registry
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
_IMAGE_FORMATS = {"png", "svg"}
|
|
18
|
+
_FAMILY_BY_PREFIX = {
|
|
19
|
+
"adr": "ADR",
|
|
20
|
+
"bnd": "Boundary",
|
|
21
|
+
"clm": "Claim",
|
|
22
|
+
"evd": "Evidence",
|
|
23
|
+
"feat": "Feature",
|
|
24
|
+
"iss": "Issue",
|
|
25
|
+
"prf": "Profile",
|
|
26
|
+
"rel": "Release",
|
|
27
|
+
"rsk": "Risk",
|
|
28
|
+
"spc": "Spec",
|
|
29
|
+
"tst": "Test",
|
|
30
|
+
}
|
|
31
|
+
_LINEAGE_ASSET_PACKAGE = "ssot_registry.assets.lineage_graph"
|
|
32
|
+
_LINEAGE_JS = "ssot-lineage-graph.js"
|
|
33
|
+
_LINEAGE_CSS = "ssot-lineage-graph.css"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _family_from_id(entity_id: str) -> str:
|
|
37
|
+
prefix = entity_id.split(":", 1)[0]
|
|
38
|
+
return _FAMILY_BY_PREFIX.get(prefix, prefix.upper())
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _title_for(item: dict[str, Any]) -> str:
|
|
42
|
+
for key in ("title", "name", "summary", "description"):
|
|
43
|
+
value = item.get(key)
|
|
44
|
+
if isinstance(value, str) and value.strip():
|
|
45
|
+
return value.strip()
|
|
46
|
+
return str(item.get("id", ""))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _string_value(value: Any) -> str:
|
|
50
|
+
return value.strip() if isinstance(value, str) and value.strip() else ""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _string_list(*values: Any) -> list[str]:
|
|
54
|
+
result: list[str] = []
|
|
55
|
+
for value in values:
|
|
56
|
+
items = value if isinstance(value, list) else [value]
|
|
57
|
+
for item in items:
|
|
58
|
+
if isinstance(item, str) and item.strip() and item.strip() not in result:
|
|
59
|
+
result.append(item.strip())
|
|
60
|
+
return result
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _maybe_source(item: dict[str, Any]) -> dict[str, Any] | None:
|
|
64
|
+
source = item.get("source") if isinstance(item.get("source"), dict) else {}
|
|
65
|
+
path = _string_value(item.get("path")) or _string_value(source.get("path"))
|
|
66
|
+
url = _string_value(item.get("url")) or _string_value(source.get("url"))
|
|
67
|
+
document_id = _string_value(item.get("document_id")) or _string_value(source.get("documentId"))
|
|
68
|
+
line = item.get("line") if isinstance(item.get("line"), int) else source.get("line")
|
|
69
|
+
payload: dict[str, Any] = {}
|
|
70
|
+
if path:
|
|
71
|
+
payload["path"] = path
|
|
72
|
+
if isinstance(line, int):
|
|
73
|
+
payload["line"] = line
|
|
74
|
+
if url:
|
|
75
|
+
payload["url"] = url
|
|
76
|
+
if document_id:
|
|
77
|
+
payload["documentId"] = document_id
|
|
78
|
+
return payload or None
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _validation_for(item: dict[str, Any]) -> dict[str, Any]:
|
|
82
|
+
raw = item.get("validation") if isinstance(item.get("validation"), dict) else {}
|
|
83
|
+
status = _string_value(raw.get("status")) or _string_value(item.get("validation_status")) or "unknown"
|
|
84
|
+
issues = _string_list(raw.get("issues"), item.get("validation_issues"))
|
|
85
|
+
payload: dict[str, Any] = {"status": status}
|
|
86
|
+
if issues:
|
|
87
|
+
payload["issues"] = issues
|
|
88
|
+
last_checked_at = _string_value(raw.get("lastCheckedAt")) or _string_value(item.get("last_checked_at"))
|
|
89
|
+
if last_checked_at:
|
|
90
|
+
payload["lastCheckedAt"] = last_checked_at
|
|
91
|
+
return payload
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _proof_for(item: dict[str, Any], family: str) -> dict[str, Any] | None:
|
|
95
|
+
raw = item.get("proof") if isinstance(item.get("proof"), dict) else {}
|
|
96
|
+
plan = item.get("plan") if isinstance(item.get("plan"), dict) else {}
|
|
97
|
+
payload: dict[str, Any] = {}
|
|
98
|
+
claim_tier = _string_value(raw.get("claimTier")) or _string_value(item.get("tier")) or _string_value(plan.get("target_claim_tier"))
|
|
99
|
+
if claim_tier:
|
|
100
|
+
payload["claimTier"] = claim_tier
|
|
101
|
+
if family == "Test":
|
|
102
|
+
payload["testStatus"] = _string_value(item.get("status")) or "unknown"
|
|
103
|
+
if family == "Evidence":
|
|
104
|
+
payload["evidenceStatus"] = _string_value(item.get("status")) or "unknown"
|
|
105
|
+
if family == "Release":
|
|
106
|
+
payload["releaseStatus"] = _string_value(item.get("status")) or "unknown"
|
|
107
|
+
completeness = raw.get("completeness")
|
|
108
|
+
if isinstance(completeness, (int, float)):
|
|
109
|
+
payload["completeness"] = completeness
|
|
110
|
+
return payload or None
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _lineage_payload(registry: dict[str, Any]) -> dict[str, Any]:
|
|
114
|
+
graph = build_graph_json(registry)
|
|
115
|
+
repo = registry.get("repo") if isinstance(registry.get("repo"), dict) else {}
|
|
116
|
+
edges = [
|
|
117
|
+
{
|
|
118
|
+
"from": edge["from"],
|
|
119
|
+
"to": edge["to"],
|
|
120
|
+
"type": edge.get("type", "RELATED"),
|
|
121
|
+
"label": edge.get("label") or edge.get("type", "RELATED"),
|
|
122
|
+
"status": edge.get("status") or "active",
|
|
123
|
+
"originKind": edge.get("originKind") or edge.get("origin_kind") or "direct",
|
|
124
|
+
}
|
|
125
|
+
for edge in graph.get("edges", [])
|
|
126
|
+
if isinstance(edge, dict) and isinstance(edge.get("from"), str) and isinstance(edge.get("to"), str)
|
|
127
|
+
]
|
|
128
|
+
nodes: dict[str, dict[str, Any]] = {}
|
|
129
|
+
for values in registry.values():
|
|
130
|
+
if not isinstance(values, list):
|
|
131
|
+
continue
|
|
132
|
+
for item in values:
|
|
133
|
+
if not isinstance(item, dict):
|
|
134
|
+
continue
|
|
135
|
+
entity_id = item.get("id")
|
|
136
|
+
if not isinstance(entity_id, str):
|
|
137
|
+
continue
|
|
138
|
+
plan = item.get("plan") if isinstance(item.get("plan"), dict) else {}
|
|
139
|
+
lifecycle = item.get("lifecycle") if isinstance(item.get("lifecycle"), dict) else {}
|
|
140
|
+
family = _family_from_id(entity_id)
|
|
141
|
+
governance_packs = _string_list(item.get("governance_packs"), item.get("governance_pack_ids"))
|
|
142
|
+
contract_packs = _string_list(item.get("contract_packs"), item.get("contract_pack_ids"))
|
|
143
|
+
packs = _string_list(item.get("packs"), item.get("pack_ids"), governance_packs, contract_packs)
|
|
144
|
+
proof = _proof_for(item, family)
|
|
145
|
+
source = _maybe_source(item)
|
|
146
|
+
nodes[entity_id] = {
|
|
147
|
+
"id": entity_id,
|
|
148
|
+
"family": family,
|
|
149
|
+
"label": _title_for(item) or entity_id,
|
|
150
|
+
"title": _string_value(item.get("title")) or _title_for(item) or entity_id,
|
|
151
|
+
"summary": _string_value(item.get("summary")),
|
|
152
|
+
"description": _string_value(item.get("description")) or _string_value(item.get("body")),
|
|
153
|
+
"status": item.get("status") or lifecycle.get("stage") or "",
|
|
154
|
+
"lifecycle": lifecycle,
|
|
155
|
+
"tier": item.get("tier") or plan.get("target_claim_tier") or "",
|
|
156
|
+
"origin": item.get("origin") or "",
|
|
157
|
+
"originKind": item.get("origin_kind") or item.get("origin") or "unknown",
|
|
158
|
+
"originRef": item.get("origin_ref") or item.get("package_version") or "",
|
|
159
|
+
"source": source,
|
|
160
|
+
"path": item.get("path") or "",
|
|
161
|
+
"tags": _string_list(item.get("tags"), item.get("robustness_dimensions")),
|
|
162
|
+
"packs": packs,
|
|
163
|
+
"governancePacks": governance_packs,
|
|
164
|
+
"contractPacks": contract_packs,
|
|
165
|
+
"boundaries": _string_list(item.get("boundary_id"), item.get("boundary_ids")),
|
|
166
|
+
"releases": _string_list(item.get("release_id"), item.get("release_ids")),
|
|
167
|
+
"profiles": _string_list(item.get("profile_id"), item.get("profile_ids")),
|
|
168
|
+
"validation": _validation_for(item),
|
|
169
|
+
"proof": proof,
|
|
170
|
+
}
|
|
171
|
+
if source is None:
|
|
172
|
+
nodes[entity_id].pop("source")
|
|
173
|
+
if proof is None:
|
|
174
|
+
nodes[entity_id].pop("proof")
|
|
175
|
+
for edge in edges:
|
|
176
|
+
for entity_id in (edge["from"], edge["to"]):
|
|
177
|
+
nodes.setdefault(
|
|
178
|
+
entity_id,
|
|
179
|
+
{
|
|
180
|
+
"id": entity_id,
|
|
181
|
+
"family": _family_from_id(entity_id),
|
|
182
|
+
"label": entity_id,
|
|
183
|
+
"status": "",
|
|
184
|
+
"tier": "",
|
|
185
|
+
"origin": "",
|
|
186
|
+
"originKind": "unknown",
|
|
187
|
+
"path": "",
|
|
188
|
+
"tags": [],
|
|
189
|
+
"packs": [],
|
|
190
|
+
"governancePacks": [],
|
|
191
|
+
"contractPacks": [],
|
|
192
|
+
"boundaries": [],
|
|
193
|
+
"releases": [],
|
|
194
|
+
"profiles": [],
|
|
195
|
+
"validation": {"status": "unknown"},
|
|
196
|
+
},
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
degree_counts: Counter[str] = Counter()
|
|
200
|
+
upstream_counts: Counter[str] = Counter()
|
|
201
|
+
downstream_counts: Counter[str] = Counter()
|
|
202
|
+
for edge in edges:
|
|
203
|
+
degree_counts[edge["from"]] += 1
|
|
204
|
+
degree_counts[edge["to"]] += 1
|
|
205
|
+
downstream_counts[edge["from"]] += 1
|
|
206
|
+
upstream_counts[edge["to"]] += 1
|
|
207
|
+
for entity_id, node in nodes.items():
|
|
208
|
+
node["degree"] = degree_counts[entity_id]
|
|
209
|
+
node["metrics"] = {
|
|
210
|
+
"upstreamCount": upstream_counts[entity_id],
|
|
211
|
+
"downstreamCount": downstream_counts[entity_id],
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
status_counts = Counter(_string_value(node.get("status")) or "unknown" for node in nodes.values())
|
|
215
|
+
origin_counts = Counter(_string_value(node.get("originKind")) or "unknown" for node in nodes.values())
|
|
216
|
+
tier_counts = Counter(_string_value(node.get("tier")) or "unknown" for node in nodes.values())
|
|
217
|
+
family_counts = Counter(node["family"] for node in nodes.values())
|
|
218
|
+
edge_type_counts = Counter(edge["type"] for edge in edges)
|
|
219
|
+
|
|
220
|
+
return {
|
|
221
|
+
"schemaVersion": "2",
|
|
222
|
+
"generator": {
|
|
223
|
+
"name": "ssot-registry",
|
|
224
|
+
"command": "ssot graph lineage",
|
|
225
|
+
},
|
|
226
|
+
"registry": {
|
|
227
|
+
"schemaVersion": registry.get("schema_version") or registry.get("schemaVersion") or "",
|
|
228
|
+
"validationStatus": "unknown",
|
|
229
|
+
},
|
|
230
|
+
"package": {
|
|
231
|
+
"id": repo.get("id") or "",
|
|
232
|
+
"name": repo.get("name") or "",
|
|
233
|
+
"version": repo.get("version") or "",
|
|
234
|
+
"kind": repo.get("kind") or "",
|
|
235
|
+
"repositoryUrl": repo.get("repository_url") or repo.get("repositoryUrl") or "",
|
|
236
|
+
"canonicalUrl": repo.get("canonical_url") or repo.get("canonicalUrl") or "",
|
|
237
|
+
},
|
|
238
|
+
"nodes": sorted(nodes.values(), key=lambda item: item["id"]),
|
|
239
|
+
"edges": edges,
|
|
240
|
+
"summaries": {
|
|
241
|
+
"counts": {
|
|
242
|
+
"nodes": len(nodes),
|
|
243
|
+
"edges": len(edges),
|
|
244
|
+
"families": dict(sorted(family_counts.items())),
|
|
245
|
+
"statuses": dict(sorted(status_counts.items())),
|
|
246
|
+
"origins": dict(sorted(origin_counts.items())),
|
|
247
|
+
"tiers": dict(sorted(tier_counts.items())),
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"summary": {
|
|
251
|
+
"nodeCount": len(nodes),
|
|
252
|
+
"edgeCount": len(edges),
|
|
253
|
+
"families": dict(sorted(family_counts.items())),
|
|
254
|
+
"edgeTypes": dict(sorted(edge_type_counts.items())),
|
|
255
|
+
},
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def _read_lineage_asset(name: str) -> str:
|
|
260
|
+
return files(_LINEAGE_ASSET_PACKAGE).joinpath(name).read_text(encoding="utf-8")
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _render_lineage_html(payload: dict[str, Any]) -> str:
|
|
264
|
+
css = _read_lineage_asset(_LINEAGE_CSS)
|
|
265
|
+
js = _read_lineage_asset(_LINEAGE_JS)
|
|
266
|
+
payload_json = json.dumps(payload, separators=(",", ":")).replace("</", "<\\/")
|
|
267
|
+
return f"""<!doctype html>
|
|
268
|
+
<html lang="en">
|
|
269
|
+
<head>
|
|
270
|
+
<meta charset="utf-8">
|
|
271
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
272
|
+
<title>SSOT Lineage Graph</title>
|
|
273
|
+
<style>html,body,#ssot-lineage-root{{width:100%;height:100%;margin:0}}body{{overflow:hidden}}#ssot-lineage-root{{min-height:100vh}}{css}</style>
|
|
274
|
+
</head>
|
|
275
|
+
<body>
|
|
276
|
+
<div id="ssot-lineage-root"></div>
|
|
277
|
+
<script>window.__SSOT_LINEAGE_PAYLOAD__={payload_json};</script>
|
|
278
|
+
<script>{js}</script>
|
|
279
|
+
</body>
|
|
280
|
+
</html>
|
|
281
|
+
"""
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
def _render_dot_image(dot_text: str, output_path: Path, image_format: str) -> None:
|
|
286
|
+
dot_bin = shutil.which("dot")
|
|
287
|
+
if dot_bin is None:
|
|
288
|
+
raise ValueError("Graphviz 'dot' binary is required for image export but was not found in PATH")
|
|
289
|
+
process = subprocess.run(
|
|
290
|
+
[dot_bin, f"-T{image_format}", "-o", output_path.as_posix()],
|
|
291
|
+
input=dot_text,
|
|
292
|
+
text=True,
|
|
293
|
+
capture_output=True,
|
|
294
|
+
check=False,
|
|
295
|
+
)
|
|
296
|
+
if process.returncode != 0:
|
|
297
|
+
detail = process.stderr.strip() or process.stdout.strip() or "unknown error"
|
|
298
|
+
raise ValueError(f"dot image export failed: {detail}")
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def export_graph(path: str | Path, output_format: str, output: str | None = None) -> dict[str, object]:
|
|
302
|
+
registry_path, repo_root, registry = load_registry(path)
|
|
303
|
+
|
|
304
|
+
if output_format == "json":
|
|
305
|
+
artifact = build_graph_json(registry)
|
|
306
|
+
output_path = Path(output) if output is not None else repo_root / ".ssot" / "graphs" / "registry.graph.json"
|
|
307
|
+
save_json(output_path, artifact)
|
|
308
|
+
elif output_format == "dot":
|
|
309
|
+
artifact = build_graph_dot(registry)
|
|
310
|
+
output_path = Path(output) if output is not None else repo_root / ".ssot" / "graphs" / "registry.graph.dot"
|
|
311
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
312
|
+
output_path.write_text(artifact, encoding="utf-8")
|
|
313
|
+
elif output_format in _IMAGE_FORMATS:
|
|
314
|
+
dot_text = build_graph_dot(registry)
|
|
315
|
+
output_path = Path(output) if output is not None else repo_root / ".ssot" / "graphs" / f"registry.graph.{output_format}"
|
|
316
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
317
|
+
_render_dot_image(dot_text, output_path, output_format)
|
|
318
|
+
else:
|
|
319
|
+
raise ValueError(f"Unsupported graph format: {output_format}")
|
|
320
|
+
|
|
321
|
+
return {
|
|
322
|
+
"passed": True,
|
|
323
|
+
"registry_path": registry_path.as_posix(),
|
|
324
|
+
"output_path": output_path.as_posix(),
|
|
325
|
+
"format": output_format,
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def export_lineage_graph(path: str | Path, output: str | None = None) -> dict[str, object]:
|
|
330
|
+
registry_path, repo_root, registry = load_registry(path)
|
|
331
|
+
payload = _lineage_payload(registry)
|
|
332
|
+
output_path = Path(output) if output is not None else repo_root / ".ssot" / "graphs" / "registry.lineage.html"
|
|
333
|
+
if output_path.exists() and output_path.is_dir():
|
|
334
|
+
raise ValueError(f"Lineage graph output path must be a file, not a directory: {output_path}")
|
|
335
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
336
|
+
html = _render_lineage_html(payload)
|
|
337
|
+
output_path.write_text(html, encoding="utf-8")
|
|
338
|
+
return {
|
|
339
|
+
"passed": True,
|
|
340
|
+
"registry_path": registry_path.as_posix(),
|
|
341
|
+
"output_path": output_path.as_posix(),
|
|
342
|
+
"format": "html",
|
|
343
|
+
"node_count": payload["summary"]["nodeCount"],
|
|
344
|
+
"edge_count": payload["summary"]["edgeCount"],
|
|
345
|
+
}
|