contractforge-core 0.1.0__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.
- contractforge_core-0.1.0/.gitignore +18 -0
- contractforge_core-0.1.0/CHANGELOG.md +14 -0
- contractforge_core-0.1.0/LICENSE +21 -0
- contractforge_core-0.1.0/PKG-INFO +374 -0
- contractforge_core-0.1.0/README.md +343 -0
- contractforge_core-0.1.0/docs/README.md +88 -0
- contractforge_core-0.1.0/docs/adapters/aws.md +622 -0
- contractforge_core-0.1.0/docs/adapters/snowflake.md +353 -0
- contractforge_core-0.1.0/docs/adapters/test-contracts-across-adapters.md +103 -0
- contractforge_core-0.1.0/docs/adapters.md +153 -0
- contractforge_core-0.1.0/docs/adrs/ADR-001-core-adapter-architecture.md +35 -0
- contractforge_core-0.1.0/docs/adrs/ADR-002-databricks-reference-adapter.md +70 -0
- contractforge_core-0.1.0/docs/adrs/ADR-003-portable-vs-platform-specific-semantics.md +29 -0
- contractforge_core-0.1.0/docs/adrs/ADR-004-source-portability-and-connector-scope.md +47 -0
- contractforge_core-0.1.0/docs/adrs/ADR-005-adapter-parameter-policy.md +34 -0
- contractforge_core-0.1.0/docs/adrs/ADR-006-environment-contract.md +37 -0
- contractforge_core-0.1.0/docs/adrs/ADR-007-aws-glue-iceberg-adapter.md +104 -0
- contractforge_core-0.1.0/docs/adrs/ADR-008-core-connector-centralization-and-independence.md +40 -0
- contractforge_core-0.1.0/docs/anti-patterns.md +69 -0
- contractforge_core-0.1.0/docs/architecture.md +136 -0
- contractforge_core-0.1.0/docs/assets/diagrams/contractforge-flow.svg +49 -0
- contractforge_core-0.1.0/docs/assets/logo/contractforge-logo.png +0 -0
- contractforge_core-0.1.0/docs/assets/logo/contractforge-mark.png +0 -0
- contractforge_core-0.1.0/docs/connection-yaml.md +107 -0
- contractforge_core-0.1.0/docs/connectors.md +200 -0
- contractforge_core-0.1.0/docs/contracts.md +203 -0
- contractforge_core-0.1.0/docs/databricks.md +78 -0
- contractforge_core-0.1.0/docs/development-agents.md +77 -0
- contractforge_core-0.1.0/docs/naming.md +52 -0
- contractforge_core-0.1.0/docs/operations.md +70 -0
- contractforge_core-0.1.0/docs/platform-parity-tests.md +127 -0
- contractforge_core-0.1.0/docs/project-template.md +75 -0
- contractforge_core-0.1.0/docs/project-yaml.md +400 -0
- contractforge_core-0.1.0/docs/quickstart.md +185 -0
- contractforge_core-0.1.0/docs/reports/adapter-technical-review-summary.md +89 -0
- contractforge_core-0.1.0/docs/reports/aws-adapter-review.md +89 -0
- contractforge_core-0.1.0/docs/reports/databricks-adapter-review.md +90 -0
- contractforge_core-0.1.0/docs/reports/geojson-supabase-test-presentation.md +993 -0
- contractforge_core-0.1.0/docs/reports/snowflake-adapter-review.md +104 -0
- contractforge_core-0.1.0/docs/roadmap.md +73 -0
- contractforge_core-0.1.0/docs/security.md +81 -0
- contractforge_core-0.1.0/docs/specs/adapter-authoring.md +513 -0
- contractforge_core-0.1.0/docs/specs/adapter-parameter-policy.md +155 -0
- contractforge_core-0.1.0/docs/specs/adapter-technical-review-checklist.md +549 -0
- contractforge_core-0.1.0/docs/specs/api-stability.md +89 -0
- contractforge_core-0.1.0/docs/specs/aws-adapter-hardening-checklist.md +83 -0
- contractforge_core-0.1.0/docs/specs/aws-adapter.md +468 -0
- contractforge_core-0.1.0/docs/specs/aws-capability-parity.md +126 -0
- contractforge_core-0.1.0/docs/specs/aws-stabilization-matrix.md +309 -0
- contractforge_core-0.1.0/docs/specs/contract-sections.md +173 -0
- contractforge_core-0.1.0/docs/specs/control-table-parity.md +269 -0
- contractforge_core-0.1.0/docs/specs/databricks-adapter.md +775 -0
- contractforge_core-0.1.0/docs/specs/databricks-contractforge-parity.md +155 -0
- contractforge_core-0.1.0/docs/specs/environment-contract.md +132 -0
- contractforge_core-0.1.0/docs/specs/evidence-mapping-matrix.md +127 -0
- contractforge_core-0.1.0/docs/specs/evidence-model.md +74 -0
- contractforge_core-0.1.0/docs/specs/execution-plan.md +105 -0
- contractforge_core-0.1.0/docs/specs/extensions-aws.md +88 -0
- contractforge_core-0.1.0/docs/specs/extensions-databricks.md +137 -0
- contractforge_core-0.1.0/docs/specs/parameter-defaults.md +77 -0
- contractforge_core-0.1.0/docs/specs/platform-capabilities.md +63 -0
- contractforge_core-0.1.0/docs/specs/platform-contract-parity.md +182 -0
- contractforge_core-0.1.0/docs/specs/portability-boundaries.md +56 -0
- contractforge_core-0.1.0/docs/specs/publication-packaging.md +184 -0
- contractforge_core-0.1.0/docs/specs/semantic-contract.md +266 -0
- contractforge_core-0.1.0/docs/specs/snowflake-adapter-implementation-plan.md +891 -0
- contractforge_core-0.1.0/docs/specs/snowflake-adapter-parity-execution-plan.md +821 -0
- contractforge_core-0.1.0/docs/specs/snowflake-capability-parity.md +435 -0
- contractforge_core-0.1.0/docs/specs/snowflake-stabilization-matrix.md +127 -0
- contractforge_core-0.1.0/docs/specs/source-portability.md +229 -0
- contractforge_core-0.1.0/docs/specs/write-engines.md +94 -0
- contractforge_core-0.1.0/docs/usage-guide.md +160 -0
- contractforge_core-0.1.0/pyproject.toml +49 -0
- contractforge_core-0.1.0/src/contractforge_core/__init__.py +135 -0
- contractforge_core-0.1.0/src/contractforge_core/adapters/__init__.py +15 -0
- contractforge_core-0.1.0/src/contractforge_core/adapters/base/__init__.py +10 -0
- contractforge_core-0.1.0/src/contractforge_core/adapters/base/generic.py +62 -0
- contractforge_core-0.1.0/src/contractforge_core/adapters/base/protocol.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/capabilities/__init__.py +4 -0
- contractforge_core-0.1.0/src/contractforge_core/capabilities/models.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/capabilities/native.py +53 -0
- contractforge_core-0.1.0/src/contractforge_core/cli.py +96 -0
- contractforge_core-0.1.0/src/contractforge_core/cli_connectors.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/cli_contracts.py +178 -0
- contractforge_core-0.1.0/src/contractforge_core/cli_init.py +117 -0
- contractforge_core-0.1.0/src/contractforge_core/cli_io.py +22 -0
- contractforge_core-0.1.0/src/contractforge_core/config.py +164 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/__init__.py +140 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/__init__.py +17 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/__init__.py +51 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/auth.py +104 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/pagination.py +92 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/reader.py +211 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/retry.py +21 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/safety.py +78 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/source.py +43 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/api/rest/transport.py +15 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/catalog/__init__.py +27 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/catalog/catalog/__init__.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/catalog/catalog/source.py +39 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/catalog/catalog/table_refs.py +83 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/databases/__init__.py +21 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/databases/jdbc/__init__.py +23 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/databases/jdbc/rds_iam.py +98 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/databases/jdbc/source.py +161 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/files/__init__.py +21 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/files/files/__init__.py +21 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/files/files/source.py +52 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/http_files/__init__.py +27 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/http_files/http_file/__init__.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/http_files/http_file/reader.py +104 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/http_files/http_file/retry.py +22 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/http_files/http_file/safety.py +70 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/http_files/http_file/source.py +82 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/metadata.py +216 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/native_passthrough/__init__.py +13 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/native_passthrough/native_passthrough/__init__.py +13 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/native_passthrough/native_passthrough/source.py +35 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/registry.py +69 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/sharing/__init__.py +8 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/sharing/delta_share/__init__.py +8 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/sharing/delta_share/source.py +22 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/streams/__init__.py +25 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/streams/eventhubs/__init__.py +17 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/streams/eventhubs/source.py +44 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/streams/kafka/__init__.py +17 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/streams/kafka/source.py +53 -0
- contractforge_core-0.1.0/src/contractforge_core/connectors/streams/source.py +40 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/__init__.py +131 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/access.py +161 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/annotations.py +162 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/base.py +85 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/bundle.py +327 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/environment.py +80 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/execution.py +65 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/governance.py +47 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/governance_common.py +17 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/naming.py +40 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/normalize.py +129 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/operations.py +80 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/plan_validation.py +25 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/quality.py +113 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/root.py +179 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/schema.py +65 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/shape_validation.py +127 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/source.py +61 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/source_connector.py +115 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/source_generic.py +122 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/source_portability.py +88 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/source_validation.py +230 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/targeting.py +31 -0
- contractforge_core-0.1.0/src/contractforge_core/contracts/transform.py +174 -0
- contractforge_core-0.1.0/src/contractforge_core/diagnostics/__init__.py +5 -0
- contractforge_core-0.1.0/src/contractforge_core/diagnostics/models.py +15 -0
- contractforge_core-0.1.0/src/contractforge_core/errors.py +62 -0
- contractforge_core-0.1.0/src/contractforge_core/evidence/__init__.py +43 -0
- contractforge_core-0.1.0/src/contractforge_core/evidence/control_tables.py +147 -0
- contractforge_core-0.1.0/src/contractforge_core/evidence/models.py +42 -0
- contractforge_core-0.1.0/src/contractforge_core/evidence/records.py +101 -0
- contractforge_core-0.1.0/src/contractforge_core/execution/__init__.py +27 -0
- contractforge_core-0.1.0/src/contractforge_core/execution/results.py +18 -0
- contractforge_core-0.1.0/src/contractforge_core/execution/strategy.py +27 -0
- contractforge_core-0.1.0/src/contractforge_core/execution/windows.py +117 -0
- contractforge_core-0.1.0/src/contractforge_core/execution/write_modes.py +32 -0
- contractforge_core-0.1.0/src/contractforge_core/metrics/__init__.py +5 -0
- contractforge_core-0.1.0/src/contractforge_core/metrics/write.py +25 -0
- contractforge_core-0.1.0/src/contractforge_core/naming.py +144 -0
- contractforge_core-0.1.0/src/contractforge_core/normalization/__init__.py +19 -0
- contractforge_core-0.1.0/src/contractforge_core/normalization/common.py +26 -0
- contractforge_core-0.1.0/src/contractforge_core/normalization/intents.py +111 -0
- contractforge_core-0.1.0/src/contractforge_core/normalization/quality.py +100 -0
- contractforge_core-0.1.0/src/contractforge_core/parity/__init__.py +5 -0
- contractforge_core-0.1.0/src/contractforge_core/parity/models.py +53 -0
- contractforge_core-0.1.0/src/contractforge_core/partitioning/__init__.py +5 -0
- contractforge_core-0.1.0/src/contractforge_core/partitioning/predicates.py +15 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/__init__.py +18 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/governance_checks.py +50 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/matcher.py +60 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/plan_builder.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/result.py +47 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/semantic_checks.py +56 -0
- contractforge_core-0.1.0/src/contractforge_core/planner/write_checks.py +156 -0
- contractforge_core-0.1.0/src/contractforge_core/portability.py +53 -0
- contractforge_core-0.1.0/src/contractforge_core/preparation/__init__.py +27 -0
- contractforge_core-0.1.0/src/contractforge_core/preparation/staging.py +129 -0
- contractforge_core-0.1.0/src/contractforge_core/project.py +101 -0
- contractforge_core-0.1.0/src/contractforge_core/quality/__init__.py +24 -0
- contractforge_core-0.1.0/src/contractforge_core/quality/results.py +73 -0
- contractforge_core-0.1.0/src/contractforge_core/quality/rules.py +12 -0
- contractforge_core-0.1.0/src/contractforge_core/reporting/__init__.py +5 -0
- contractforge_core-0.1.0/src/contractforge_core/reporting/models.py +13 -0
- contractforge_core-0.1.0/src/contractforge_core/results.py +27 -0
- contractforge_core-0.1.0/src/contractforge_core/runtime/__init__.py +5 -0
- contractforge_core-0.1.0/src/contractforge_core/runtime/models.py +38 -0
- contractforge_core-0.1.0/src/contractforge_core/schema/__init__.py +13 -0
- contractforge_core-0.1.0/src/contractforge_core/schema/diff.py +122 -0
- contractforge_core-0.1.0/src/contractforge_core/schema/policy.py +25 -0
- contractforge_core-0.1.0/src/contractforge_core/security/__init__.py +7 -0
- contractforge_core-0.1.0/src/contractforge_core/security/redaction.py +73 -0
- contractforge_core-0.1.0/src/contractforge_core/semantic/__init__.py +29 -0
- contractforge_core-0.1.0/src/contractforge_core/semantic/models.py +108 -0
- contractforge_core-0.1.0/src/contractforge_core/watermark.py +65 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `contractforge-core` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows Keep a Changelog, and this package follows semantic
|
|
6
|
+
versioning as described in `docs/specs/api-stability.md`.
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-06-08
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial public preview release of the platform-neutral ContractForge core.
|
|
13
|
+
- Semantic contract models, project parsing, capability matching, planning,
|
|
14
|
+
source connector catalog, evidence models and the `contractforge` CLI.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ContractForge contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: contractforge-core
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Platform-neutral semantic core for contract-first data ingestion.
|
|
5
|
+
Project-URL: Homepage, https://github.com/marquesantero/contractforge-core
|
|
6
|
+
Project-URL: Documentation, https://marquesantero.github.io/contractforge-core/
|
|
7
|
+
Project-URL: Repository, https://github.com/marquesantero/contractforge-core
|
|
8
|
+
Project-URL: Issues, https://github.com/marquesantero/contractforge-core/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/marquesantero/contractforge-core/blob/main/CHANGELOG.md
|
|
10
|
+
Author: ContractForge contributors
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: contractforge,data-contracts,data-platform,ingestion,lakehouse
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Database
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: eval-type-backport>=0.2
|
|
26
|
+
Requires-Dist: pydantic>=2.7
|
|
27
|
+
Requires-Dist: pyyaml>=6
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="docs/assets/logo/contractforge-logo.png" alt="ContractForge" width="520">
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
# ContractForge
|
|
37
|
+
|
|
38
|
+
**Define ingestion intent once. Run it natively anywhere.**
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="https://github.com/marquesantero/contractforge-core/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/marquesantero/contractforge-core/actions/workflows/ci.yml/badge.svg"></a>
|
|
42
|
+
<a href="https://github.com/marquesantero/contractforge-core"><img alt="Product" src="https://img.shields.io/badge/product-ContractForge-0B5FFF"></a>
|
|
43
|
+
<a href="https://marquesantero.github.io/contractforge-core/"><img alt="Documentation" src="https://img.shields.io/badge/docs-online-2EA44F"></a>
|
|
44
|
+
<a href="https://github.com/marquesantero/contractforge-core/tree/main/src/contractforge_core"><img alt="Core" src="https://img.shields.io/badge/core-contractforge--core-1F6FEB"></a>
|
|
45
|
+
<a href="https://github.com/marquesantero/contractforge-core/tree/main/adapters/databricks"><img alt="Databricks adapter" src="https://img.shields.io/badge/adapter-databricks-FF7A00"></a>
|
|
46
|
+
<a href="https://github.com/marquesantero/contractforge-core/tree/main/adapters/aws"><img alt="AWS adapter" src="https://img.shields.io/badge/adapter-aws-232F3E"></a>
|
|
47
|
+
<a href="https://github.com/marquesantero/contractforge-core/tree/main/ai"><img alt="ContractForge AI" src="https://img.shields.io/badge/ai-contractforge--ai-7B3FE4"></a>
|
|
48
|
+
<img alt="Python" src="https://img.shields.io/badge/python-%3E%3D3.10-blue">
|
|
49
|
+
<a href="LICENSE"><img alt="License" src="https://img.shields.io/github/license/marquesantero/contractforge-core"></a>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
<p align="center">
|
|
53
|
+
<a href="https://marquesantero.github.io/contractforge-core/">Documentation</a>
|
|
54
|
+
·
|
|
55
|
+
<a href="docs/quickstart.md">Quick Start</a>
|
|
56
|
+
·
|
|
57
|
+
<a href="docs/adapters.md">Adapters</a>
|
|
58
|
+
·
|
|
59
|
+
<a href="ai/README.md">ContractForge AI</a>
|
|
60
|
+
·
|
|
61
|
+
<a href="docs/roadmap.md">Roadmap</a>
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
ContractForge is a multi-runtime, contract-first ingestion platform. It turns
|
|
65
|
+
governed ingestion intent into native platform execution and evidence while
|
|
66
|
+
keeping the contract vocabulary stable across Databricks, AWS and future
|
|
67
|
+
adapters.
|
|
68
|
+
|
|
69
|
+
The product remains **ContractForge**. `contractforge-core`,
|
|
70
|
+
`contractforge-databricks`, `contractforge-aws` and `contractforge-ai` are
|
|
71
|
+
functional package boundaries, not separate products.
|
|
72
|
+
|
|
73
|
+
It is built for data consultants, platform teams and engineering groups that
|
|
74
|
+
need repeatable governed ingestion across different client runtimes without
|
|
75
|
+
rewriting the framework for every platform.
|
|
76
|
+
|
|
77
|
+
<p align="center">
|
|
78
|
+
<img src="docs/assets/diagrams/contractforge-flow.svg" alt="ContractForge flow from contract to semantic core, capability matcher, platform adapter and native artifacts" width="900">
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
## Why ContractForge
|
|
82
|
+
|
|
83
|
+
| Capability | What it means |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| Contract-first ingestion | Source, target, write mode, schema policy, transforms, quality, access, operations and evidence live in reviewed YAML contracts. |
|
|
86
|
+
| Honest portability | The planner returns `SUPPORTED`, `SUPPORTED_WITH_WARNINGS`, `REVIEW_REQUIRED` or `UNSUPPORTED`; it does not silently downgrade semantics. |
|
|
87
|
+
| Native adapters | Databricks and AWS translate the same intent into native runtime behavior instead of forcing a lowest-common-denominator engine. |
|
|
88
|
+
| Evidence as product surface | Runs, errors, quality, quarantine, schema changes, lineage, governance actions and cost signals are tracked consistently. |
|
|
89
|
+
| Reusable connections | Shared `connection.yaml` files centralize connector defaults; ingestion contracts override only dataset-specific fields. |
|
|
90
|
+
| AI-assisted project design | ContractForge AI turns prompts and schemas into reviewable projects, then validates them through Core and adapter planners. |
|
|
91
|
+
|
|
92
|
+
ContractForge is not a scheduler, a dbt replacement, a closed ingestion runtime
|
|
93
|
+
or a universal Spark wrapper. It is the semantic contract and adapter layer for
|
|
94
|
+
repeatable governed ingestion.
|
|
95
|
+
|
|
96
|
+
## How It Works
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
Contract YAML
|
|
100
|
+
-> Semantic Core
|
|
101
|
+
-> Capability Matcher
|
|
102
|
+
-> Abstract Execution Plan
|
|
103
|
+
-> Platform Adapter
|
|
104
|
+
-> Native Runtime + Evidence
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The core owns portable semantics. Adapters own platform behavior.
|
|
108
|
+
The core does not import Spark, Databricks SDK, boto3, Azure SDK, Fabric SDK or Snowflake clients.
|
|
109
|
+
|
|
110
|
+
## See It In 30 Seconds
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
source:
|
|
114
|
+
type: incremental_files
|
|
115
|
+
path: s3://landing/orders
|
|
116
|
+
format: json
|
|
117
|
+
|
|
118
|
+
target:
|
|
119
|
+
catalog: main
|
|
120
|
+
schema: bronze
|
|
121
|
+
table: orders
|
|
122
|
+
|
|
123
|
+
mode: scd0_append
|
|
124
|
+
schema_policy: additive_only
|
|
125
|
+
quality_rules:
|
|
126
|
+
not_null: [order_id]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Core planning result:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
SUPPORTED
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The Databricks adapter may render Delta/Auto Loader/Asset Bundle artifacts. The
|
|
136
|
+
AWS adapter may render and deploy Glue Spark/Iceberg artifacts. Another adapter
|
|
137
|
+
may return `SUPPORTED_WITH_WARNINGS`, `REVIEW_REQUIRED` or `UNSUPPORTED` if it
|
|
138
|
+
cannot preserve the same semantics safely.
|
|
139
|
+
|
|
140
|
+
## Status And Roadmap
|
|
141
|
+
|
|
142
|
+
| Area | Status | Notes |
|
|
143
|
+
| --- | --- | --- |
|
|
144
|
+
| Core semantic model | Active | Contract models, semantic normalization, capability matching, abstract planning and evidence models are implemented. |
|
|
145
|
+
| Databricks adapter | Reference implementation | Delta, Unity Catalog, Auto Loader, Lakeflow planning, Asset Bundles, control tables, quality, governance, lineage, cost and dashboards are implemented inside the adapter boundary. |
|
|
146
|
+
| AWS adapter | Alpha with real E2E validation | Glue Spark/Iceberg planning, source support, quality/evidence, Lake Formation review/apply helpers, annotations, operations, S3 artifact publication, one-command Glue deployment and Glue job helper APIs are implemented. |
|
|
147
|
+
| ContractForge AI | Active | Deterministic review, project generation, diagnostics, provider routing and optional model-backed enrichment over the same core contract semantics. |
|
|
148
|
+
| Snowflake adapter | Alpha with real Snowflake validation | SQL warehouse runtime, hosted Snowpark procedure library runner, table/staged-file/SQL sources, write modes, quality, schema policy, governance, evidence, lineage and cost reconciliation are implemented and live-smoked. |
|
|
149
|
+
| Fabric adapter | Planned | Future adapters must depend on the core and declare platform capabilities explicitly. |
|
|
150
|
+
|
|
151
|
+
See [roadmap](docs/roadmap.md) for adapter maturity and release criteria.
|
|
152
|
+
|
|
153
|
+
## Compared With Alternatives
|
|
154
|
+
|
|
155
|
+
| Alternative | Difference |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| dbt | dbt models data after it lands. ContractForge defines how governed data arrives, is written, validated and evidenced. |
|
|
158
|
+
| Airbyte/Fivetran | They provide managed ingestion runtimes. ContractForge provides the contract and lets adapters execute natively in your platform. |
|
|
159
|
+
| Data contract tools | Validation is one slice. ContractForge covers source, write semantics, schema policy, quality, governance, evidence and native execution artifacts. |
|
|
160
|
+
| Platform-specific frameworks | ContractForge keeps platform implementations in adapters so the same semantics can be evaluated for other runtimes. |
|
|
161
|
+
|
|
162
|
+
## Install
|
|
163
|
+
|
|
164
|
+
From GitHub:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
pip install "git+https://github.com/marquesantero/contractforge-core.git"
|
|
168
|
+
pip install "git+https://github.com/marquesantero/contractforge-core.git#subdirectory=adapters/databricks"
|
|
169
|
+
pip install "git+https://github.com/marquesantero/contractforge-core.git#subdirectory=adapters/aws"
|
|
170
|
+
pip install "git+https://github.com/marquesantero/contractforge-core.git#subdirectory=adapters/snowflake"
|
|
171
|
+
pip install "git+https://github.com/marquesantero/contractforge-core.git#subdirectory=ai"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Local development:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
uv sync --all-extras
|
|
178
|
+
uv run pytest
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Build wheels independently:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
uv build --wheel
|
|
185
|
+
cd adapters/databricks && uv build --wheel
|
|
186
|
+
cd ../aws && uv build --wheel
|
|
187
|
+
cd ../snowflake && uv build --wheel
|
|
188
|
+
cd ../../ai && uv build --wheel
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Release package names:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
pip install contractforge-core contractforge-databricks contractforge-aws contractforge-snowflake contractforge-ai
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Project Shape
|
|
198
|
+
|
|
199
|
+
A complete ContractForge project keeps runtime concerns separate from contract
|
|
200
|
+
semantics:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
project.yaml
|
|
204
|
+
environments/
|
|
205
|
+
databricks.environment.yaml
|
|
206
|
+
aws.environment.yaml
|
|
207
|
+
connections/
|
|
208
|
+
supabase.yaml
|
|
209
|
+
contracts/
|
|
210
|
+
bronze/
|
|
211
|
+
b_products/
|
|
212
|
+
b_products.ingestion.yaml
|
|
213
|
+
b_products.annotations.yaml
|
|
214
|
+
b_products.operations.yaml
|
|
215
|
+
b_products.access.yaml
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Example shared connection:
|
|
219
|
+
|
|
220
|
+
```yaml
|
|
221
|
+
source:
|
|
222
|
+
type: connector
|
|
223
|
+
connector: postgres
|
|
224
|
+
system: supabase
|
|
225
|
+
options:
|
|
226
|
+
url: "{{ secret:supabase/jdbc_url }}"
|
|
227
|
+
auth:
|
|
228
|
+
type: basic
|
|
229
|
+
username: "{{ secret:supabase/user }}"
|
|
230
|
+
password: "{{ secret:supabase/password }}"
|
|
231
|
+
read:
|
|
232
|
+
fetchsize: 20000
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Example ingestion override:
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
source:
|
|
239
|
+
type: connection
|
|
240
|
+
connection_path: project://connections/supabase.yaml
|
|
241
|
+
table: public.products
|
|
242
|
+
read:
|
|
243
|
+
partition_column: product_id
|
|
244
|
+
num_partitions: 8
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
The core resolves the connection before adapters plan or execute. Ingestion
|
|
248
|
+
values override global connection defaults.
|
|
249
|
+
|
|
250
|
+
## Platform Adapters
|
|
251
|
+
|
|
252
|
+
| Adapter | Package | Status | Native responsibilities |
|
|
253
|
+
| --- | --- | --- | --- |
|
|
254
|
+
| Databricks | `contractforge-databricks` | Reference implementation | Delta, Unity Catalog, Auto Loader, Lakeflow planning, Jobs, Asset Bundles, control tables, governance, lineage, cost and dashboards. |
|
|
255
|
+
| AWS | `contractforge-aws` | Alpha with real E2E validation | Glue Spark, Iceberg, Glue Catalog, Lake Formation review/apply helpers, S3 artifacts, Glue jobs, Athena/Iceberg evidence and cost records. |
|
|
256
|
+
| Fabric | `contractforge-fabric` | Planned | OneLake, Lakehouse tables, Data Pipelines, Dataflow Gen2 and Purview/Fabric metadata. |
|
|
257
|
+
| Snowflake | `contractforge-snowflake` | Alpha with real Snowflake validation | SQL warehouse runtime, hosted Snowpark procedure library runner with staged ZIP imports, table/staged-file/SQL sources, append/overwrite/upsert/hash-diff writes, quality, schema policy, governance, evidence/control tables, lineage, cost reconciliation and project deployment. Task graph live smoke still needs task grants. See [Snowflake adapter guide](docs/adapters/snowflake.md). |
|
|
258
|
+
|
|
259
|
+
Use the same project model for adapter deployment:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
contractforge-databricks deploy-project examples/real-world/supabase-jdbc-medallion/project.yaml --target dev
|
|
263
|
+
contractforge-aws deploy-project examples/real-world/supabase-jdbc-medallion/project.yaml --dry-run --summary-only
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## ContractForge AI
|
|
267
|
+
|
|
268
|
+
ContractForge AI is the planning and review companion. It can generate project
|
|
269
|
+
scaffolds from prompts and schemas, validate project folders, compare adapter
|
|
270
|
+
planning and produce clear HTML approval reports.
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
contractforge-ai guided-project \
|
|
274
|
+
--intent "Create a Supabase medallion project for AWS and Databricks daily at 6 Sao Paulo time." \
|
|
275
|
+
--schema schemas/products.json \
|
|
276
|
+
--target contractforge-yaml \
|
|
277
|
+
--allow-review-required \
|
|
278
|
+
--output-dir generated/supabase
|
|
279
|
+
|
|
280
|
+
contractforge-ai validate-project-structure generated/supabase \
|
|
281
|
+
--adapter databricks \
|
|
282
|
+
--adapter aws \
|
|
283
|
+
--format html > generated/supabase/project_validation.html
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Model providers are optional. Deterministic validation and adapter planners
|
|
287
|
+
remain the source of truth; providers can explain or enrich, but they cannot
|
|
288
|
+
invent support status.
|
|
289
|
+
|
|
290
|
+
## Core Planning Example
|
|
291
|
+
|
|
292
|
+
```python
|
|
293
|
+
from contractforge_core.capabilities import PlatformCapabilities
|
|
294
|
+
from contractforge_core.contracts import semantic_contract_from_mapping, validate_contract
|
|
295
|
+
from contractforge_core.planner import plan_contract
|
|
296
|
+
|
|
297
|
+
contract = validate_contract(
|
|
298
|
+
{
|
|
299
|
+
"source": {"type": "incremental_files", "path": "s3://landing/orders", "format": "json"},
|
|
300
|
+
"target": {"catalog": "main", "schema": "bronze", "table": "orders"},
|
|
301
|
+
"mode": "scd0_append",
|
|
302
|
+
"schema_policy": "additive_only",
|
|
303
|
+
"quality_rules": {"not_null": ["order_id"]},
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
semantic = semantic_contract_from_mapping(contract)
|
|
308
|
+
capabilities = PlatformCapabilities(
|
|
309
|
+
platform="example",
|
|
310
|
+
supports_append=True,
|
|
311
|
+
supports_overwrite=True,
|
|
312
|
+
supports_merge=False,
|
|
313
|
+
evidence_stores=("audit_tables",),
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
result = plan_contract(semantic, capabilities)
|
|
317
|
+
print(result.status)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Package Boundaries
|
|
321
|
+
|
|
322
|
+
| Layer | Package | Responsibility |
|
|
323
|
+
| --- | --- | --- |
|
|
324
|
+
| Semantic core | `contractforge-core` | Contract models, validation, semantic normalization, capability matching, abstract plans, portability diagnostics and neutral evidence models. |
|
|
325
|
+
| Databricks adapter | `contractforge-databricks` | Databricks capabilities, rendering, runtime execution, governance, evidence filling and deployment helpers. |
|
|
326
|
+
| AWS adapter | `contractforge-aws` | AWS capabilities, Glue/Iceberg planning, runtime helpers, S3 publication, deployment helpers and evidence filling. |
|
|
327
|
+
| AI companion | `contractforge-ai` | Deterministic review, project generation, diagnostics, provider routing, report generation and optional model-backed enrichment. |
|
|
328
|
+
|
|
329
|
+
Publication stays split: each package builds its own wheel and future adapters
|
|
330
|
+
depend explicitly on `contractforge-core`.
|
|
331
|
+
|
|
332
|
+
The core wheel owns only `contractforge_core`; adapter wheels such as `contractforge-databricks` own their adapter package and depend explicitly on the core.
|
|
333
|
+
|
|
334
|
+
See [publication packaging](docs/specs/publication-packaging.md).
|
|
335
|
+
|
|
336
|
+
## Documentation
|
|
337
|
+
|
|
338
|
+
| Topic | Link |
|
|
339
|
+
| --- | --- |
|
|
340
|
+
| Online site | [marquesantero.github.io/contractforge-core](https://marquesantero.github.io/contractforge-core/) |
|
|
341
|
+
| Documentation index | [docs/README.md](docs/README.md) |
|
|
342
|
+
| Quick start | [docs/quickstart.md](docs/quickstart.md) |
|
|
343
|
+
| Architecture | [docs/architecture.md](docs/architecture.md) |
|
|
344
|
+
| Contracts | [docs/contracts.md](docs/contracts.md) |
|
|
345
|
+
| Project YAML | [docs/project-yaml.md](docs/project-yaml.md) |
|
|
346
|
+
| Connection YAML | [docs/connection-yaml.md](docs/connection-yaml.md) |
|
|
347
|
+
| Adapters | [docs/adapters.md](docs/adapters.md) |
|
|
348
|
+
| Databricks adapter | [docs/databricks.md](docs/databricks.md) |
|
|
349
|
+
| AWS adapter | [docs/adapters/aws.md](docs/adapters/aws.md) |
|
|
350
|
+
| Test contracts across adapters | [docs/adapters/test-contracts-across-adapters.md](docs/adapters/test-contracts-across-adapters.md) |
|
|
351
|
+
| Connectors | [docs/connectors.md](docs/connectors.md) |
|
|
352
|
+
| Operations and evidence | [docs/operations.md](docs/operations.md) |
|
|
353
|
+
| ContractForge AI | [ai/README.md](ai/README.md) |
|
|
354
|
+
| Security | [docs/security.md](docs/security.md) |
|
|
355
|
+
| Adapter authoring | [docs/specs/adapter-authoring.md](docs/specs/adapter-authoring.md) |
|
|
356
|
+
|
|
357
|
+
Architecture contracts live under [docs/specs](docs/specs/), and decisions live
|
|
358
|
+
under [docs/adrs](docs/adrs/).
|
|
359
|
+
|
|
360
|
+
## Non-Goals
|
|
361
|
+
|
|
362
|
+
ContractForge is not:
|
|
363
|
+
|
|
364
|
+
- a scheduler;
|
|
365
|
+
- a universal Spark wrapper;
|
|
366
|
+
- a replacement for Databricks, Glue, Fabric, Snowflake or other runtimes;
|
|
367
|
+
- a promise that every contract runs everywhere;
|
|
368
|
+
- a dbt replacement;
|
|
369
|
+
- an orchestration engine;
|
|
370
|
+
- a GUI product in the core.
|
|
371
|
+
|
|
372
|
+
## License
|
|
373
|
+
|
|
374
|
+
MIT. See [LICENSE](LICENSE).
|