martenweave-core 0.4.1__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.
Files changed (218) hide show
  1. martenweave_core-0.4.1/LICENSE +21 -0
  2. martenweave_core-0.4.1/PKG-INFO +317 -0
  3. martenweave_core-0.4.1/README.md +274 -0
  4. martenweave_core-0.4.1/pyproject.toml +95 -0
  5. martenweave_core-0.4.1/setup.cfg +4 -0
  6. martenweave_core-0.4.1/src/martenweave_core.egg-info/PKG-INFO +317 -0
  7. martenweave_core-0.4.1/src/martenweave_core.egg-info/SOURCES.txt +216 -0
  8. martenweave_core-0.4.1/src/martenweave_core.egg-info/dependency_links.txt +1 -0
  9. martenweave_core-0.4.1/src/martenweave_core.egg-info/entry_points.txt +2 -0
  10. martenweave_core-0.4.1/src/martenweave_core.egg-info/requires.txt +21 -0
  11. martenweave_core-0.4.1/src/martenweave_core.egg-info/top_level.txt +1 -0
  12. martenweave_core-0.4.1/src/modelops_core/__init__.py +5 -0
  13. martenweave_core-0.4.1/src/modelops_core/__version__.py +3 -0
  14. martenweave_core-0.4.1/src/modelops_core/ai/__init__.py +27 -0
  15. martenweave_core-0.4.1/src/modelops_core/ai/context_builder.py +338 -0
  16. martenweave_core-0.4.1/src/modelops_core/ai/google_adk/__init__.py +78 -0
  17. martenweave_core-0.4.1/src/modelops_core/ai/google_adk/agent.py +58 -0
  18. martenweave_core-0.4.1/src/modelops_core/ai/google_adk/tools.py +335 -0
  19. martenweave_core-0.4.1/src/modelops_core/ai/kimi_adapter.py +208 -0
  20. martenweave_core-0.4.1/src/modelops_core/ai/patch_proposal_service.py +96 -0
  21. martenweave_core-0.4.1/src/modelops_core/ai/prompt_registry.py +130 -0
  22. martenweave_core-0.4.1/src/modelops_core/ai/provider_adapter.py +162 -0
  23. martenweave_core-0.4.1/src/modelops_core/api/__init__.py +5 -0
  24. martenweave_core-0.4.1/src/modelops_core/api/app.py +383 -0
  25. martenweave_core-0.4.1/src/modelops_core/approval/__init__.py +15 -0
  26. martenweave_core-0.4.1/src/modelops_core/approval/risk_service.py +241 -0
  27. martenweave_core-0.4.1/src/modelops_core/assessment/__init__.py +13 -0
  28. martenweave_core-0.4.1/src/modelops_core/assessment/assessment_service.py +447 -0
  29. martenweave_core-0.4.1/src/modelops_core/bundle/__init__.py +7 -0
  30. martenweave_core-0.4.1/src/modelops_core/bundle/git_bundle_service.py +285 -0
  31. martenweave_core-0.4.1/src/modelops_core/change_request/__init__.py +23 -0
  32. martenweave_core-0.4.1/src/modelops_core/change_request/service.py +330 -0
  33. martenweave_core-0.4.1/src/modelops_core/cli.py +5621 -0
  34. martenweave_core-0.4.1/src/modelops_core/config.py +127 -0
  35. martenweave_core-0.4.1/src/modelops_core/connectors/__init__.py +23 -0
  36. martenweave_core-0.4.1/src/modelops_core/connectors/adapter.py +90 -0
  37. martenweave_core-0.4.1/src/modelops_core/connectors/github.py +283 -0
  38. martenweave_core-0.4.1/src/modelops_core/connectors/google_drive.py +218 -0
  39. martenweave_core-0.4.1/src/modelops_core/connectors/google_sheets.py +313 -0
  40. martenweave_core-0.4.1/src/modelops_core/connectors/local_file.py +127 -0
  41. martenweave_core-0.4.1/src/modelops_core/diff/__init__.py +17 -0
  42. martenweave_core-0.4.1/src/modelops_core/diff/diff_service.py +162 -0
  43. martenweave_core-0.4.1/src/modelops_core/docs/static_doc_generator.py +211 -0
  44. martenweave_core-0.4.1/src/modelops_core/domain_packs/__init__.py +33 -0
  45. martenweave_core-0.4.1/src/modelops_core/domain_packs/base.py +46 -0
  46. martenweave_core-0.4.1/src/modelops_core/domain_packs/sap.py +112 -0
  47. martenweave_core-0.4.1/src/modelops_core/errors.py +40 -0
  48. martenweave_core-0.4.1/src/modelops_core/exports/__init__.py +11 -0
  49. martenweave_core-0.4.1/src/modelops_core/exports/export_service.py +433 -0
  50. martenweave_core-0.4.1/src/modelops_core/exports/github_publish_service.py +166 -0
  51. martenweave_core-0.4.1/src/modelops_core/exports/google_sheets_export.py +137 -0
  52. martenweave_core-0.4.1/src/modelops_core/exports/schema_export_service.py +61 -0
  53. martenweave_core-0.4.1/src/modelops_core/fixtures/__init__.py +8 -0
  54. martenweave_core-0.4.1/src/modelops_core/fixtures/fixture_generator.py +224 -0
  55. martenweave_core-0.4.1/src/modelops_core/gaps/__init__.py +9 -0
  56. martenweave_core-0.4.1/src/modelops_core/gaps/gap_detection.py +381 -0
  57. martenweave_core-0.4.1/src/modelops_core/guardrails/__init__.py +24 -0
  58. martenweave_core-0.4.1/src/modelops_core/guardrails/config_guard.py +368 -0
  59. martenweave_core-0.4.1/src/modelops_core/guardrails/secrets.py +291 -0
  60. martenweave_core-0.4.1/src/modelops_core/impact/__init__.py +5 -0
  61. martenweave_core-0.4.1/src/modelops_core/impact/impact_report.py +146 -0
  62. martenweave_core-0.4.1/src/modelops_core/impact/impact_service.py +111 -0
  63. martenweave_core-0.4.1/src/modelops_core/impact/proposal_impact_service.py +151 -0
  64. martenweave_core-0.4.1/src/modelops_core/imports/__init__.py +23 -0
  65. martenweave_core-0.4.1/src/modelops_core/imports/dataset_profiler.py +382 -0
  66. martenweave_core-0.4.1/src/modelops_core/imports/google_sheets_import_service.py +112 -0
  67. martenweave_core-0.4.1/src/modelops_core/imports/import_session.py +69 -0
  68. martenweave_core-0.4.1/src/modelops_core/imports/model_inference_service.py +266 -0
  69. martenweave_core-0.4.1/src/modelops_core/imports/model_sheet_import_service.py +341 -0
  70. martenweave_core-0.4.1/src/modelops_core/imports/privacy.py +136 -0
  71. martenweave_core-0.4.1/src/modelops_core/index/__init__.py +5 -0
  72. martenweave_core-0.4.1/src/modelops_core/index/lineage_edges.py +33 -0
  73. martenweave_core-0.4.1/src/modelops_core/index/queries.py +71 -0
  74. martenweave_core-0.4.1/src/modelops_core/index/query_service.py +308 -0
  75. martenweave_core-0.4.1/src/modelops_core/index/search_documents.py +35 -0
  76. martenweave_core-0.4.1/src/modelops_core/index/sqlite_builder.py +313 -0
  77. martenweave_core-0.4.1/src/modelops_core/issue_draft/__init__.py +19 -0
  78. martenweave_core-0.4.1/src/modelops_core/issue_draft/draft_service.py +363 -0
  79. martenweave_core-0.4.1/src/modelops_core/lineage/__init__.py +5 -0
  80. martenweave_core-0.4.1/src/modelops_core/lineage/edge_model.py +31 -0
  81. martenweave_core-0.4.1/src/modelops_core/lineage/lineage_service.py +86 -0
  82. martenweave_core-0.4.1/src/modelops_core/mcp_server.py +826 -0
  83. martenweave_core-0.4.1/src/modelops_core/notifications/__init__.py +23 -0
  84. martenweave_core-0.4.1/src/modelops_core/notifications/event_service.py +135 -0
  85. martenweave_core-0.4.1/src/modelops_core/notifications/preview_service.py +198 -0
  86. martenweave_core-0.4.1/src/modelops_core/patching/__init__.py +21 -0
  87. martenweave_core-0.4.1/src/modelops_core/patching/apply_service.py +819 -0
  88. martenweave_core-0.4.1/src/modelops_core/patching/change_request_service.py +167 -0
  89. martenweave_core-0.4.1/src/modelops_core/patching/change_request_validator.py +94 -0
  90. martenweave_core-0.4.1/src/modelops_core/patching/patch_model.py +42 -0
  91. martenweave_core-0.4.1/src/modelops_core/patching/patch_proposal_service.py +149 -0
  92. martenweave_core-0.4.1/src/modelops_core/patching/patch_validator.py +280 -0
  93. martenweave_core-0.4.1/src/modelops_core/paths.py +41 -0
  94. martenweave_core-0.4.1/src/modelops_core/reports/__init__.py +6 -0
  95. martenweave_core-0.4.1/src/modelops_core/reports/analysis_service.py +319 -0
  96. martenweave_core-0.4.1/src/modelops_core/reports/audit_service.py +166 -0
  97. martenweave_core-0.4.1/src/modelops_core/reports/decisions_report.py +158 -0
  98. martenweave_core-0.4.1/src/modelops_core/reports/gap_summary.py +243 -0
  99. martenweave_core-0.4.1/src/modelops_core/reports/health_report.py +319 -0
  100. martenweave_core-0.4.1/src/modelops_core/reports/index_freshness.py +174 -0
  101. martenweave_core-0.4.1/src/modelops_core/reports/ownership_report.py +133 -0
  102. martenweave_core-0.4.1/src/modelops_core/reports/scorecard_service.py +629 -0
  103. martenweave_core-0.4.1/src/modelops_core/reports/source_registry_service.py +132 -0
  104. martenweave_core-0.4.1/src/modelops_core/reports/usage_report_service.py +67 -0
  105. martenweave_core-0.4.1/src/modelops_core/repository/__init__.py +6 -0
  106. martenweave_core-0.4.1/src/modelops_core/repository/parser.py +185 -0
  107. martenweave_core-0.4.1/src/modelops_core/repository/scanner.py +58 -0
  108. martenweave_core-0.4.1/src/modelops_core/schemas/__init__.py +29 -0
  109. martenweave_core-0.4.1/src/modelops_core/schemas/change_request.py +21 -0
  110. martenweave_core-0.4.1/src/modelops_core/schemas/common.py +115 -0
  111. martenweave_core-0.4.1/src/modelops_core/schemas/decision.py +16 -0
  112. martenweave_core-0.4.1/src/modelops_core/schemas/domain.py +253 -0
  113. martenweave_core-0.4.1/src/modelops_core/schemas/issue.py +28 -0
  114. martenweave_core-0.4.1/src/modelops_core/schemas/migration.py +123 -0
  115. martenweave_core-0.4.1/src/modelops_core/schemas/object_models.py +77 -0
  116. martenweave_core-0.4.1/src/modelops_core/schemas/patch_proposal.py +58 -0
  117. martenweave_core-0.4.1/src/modelops_core/schemas/registry.py +556 -0
  118. martenweave_core-0.4.1/src/modelops_core/schemas/source_registry.py +54 -0
  119. martenweave_core-0.4.1/src/modelops_core/schemas/versioning.py +191 -0
  120. martenweave_core-0.4.1/src/modelops_core/telemetry/__init__.py +276 -0
  121. martenweave_core-0.4.1/src/modelops_core/telemetry/ai_usage.py +308 -0
  122. martenweave_core-0.4.1/src/modelops_core/trace/__init__.py +7 -0
  123. martenweave_core-0.4.1/src/modelops_core/trace/trace_service.py +183 -0
  124. martenweave_core-0.4.1/src/modelops_core/validation/__init__.py +11 -0
  125. martenweave_core-0.4.1/src/modelops_core/validation/pipeline.py +1251 -0
  126. martenweave_core-0.4.1/src/modelops_core/validation/result.py +70 -0
  127. martenweave_core-0.4.1/tests/test_ai_patch_proposal_service.py +401 -0
  128. martenweave_core-0.4.1/tests/test_ai_usage_telemetry.py +243 -0
  129. martenweave_core-0.4.1/tests/test_analysis_service.py +193 -0
  130. martenweave_core-0.4.1/tests/test_api.py +428 -0
  131. martenweave_core-0.4.1/tests/test_approval_gates.py +875 -0
  132. martenweave_core-0.4.1/tests/test_assessment_package.py +87 -0
  133. martenweave_core-0.4.1/tests/test_audit_log.py +257 -0
  134. martenweave_core-0.4.1/tests/test_business_entity_hierarchy.py +131 -0
  135. martenweave_core-0.4.1/tests/test_change_request_cli.py +1301 -0
  136. martenweave_core-0.4.1/tests/test_change_request_service.py +104 -0
  137. martenweave_core-0.4.1/tests/test_change_request_validator.py +98 -0
  138. martenweave_core-0.4.1/tests/test_clean_command.py +135 -0
  139. martenweave_core-0.4.1/tests/test_cli.py +353 -0
  140. martenweave_core-0.4.1/tests/test_cli_contracts.py +1276 -0
  141. martenweave_core-0.4.1/tests/test_cli_structure.py +149 -0
  142. martenweave_core-0.4.1/tests/test_config.py +283 -0
  143. martenweave_core-0.4.1/tests/test_connectors.py +185 -0
  144. martenweave_core-0.4.1/tests/test_context_builder.py +174 -0
  145. martenweave_core-0.4.1/tests/test_dataset_profiler.py +133 -0
  146. martenweave_core-0.4.1/tests/test_decisions_cli.py +103 -0
  147. martenweave_core-0.4.1/tests/test_decisions_report.py +322 -0
  148. martenweave_core-0.4.1/tests/test_diff.py +219 -0
  149. martenweave_core-0.4.1/tests/test_docs_build.py +167 -0
  150. martenweave_core-0.4.1/tests/test_domain_packs.py +73 -0
  151. martenweave_core-0.4.1/tests/test_e2e_demo.py +185 -0
  152. martenweave_core-0.4.1/tests/test_e2e_proposal_full_lifecycle.py +189 -0
  153. martenweave_core-0.4.1/tests/test_e2e_proposal_lifecycle.py +343 -0
  154. martenweave_core-0.4.1/tests/test_export_model.py +250 -0
  155. martenweave_core-0.4.1/tests/test_export_schema.py +149 -0
  156. martenweave_core-0.4.1/tests/test_field_usage_scope.py +87 -0
  157. martenweave_core-0.4.1/tests/test_fixture_factories.py +93 -0
  158. martenweave_core-0.4.1/tests/test_fixture_generator.py +83 -0
  159. martenweave_core-0.4.1/tests/test_gap_summary_report.py +138 -0
  160. martenweave_core-0.4.1/tests/test_gaps.py +1309 -0
  161. martenweave_core-0.4.1/tests/test_git_bundle.py +151 -0
  162. martenweave_core-0.4.1/tests/test_github_write_integration.py +321 -0
  163. martenweave_core-0.4.1/tests/test_google_adk.py +194 -0
  164. martenweave_core-0.4.1/tests/test_google_drive_import.py +348 -0
  165. martenweave_core-0.4.1/tests/test_google_sheets_export.py +363 -0
  166. martenweave_core-0.4.1/tests/test_google_sheets_import.py +257 -0
  167. martenweave_core-0.4.1/tests/test_health_report_coverage.py +205 -0
  168. martenweave_core-0.4.1/tests/test_impact_report.py +94 -0
  169. martenweave_core-0.4.1/tests/test_impact_service.py +608 -0
  170. martenweave_core-0.4.1/tests/test_import_model_sheet.py +226 -0
  171. martenweave_core-0.4.1/tests/test_index_builder.py +128 -0
  172. martenweave_core-0.4.1/tests/test_index_fresh.py +422 -0
  173. martenweave_core-0.4.1/tests/test_issue_draft.py +287 -0
  174. martenweave_core-0.4.1/tests/test_kimi_adapter.py +216 -0
  175. martenweave_core-0.4.1/tests/test_lifecycle_summary.py +96 -0
  176. martenweave_core-0.4.1/tests/test_lineage_edge_model.py +49 -0
  177. martenweave_core-0.4.1/tests/test_lineage_edges.py +31 -0
  178. martenweave_core-0.4.1/tests/test_lov_governance.py +267 -0
  179. martenweave_core-0.4.1/tests/test_mcp_server.py +528 -0
  180. martenweave_core-0.4.1/tests/test_methodology_validation.py +547 -0
  181. martenweave_core-0.4.1/tests/test_model_inference.py +158 -0
  182. martenweave_core-0.4.1/tests/test_model_spine_templates.py +104 -0
  183. martenweave_core-0.4.1/tests/test_notification_events.py +226 -0
  184. martenweave_core-0.4.1/tests/test_notifications_preview.py +239 -0
  185. martenweave_core-0.4.1/tests/test_ownership.py +73 -0
  186. martenweave_core-0.4.1/tests/test_ownership_report.py +296 -0
  187. martenweave_core-0.4.1/tests/test_patch_apply.py +537 -0
  188. martenweave_core-0.4.1/tests/test_patch_proposal_validation.py +242 -0
  189. martenweave_core-0.4.1/tests/test_performance_smoke.py +37 -0
  190. martenweave_core-0.4.1/tests/test_privacy.py +142 -0
  191. martenweave_core-0.4.1/tests/test_prompt_registry.py +107 -0
  192. martenweave_core-0.4.1/tests/test_proposal_cli.py +1266 -0
  193. martenweave_core-0.4.1/tests/test_proposal_impact.py +226 -0
  194. martenweave_core-0.4.1/tests/test_proposal_lifecycle_report.py +202 -0
  195. martenweave_core-0.4.1/tests/test_proposal_review_bundle.py +167 -0
  196. martenweave_core-0.4.1/tests/test_provider_adapter.py +105 -0
  197. martenweave_core-0.4.1/tests/test_query_service.py +632 -0
  198. martenweave_core-0.4.1/tests/test_reference_validation.py +392 -0
  199. martenweave_core-0.4.1/tests/test_relationship_taxonomy.py +219 -0
  200. martenweave_core-0.4.1/tests/test_release_packaging.py +38 -0
  201. martenweave_core-0.4.1/tests/test_repository_parser.py +75 -0
  202. martenweave_core-0.4.1/tests/test_resource_limits.py +152 -0
  203. martenweave_core-0.4.1/tests/test_resource_regression.py +329 -0
  204. martenweave_core-0.4.1/tests/test_sap_context_validation.py +225 -0
  205. martenweave_core-0.4.1/tests/test_scanner.py +60 -0
  206. martenweave_core-0.4.1/tests/test_schema_validation.py +578 -0
  207. martenweave_core-0.4.1/tests/test_schema_versioning.py +282 -0
  208. martenweave_core-0.4.1/tests/test_scorecard.py +326 -0
  209. martenweave_core-0.4.1/tests/test_search_documents.py +96 -0
  210. martenweave_core-0.4.1/tests/test_secret_guardrails.py +427 -0
  211. martenweave_core-0.4.1/tests/test_simple_table_mode.py +106 -0
  212. martenweave_core-0.4.1/tests/test_smoke_demo.py +213 -0
  213. martenweave_core-0.4.1/tests/test_source_registry.py +218 -0
  214. martenweave_core-0.4.1/tests/test_system_lineage.py +260 -0
  215. martenweave_core-0.4.1/tests/test_telemetry.py +266 -0
  216. martenweave_core-0.4.1/tests/test_trace.py +155 -0
  217. martenweave_core-0.4.1/tests/test_usage_report.py +78 -0
  218. martenweave_core-0.4.1/tests/test_validation_result.py +85 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Martenweave 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,317 @@
