datacontract-cli 0.10.26__py3-none-any.whl → 0.10.28__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datacontract-cli might be problematic. Click here for more details.

Files changed (33) hide show
  1. datacontract/catalog/catalog.py +1 -1
  2. datacontract/cli.py +20 -3
  3. datacontract/data_contract.py +125 -22
  4. datacontract/engines/data_contract_checks.py +2 -0
  5. datacontract/export/dbt_converter.py +6 -3
  6. datacontract/export/exporter.py +1 -0
  7. datacontract/export/exporter_factory.py +7 -1
  8. datacontract/export/{html_export.py → html_exporter.py} +31 -20
  9. datacontract/export/mermaid_exporter.py +97 -0
  10. datacontract/export/odcs_v3_exporter.py +8 -10
  11. datacontract/export/sodacl_converter.py +9 -1
  12. datacontract/export/sql_converter.py +2 -2
  13. datacontract/export/sql_type_converter.py +6 -2
  14. datacontract/imports/excel_importer.py +5 -2
  15. datacontract/imports/importer.py +10 -1
  16. datacontract/imports/odcs_importer.py +2 -2
  17. datacontract/imports/odcs_v3_importer.py +9 -9
  18. datacontract/imports/spark_importer.py +103 -12
  19. datacontract/imports/sql_importer.py +4 -2
  20. datacontract/imports/unity_importer.py +77 -37
  21. datacontract/integration/datamesh_manager.py +16 -2
  22. datacontract/lint/resolve.py +60 -6
  23. datacontract/templates/datacontract.html +52 -2
  24. datacontract/templates/datacontract_odcs.html +666 -0
  25. datacontract/templates/index.html +2 -0
  26. datacontract/templates/partials/server.html +2 -0
  27. datacontract/templates/style/output.css +319 -145
  28. {datacontract_cli-0.10.26.dist-info → datacontract_cli-0.10.28.dist-info}/METADATA +364 -381
  29. {datacontract_cli-0.10.26.dist-info → datacontract_cli-0.10.28.dist-info}/RECORD +33 -31
  30. {datacontract_cli-0.10.26.dist-info → datacontract_cli-0.10.28.dist-info}/WHEEL +1 -1
  31. {datacontract_cli-0.10.26.dist-info → datacontract_cli-0.10.28.dist-info}/entry_points.txt +0 -0
  32. {datacontract_cli-0.10.26.dist-info → datacontract_cli-0.10.28.dist-info}/licenses/LICENSE +0 -0
  33. {datacontract_cli-0.10.26.dist-info → datacontract_cli-0.10.28.dist-info}/top_level.txt +0 -0
@@ -5,6 +5,8 @@
5
5
  <meta charset="UTF-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  {# <script src="https://cdn.tailwindcss.com"></script> #}
8
+ <script src="https://unpkg.com/@panzoom/panzoom@4.6.0/dist/panzoom.min.js"></script>
9
+
8
10
  <style>
9
11
  {{ style | safe }}
10
12
  </style>
@@ -29,7 +31,6 @@
29
31
  </div>
30
32
  </div>
31
33
  </nav>
32
-
33
34
  <main class="pb-7">
34
35
 
35
36
  <div class="pt-5 mx-auto max-w-7xl sm:px-6 lg:px-8">
@@ -40,6 +41,10 @@
40
41
  Data Contract</h2>
41
42
  <div class="mt-1 flex flex-col sm:mt-0 sm:flex-row sm:flex-wrap sm:space-x-6">
42
43
  {{ datacontract.id }}
44
+
45
+ <span class="inline-flex items-center rounded-full bg-indigo-100 px-2.5 py-0.5 text-xs font-medium text-gray-800 mr-1">
46
+ <span>Data Contract Specification v{{ datacontract.dataContractSpecification }}</span>
47
+ </span>
43
48
  </div>
44
49
  <div class="mt-1 flex flex-col sm:mt-0 sm:flex-row sm:flex-wrap sm:space-x-6">
45
50
  {% if datacontract.tags %}
@@ -77,7 +82,6 @@
77
82
  {{ render_partial('partials/datacontract_information.html', datacontract = datacontract) }}
78
83
  </section>
79
84
 
80
-
81
85
  {% if datacontract.servers %}
82
86
  <section id="servers">
83
87
  <div class="px-4 sm:px-0">
@@ -103,6 +107,52 @@
103
107
  </section>
104
108
  {% endif %}
105
109
 
110
+ <section id="diagram" class="mt-6">
111
+ <div class="px-4 sm:px-0">
112
+ <h1 class="text-base font-semibold leading-6 text-gray-900">Entity Relationship
113
+ Diagram</h1>
114
+ <p class="text-sm text-gray-500">Visual representation of data model relationships</p>
115
+ </div>
116
+ <div class="mt-3">
117
+ <div class="overflow-hidden bg-white shadow-sm ring-1 ring-gray-900/5 sm:rounded-lg">
118
+ <div class="diagram-container p-4 w-full" id="diagram-container">
119
+ <pre class="mermaid">
120
+ {{ mermaid_diagram }}
121
+ </pre>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ <script type="module">
126
+ import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
127
+
128
+ mermaid.initialize({
129
+ startOnLoad: false,
130
+ theme: 'neutral'
131
+ });
132
+ await mermaid.run({
133
+ querySelector: '.mermaid',
134
+ postRenderCallback: (id) => {
135
+ const container = document.getElementById("diagram-container");
136
+ const svgElement = container.querySelector("svg");
137
+
138
+ if (svgElement) {
139
+ // Initialize Panzoom
140
+ const panzoomInstance = Panzoom(svgElement, {
141
+ maxScale: 5,
142
+ minScale: 0.5,
143
+ step: 0.1,
144
+ });
145
+
146
+ // Mouse wheel zoom
147
+ container.addEventListener("wheel", (event) => {
148
+ event.preventDefault();
149
+ panzoomInstance.zoomWithWheel(event);
150
+ });
151
+ }
152
+ }
153
+ });
154
+ </script>
155
+ </section>
106
156
 
107
157
  <section id="models">
108
158
  <div class="flex justify-between">