1
+ Metadata-Version: 2.4
2
+ Name: martenweave-core
3
+ Version: 0.4.1
4
+ Summary: Backend-first agentic data model registry core.
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://martenweave.github.io/
7
+ Project-URL: Repository, https://github.com/metalhatscats/martenweave-core
8
+ Project-URL: Documentation, https://martenweave.github.io/docs.html
9
+ Project-URL: Issues, https://github.com/metalhatscats/martenweave-core/issues
10
+ Project-URL: Changelog, https://github.com/metalhatscats/martenweave-core/blob/main/CHANGELOG.md
11
+ Keywords: data-governance,data-quality,data-modeling,mdm,sap-migration,model-registry
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Information Technology
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Database
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: pydantic>=2.6
25
+ Requires-Dist: pyyaml>=6.0
26
+ Requires-Dist: typer>=0.12
27
+ Requires-Dist: rich>=13.0
28
+ Requires-Dist: openpyxl>=3.1
29
+ Requires-Dist: fastapi>=0.100
30
+ Requires-Dist: uvicorn>=0.23
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0; extra == "dev"
33
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
34
+ Requires-Dist: ruff>=0.4; extra == "dev"
35
+ Requires-Dist: build>=1.0; extra == "dev"
36
+ Requires-Dist: httpx>=0.24; extra == "dev"
37
+ Provides-Extra: google-adk
38
+ Requires-Dist: google-adk>=0.1.0; extra == "google-adk"
39
+ Requires-Dist: google-generativeai>=0.8.0; extra == "google-adk"
40
+ Provides-Extra: mcp
41
+ Requires-Dist: mcp>=1.0; extra == "mcp"
42
+ Dynamic: license-file
43
+
44
+ # martenweave-core
45
+
46
+ [![CI](https://github.com/metalhatscats/martenweave-core/actions/workflows/ci.yml/badge.svg)](https://github.com/metalhatscats/martenweave-core/actions/workflows/ci.yml)
47
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
48
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
49
+
50
+ Backend-first agentic data model registry.
51
+
52
+ Turns data models into a structured, traceable, validated, AI-ready model knowledge layer. This repository contains the canonical model registry, deterministic validation, generated SQLite index, safe AI patch proposals, and Git-friendly model files.
53
+
54
+ SAP migration and Master Data Management are the **first domain pack** and proof case, not the product boundary. The core works for generic data models: domains, entities, attributes, relationships, datasets, mappings, rules, evidence, decisions, and change proposals.
55
+
56
+ **No user-facing UI is included.** This is a CLI-driven, backend/core library designed to be embedded in pipelines, IDEs, local API processes, MCP servers, and agent workflows.
57
+
58
+ ## Status
59
+
60
+ - Current source version: `0.4.1`
61
+ - Package name: `martenweave-core`
62
+ - Public site and docs: <https://martenweave.github.io/>
63
+ - PyPI publishing is intentionally gated by the trusted-publisher release workflow. Until a package is published, install from source as shown below.
64
+
65
+ ## Core Principles
66
+
67
+ - **Canonical files are the source of truth.** Markdown + YAML frontmatter objects live in `model/`.
68
+ - **Generated index is disposable.** SQLite and JSONL outputs are rebuildable from canonical files.
69
+ - **Deterministic validation first.** Every object is validated for IDs, types, references, and domain context rules before indexing.
70
+ - **AI must not silently mutate.** AI creates `PatchProposal` objects for human review. Approved changes become `ChangeRequest`s.
71
+ - **Local-first.** No cloud dependencies, no SaaS lock-in.
72
+
73
+ ## What Martenweave is / is not
74
+
75
+ | Is | Is not |
76
+ |---|---|
77
+ | A backend-first model registry for data modeling, migration, and governance | A SAP-only tool |
78
+ | A canonical file store with generated indexes | A database-first MDM platform |
79
+ | A validator-gated, proposal-first editing workflow | A workflow engine |
80
+ | A local-first CLI and embeddable library | A SaaS platform |
81
+ | AI-assisted, with human approval required for changes | An autonomous AI agent that mutates models |
82
+
83
+ ## Quickstart
84
+
85
+ Martenweave Core requires Python 3.11+.
86
+
87
+ ### Install from Source
88
+
89
+ ```bash
90
+ git clone https://github.com/metalhatscats/martenweave-core.git
91
+ cd martenweave-core
92
+ python -m venv .venv
93
+ .venv/bin/python -m pip install -e ".[dev]"
94
+ .venv/bin/modelops --help
95
+ ```
96
+
97
+ ### Setup
98
+
99
+ Choose one style and use it throughout:
100
+
101
+ **Option A — use the venv executable directly (recommended for copy-paste):**
102
+ ```bash
103
+ python -m venv .venv
104
+ .venv/bin/python -m pip install -e .
105
+ # Then use .venv/bin/modelops for every command
106
+ ```
107
+
108
+ **Option B — activate the venv once:**
109
+ ```bash
110
+ python -m venv .venv
111
+ source .venv/bin/activate
112
+ pip install -e .
113
+ # Then use bare modelops for every command
114
+ ```
115
+
116
+ The examples below use Option A. Replace `.venv/bin/modelops` with `modelops` if you chose Option B.
117
+
118
+ ```bash
119
+ # Install
120
+ .venv/bin/python -m pip install -e .
121
+
122
+ # Scaffold a new repository
123
+ .venv/bin/modelops init ./my-model
124
+
125
+ # Validate canonical files
126
+ .venv/bin/modelops validate --repo ./my-model
127
+
128
+ # Build SQLite index + JSONL exports
129
+ .venv/bin/modelops build-index --repo ./my-model --jsonl
130
+
131
+ # Check index freshness
132
+ .venv/bin/modelops index-fresh --repo ./my-model
133
+
134
+ # Health report and scorecard
135
+ .venv/bin/modelops health --repo ./my-model
136
+ .venv/bin/modelops scorecard --repo ./my-model
137
+
138
+ # Impact and trace analysis
139
+ .venv/bin/modelops impact FEP-S4-KNVV-KDGRP --repo ./my-model
140
+ .venv/bin/modelops trace ATTR-CUST-SALES-CUSTOMER-GROUP --repo ./my-model
141
+
142
+ # Search and query
143
+ .venv/bin/modelops search "Customer Group" --repo ./my-model
144
+ .venv/bin/modelops query --type Attribute --repo ./my-model
145
+
146
+ # Diff against another repository
147
+ .venv/bin/modelops diff ./my-model ./other-model
148
+
149
+ # Propose a patch from a note
150
+ .venv/bin/modelops propose-patch --from ./note.md --repo ./my-model
151
+
152
+ # Clean generated artifacts (dry-run first)
153
+ .venv/bin/modelops clean --repo ./my-model --dry-run
154
+ ```
155
+
156
+ ## First 15 Minutes
157
+
158
+ For a step-by-step walkthrough using the included examples, see [docs/first-15-minutes.md](docs/first-15-minutes.md).
159
+
160
+ For a release-grade demo path that exercises validation, indexing, search, trace, impact, gaps, scorecards, and proposal dry-runs, see [docs/demo-quickstart-flow.md](docs/demo-quickstart-flow.md).
161
+
162
+ ## Command Reference
163
+
164
+ | Command | Purpose |
165
+ |---|---|
166
+ | `init` | Scaffold a new model repository |
167
+ | `profile-dataset` | Profile a CSV/XLSX dataset and save the profile |
168
+ | `gaps` | Detect dataset-to-model gaps against FieldEndpoints |
169
+ | `import-drive` | Import a CSV/XLSX file from Google Drive and profile it |
170
+ | `import-sheet` | Import a Google Sheet as a PatchProposal |
171
+ | `sources` | List registered external sources |
172
+ | `source-show` | Show one registered source |
173
+ | `infer-model` | Infer draft model objects from a dataset profile |
174
+ | `validate` | Run deterministic validation on canonical files |
175
+ | `build-index` | Build SQLite index and optional JSONL exports |
176
+ | `clean` | Remove generated artifacts from a repository |
177
+ | `index-fresh` | Check whether the generated index is stale |
178
+ | `health` | Show repository health report |
179
+ | `doctor` | Run diagnostics for version, config, paths, index freshness, and validation |
180
+ | `scorecard` | Show governance readiness scorecard |
181
+ | `owners` | Ownership coverage and steward workload |
182
+ | `analyze` | Analyze model completeness, risk, and readiness |
183
+ | `gap-report` | Consolidated gap summary across all sources |
184
+ | `trace` | Trace upstream/downstream relationships for an object |
185
+ | `impact` | Generate impact report for an object or proposal |
186
+ | `propose-patch` | Create a PatchProposal from a note |
187
+ | `serve` | Start the optional local API server |
188
+ | `mcp` | Start the optional MCP server for agent integration |
189
+ | `import-model-sheet` | Import spreadsheet edits as a PatchProposal |
190
+ | `export-model` | Export canonical objects to CSV or XLSX |
191
+ | `export-schema` | Export JSON Schema for canonical object types |
192
+ | `export-sheets` | Export canonical model objects to Google Sheets |
193
+ | `git-bundle` | Generate a GitHub-ready change bundle |
194
+ | `publish-issue` | Publish an issue draft to GitHub |
195
+ | `publish-pr` | Publish a git bundle as a GitHub pull request |
196
+ | `audit-log` | Query the append-only audit log |
197
+ | `usage-report` | Show aggregated usage report from telemetry |
198
+ | `docs-build` | Generate static Markdown docs from the index |
199
+ | `config-guard` | Scan for secrets and configuration guardrail issues |
200
+ | `diff` | Compare two model repositories |
201
+ | `search` | Search indexed objects by keyword |
202
+ | `query` | Run structured queries over the index |
203
+ | `migrate` | Migrate canonical objects to the current schema version |
204
+ | `issue-draft` | Generate GitHub-ready issue drafts |
205
+ | `change-request` | Create and manage ChangeRequests |
206
+ | `notifications` | Preview notification recipients |
207
+ | `decisions` | Browse and inspect Decision objects |
208
+ | `proposal` | Review and apply PatchProposals |
209
+ | `assessment` | Run migration model readiness assessment workflows |
210
+
211
+ `serve` and `mcp` are local integration surfaces for APIs, tools, and agents. They do not provide a
212
+ hosted product UI or browser application.
213
+
214
+ Use `--help` on any command for full options:
215
+
216
+ ```bash
217
+ .venv/bin/modelops <command> --help
218
+ ```
219
+
220
+ ### Assessment Example
221
+
222
+ ```bash
223
+ .venv/bin/modelops assessment run --repo examples/customer_bp_model --out generated/assessment/customer-bp
224
+ ```
225
+
226
+ ## Example Models
227
+
228
+ Both example directories contain a working `modelops.config.yaml` and can be run without `init`.
229
+
230
+ ### Customer / Business Partner Model
231
+
232
+ The `examples/customer_bp_model/` directory contains the first domain pack: a full canonical model slice for SAP Business Partner → Customer:
233
+
234
+ ```
235
+ Business Partner -> Customer -> Customer Sales Area -> Customer Group -> KNVV-KDGRP
236
+ ```
237
+
238
+ ### Supplier / Vendor Model
239
+
240
+ The `examples/supplier_vendor_model/` directory contains a second domain pack for SAP Supplier / Vendor master data:
241
+
242
+ ```
243
+ Supplier -> Vendor Central -> LFA1/KTOKK, LFB1/ZTERM, LFM1/SPERR
244
+ ```
245
+
246
+ Run validation against either:
247
+
248
+ ```bash
249
+ .venv/bin/modelops validate --repo examples/customer_bp_model
250
+ .venv/bin/modelops validate --repo examples/supplier_vendor_model
251
+ ```
252
+
253
+ ## Architecture
254
+
255
+ ```
256
+ modelops.config.yaml # Repository configuration
257
+ model/ # Canonical Markdown + YAML objects
258
+ DOMAIN-*.md
259
+ ENTITY-*.md
260
+ ATTR-*.md
261
+ FEP-*.md
262
+ MAP-*.md
263
+ ...
264
+ generated/ # Disposable artifacts
265
+ modelops.db # SQLite index
266
+ search_documents.jsonl # Search export
267
+ lineage_edges.jsonl # Lineage export
268
+ audit_events.jsonl # Audit log
269
+ usage_events.jsonl # Application usage telemetry
270
+ ai_usage_events.jsonl # AI provider usage telemetry
271
+ data/samples/ # Sample datasets for profiling
272
+ ```
273
+
274
+ ## Domain Rules (SAP example)
275
+
276
+ The first domain pack includes SAP-specific context rules:
277
+
278
+ - `Attribute` is business meaning.
279
+ - `FieldEndpoint` is physical representation.
280
+ - `AttributeUsage` links an `Attribute` to a specific business context.
281
+ - `Mapping` links source and target `FieldEndpoint`s.
282
+ - `KNVV` fields must be in `customer_sales_area` context.
283
+ - `KNB1` fields must be in `customer_company_code` context.
284
+ - `KNVP` fields must be in `customer_partner_function` context.
285
+ - `BUT000` fields must be in `bp_central` context.
286
+
287
+ Future domain packs can add their own validation rules without changing core concepts.
288
+
289
+ ## Documentation
290
+
291
+ See [docs/README.md](docs/README.md) for the full documentation index, including architecture docs, developer guides, product playbooks, and the Data Model Book.
292
+
293
+ ## Development
294
+
295
+ ```bash
296
+ # Run tests
297
+ .venv/bin/python -m pytest
298
+
299
+ # Lint
300
+ .venv/bin/python -m ruff check .
301
+
302
+ # Release smoke across bundled examples
303
+ bash scripts/release_smoke.sh
304
+ ```
305
+
306
+ Release and public-readiness docs:
307
+
308
+ - [docs/release-checklist.md](docs/release-checklist.md)
309
+ - [docs/release-notes-first-public-rc.md](docs/release-notes-first-public-rc.md)
310
+ - [docs/release-validation-evidence.md](docs/release-validation-evidence.md)
311
+ - [docs/open-source-readiness.md](docs/open-source-readiness.md)
312
+ - [docs/known-limitations.md](docs/known-limitations.md)
313
+
314
+ ## License
315
+
316
+ MIT. See [docs/licensing-and-commercial-use.md](docs/licensing-and-commercial-use.md) for the
317
+ current commercial-use clarification and future licensing options.
@@ -0,0 +1,274 @@
1
+ # martenweave-core
2
+
3
+ [![CI](https://github.com/metalhatscats/martenweave-core/actions/workflows/ci.yml/badge.svg)](https://github.com/metalhatscats/martenweave-core/actions/workflows/ci.yml)
4
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
+
7
+ Backend-first agentic data model registry.
8
+
9
+ Turns data models into a structured, traceable, validated, AI-ready model knowledge layer. This repository contains the canonical model registry, deterministic validation, generated SQLite index, safe AI patch proposals, and Git-friendly model files.
10
+
11
+ SAP migration and Master Data Management are the **first domain pack** and proof case, not the product boundary. The core works for generic data models: domains, entities, attributes, relationships, datasets, mappings, rules, evidence, decisions, and change proposals.
12
+
13
+ **No user-facing UI is included.** This is a CLI-driven, backend/core library designed to be embedded in pipelines, IDEs, local API processes, MCP servers, and agent workflows.
14
+
15
+ ## Status
16
+
17
+ - Current source version: `0.4.1`
18
+ - Package name: `martenweave-core`
19
+ - Public site and docs: <https://martenweave.github.io/>
20
+ - PyPI publishing is intentionally gated by the trusted-publisher release workflow. Until a package is published, install from source as shown below.
21
+
22
+ ## Core Principles
23
+
24
+ - **Canonical files are the source of truth.** Markdown + YAML frontmatter objects live in `model/`.
25
+ - **Generated index is disposable.** SQLite and JSONL outputs are rebuildable from canonical files.
26
+ - **Deterministic validation first.** Every object is validated for IDs, types, references, and domain context rules before indexing.
27
+ - **AI must not silently mutate.** AI creates `PatchProposal` objects for human review. Approved changes become `ChangeRequest`s.
28
+ - **Local-first.** No cloud dependencies, no SaaS lock-in.
29
+
30
+ ## What Martenweave is / is not
31
+
32
+ | Is | Is not |
33
+ |---|---|
34
+ | A backend-first model registry for data modeling, migration, and governance | A SAP-only tool |
35
+ | A canonical file store with generated indexes | A database-first MDM platform |
36
+ | A validator-gated, proposal-first editing workflow | A workflow engine |
37
+ | A local-first CLI and embeddable library | A SaaS platform |
38
+ | AI-assisted, with human approval required for changes | An autonomous AI agent that mutates models |
39
+
40
+ ## Quickstart
41
+
42
+ Martenweave Core requires Python 3.11+.
43
+
44
+ ### Install from Source
45
+
46
+ ```bash
47
+ git clone https://github.com/metalhatscats/martenweave-core.git
48
+ cd martenweave-core
49
+ python -m venv .venv
50
+ .venv/bin/python -m pip install -e ".[dev]"
51
+ .venv/bin/modelops --help
52
+ ```
53
+
54
+ ### Setup
55
+
56
+ Choose one style and use it throughout:
57
+
58
+ **Option A — use the venv executable directly (recommended for copy-paste):**
59
+ ```bash
60
+ python -m venv .venv
61
+ .venv/bin/python -m pip install -e .
62
+ # Then use .venv/bin/modelops for every command
63
+ ```
64
+
65
+ **Option B — activate the venv once:**
66
+ ```bash
67
+ python -m venv .venv
68
+ source .venv/bin/activate
69
+ pip install -e .
70
+ # Then use bare modelops for every command
71
+ ```
72
+
73
+ The examples below use Option A. Replace `.venv/bin/modelops` with `modelops` if you chose Option B.
74
+
75
+ ```bash
76
+ # Install
77
+ .venv/bin/python -m pip install -e .
78
+
79
+ # Scaffold a new repository
80
+ .venv/bin/modelops init ./my-model
81
+
82
+ # Validate canonical files
83
+ .venv/bin/modelops validate --repo ./my-model
84
+
85
+ # Build SQLite index + JSONL exports
86
+ .venv/bin/modelops build-index --repo ./my-model --jsonl
87
+
88
+ # Check index freshness
89
+ .venv/bin/modelops index-fresh --repo ./my-model
90
+
91
+ # Health report and scorecard
92
+ .venv/bin/modelops health --repo ./my-model
93
+ .venv/bin/modelops scorecard --repo ./my-model
94
+
95
+ # Impact and trace analysis
96
+ .venv/bin/modelops impact FEP-S4-KNVV-KDGRP --repo ./my-model
97
+ .venv/bin/modelops trace ATTR-CUST-SALES-CUSTOMER-GROUP --repo ./my-model
98
+
99
+ # Search and query
100
+ .venv/bin/modelops search "Customer Group" --repo ./my-model
101
+ .venv/bin/modelops query --type Attribute --repo ./my-model
102
+
103
+ # Diff against another repository
104
+ .venv/bin/modelops diff ./my-model ./other-model
105
+
106
+ # Propose a patch from a note
107
+ .venv/bin/modelops propose-patch --from ./note.md --repo ./my-model
108
+
109
+ # Clean generated artifacts (dry-run first)
110
+ .venv/bin/modelops clean --repo ./my-model --dry-run
111
+ ```
112
+
113
+ ## First 15 Minutes
114
+
115
+ For a step-by-step walkthrough using the included examples, see [docs/first-15-minutes.md](docs/first-15-minutes.md).
116
+
117
+ For a release-grade demo path that exercises validation, indexing, search, trace, impact, gaps, scorecards, and proposal dry-runs, see [docs/demo-quickstart-flow.md](docs/demo-quickstart-flow.md).
118
+
119
+ ## Command Reference
120
+
121
+ | Command | Purpose |
122
+ |---|---|
123
+ | `init` | Scaffold a new model repository |
124
+ | `profile-dataset` | Profile a CSV/XLSX dataset and save the profile |
125
+ | `gaps` | Detect dataset-to-model gaps against FieldEndpoints |
126
+ | `import-drive` | Import a CSV/XLSX file from Google Drive and profile it |
127
+ | `import-sheet` | Import a Google Sheet as a PatchProposal |
128
+ | `sources` | List registered external sources |
129
+ | `source-show` | Show one registered source |
130
+ | `infer-model` | Infer draft model objects from a dataset profile |
131
+ | `validate` | Run deterministic validation on canonical files |
132
+ | `build-index` | Build SQLite index and optional JSONL exports |
133
+ | `clean` | Remove generated artifacts from a repository |
134
+ | `index-fresh` | Check whether the generated index is stale |
135
+ | `health` | Show repository health report |
136
+ | `doctor` | Run diagnostics for version, config, paths, index freshness, and validation |
137
+ | `scorecard` | Show governance readiness scorecard |
138
+ | `owners` | Ownership coverage and steward workload |
139
+ | `analyze` | Analyze model completeness, risk, and readiness |
140
+ | `gap-report` | Consolidated gap summary across all sources |
141
+ | `trace` | Trace upstream/downstream relationships for an object |
142
+ | `impact` | Generate impact report for an object or proposal |
143
+ | `propose-patch` | Create a PatchProposal from a note |
144
+ | `serve` | Start the optional local API server |
145
+ | `mcp` | Start the optional MCP server for agent integration |
146
+ | `import-model-sheet` | Import spreadsheet edits as a PatchProposal |
147
+ | `export-model` | Export canonical objects to CSV or XLSX |
148
+ | `export-schema` | Export JSON Schema for canonical object types |
149
+ | `export-sheets` | Export canonical model objects to Google Sheets |
150
+ | `git-bundle` | Generate a GitHub-ready change bundle |
151
+ | `publish-issue` | Publish an issue draft to GitHub |
152
+ | `publish-pr` | Publish a git bundle as a GitHub pull request |
153
+ | `audit-log` | Query the append-only audit log |
154
+ | `usage-report` | Show aggregated usage report from telemetry |
155
+ | `docs-build` | Generate static Markdown docs from the index |
156
+ | `config-guard` | Scan for secrets and configuration guardrail issues |
157
+ | `diff` | Compare two model repositories |
158
+ | `search` | Search indexed objects by keyword |
159
+ | `query` | Run structured queries over the index |
160
+ | `migrate` | Migrate canonical objects to the current schema version |
161
+ | `issue-draft` | Generate GitHub-ready issue drafts |
162
+ | `change-request` | Create and manage ChangeRequests |
163
+ | `notifications` | Preview notification recipients |
164
+ | `decisions` | Browse and inspect Decision objects |
165
+ | `proposal` | Review and apply PatchProposals |
166
+ | `assessment` | Run migration model readiness assessment workflows |
167
+
168
+ `serve` and `mcp` are local integration surfaces for APIs, tools, and agents. They do not provide a
169
+ hosted product UI or browser application.
170
+
171
+ Use `--help` on any command for full options:
172
+
173
+ ```bash
174
+ .venv/bin/modelops <command> --help
175
+ ```
176
+
177
+ ### Assessment Example
178
+
179
+ ```bash
180
+ .venv/bin/modelops assessment run --repo examples/customer_bp_model --out generated/assessment/customer-bp
181
+ ```
182
+
183
+ ## Example Models
184
+
185
+ Both example directories contain a working `modelops.config.yaml` and can be run without `init`.
186
+
187
+ ### Customer / Business Partner Model
188
+
189
+ The `examples/customer_bp_model/` directory contains the first domain pack: a full canonical model slice for SAP Business Partner → Customer:
190
+
191
+ ```
192
+ Business Partner -> Customer -> Customer Sales Area -> Customer Group -> KNVV-KDGRP
193
+ ```
194
+
195
+ ### Supplier / Vendor Model
196
+
197
+ The `examples/supplier_vendor_model/` directory contains a second domain pack for SAP Supplier / Vendor master data:
198
+
199
+ ```
200
+ Supplier -> Vendor Central -> LFA1/KTOKK, LFB1/ZTERM, LFM1/SPERR
201
+ ```
202
+
203
+ Run validation against either:
204
+
205
+ ```bash
206
+ .venv/bin/modelops validate --repo examples/customer_bp_model
207
+ .venv/bin/modelops validate --repo examples/supplier_vendor_model
208
+ ```
209
+
210
+ ## Architecture
211
+
212
+ ```
213
+ modelops.config.yaml # Repository configuration
214
+ model/ # Canonical Markdown + YAML objects
215
+ DOMAIN-*.md
216
+ ENTITY-*.md
217
+ ATTR-*.md
218
+ FEP-*.md
219
+ MAP-*.md
220
+ ...
221
+ generated/ # Disposable artifacts
222
+ modelops.db # SQLite index
223
+ search_documents.jsonl # Search export
224
+ lineage_edges.jsonl # Lineage export
225
+ audit_events.jsonl # Audit log
226
+ usage_events.jsonl # Application usage telemetry
227
+ ai_usage_events.jsonl # AI provider usage telemetry
228
+ data/samples/ # Sample datasets for profiling
229
+ ```
230
+
231
+ ## Domain Rules (SAP example)
232
+
233
+ The first domain pack includes SAP-specific context rules:
234
+
235
+ - `Attribute` is business meaning.
236
+ - `FieldEndpoint` is physical representation.
237
+ - `AttributeUsage` links an `Attribute` to a specific business context.
238
+ - `Mapping` links source and target `FieldEndpoint`s.
239
+ - `KNVV` fields must be in `customer_sales_area` context.
240
+ - `KNB1` fields must be in `customer_company_code` context.
241
+ - `KNVP` fields must be in `customer_partner_function` context.
242
+ - `BUT000` fields must be in `bp_central` context.
243
+
244
+ Future domain packs can add their own validation rules without changing core concepts.
245
+
246
+ ## Documentation
247
+
248
+ See [docs/README.md](docs/README.md) for the full documentation index, including architecture docs, developer guides, product playbooks, and the Data Model Book.
249
+
250
+ ## Development
251
+
252
+ ```bash
253
+ # Run tests
254
+ .venv/bin/python -m pytest
255
+
256
+ # Lint
257
+ .venv/bin/python -m ruff check .
258
+
259
+ # Release smoke across bundled examples
260
+ bash scripts/release_smoke.sh
261
+ ```
262
+
263
+ Release and public-readiness docs:
264
+
265
+ - [docs/release-checklist.md](docs/release-checklist.md)
266
+ - [docs/release-notes-first-public-rc.md](docs/release-notes-first-public-rc.md)
267
+ - [docs/release-validation-evidence.md](docs/release-validation-evidence.md)
268
+ - [docs/open-source-readiness.md](docs/open-source-readiness.md)
269
+ - [docs/known-limitations.md](docs/known-limitations.md)
270
+
271
+ ## License
272
+
273
+ MIT. See [docs/licensing-and-commercial-use.md](docs/licensing-and-commercial-use.md) for the
274
+ current commercial-use clarification and future licensing options.