datacontract-cli 0.10.0__py3-none-any.whl → 0.10.37__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.
- datacontract/__init__.py +13 -0
- datacontract/api.py +260 -0
- datacontract/breaking/breaking.py +242 -12
- datacontract/breaking/breaking_rules.py +37 -1
- datacontract/catalog/catalog.py +80 -0
- datacontract/cli.py +387 -117
- datacontract/data_contract.py +216 -353
- datacontract/engines/data_contract_checks.py +1041 -0
- datacontract/engines/data_contract_test.py +113 -0
- datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +2 -3
- datacontract/engines/datacontract/check_that_datacontract_file_exists.py +1 -1
- datacontract/engines/fastjsonschema/check_jsonschema.py +176 -42
- datacontract/engines/fastjsonschema/s3/s3_read_files.py +16 -1
- datacontract/engines/soda/check_soda_execute.py +100 -56
- datacontract/engines/soda/connections/athena.py +79 -0
- datacontract/engines/soda/connections/bigquery.py +8 -1
- datacontract/engines/soda/connections/databricks.py +12 -3
- datacontract/engines/soda/connections/duckdb_connection.py +241 -0
- datacontract/engines/soda/connections/kafka.py +206 -113
- datacontract/engines/soda/connections/snowflake.py +8 -5
- datacontract/engines/soda/connections/sqlserver.py +43 -0
- datacontract/engines/soda/connections/trino.py +26 -0
- datacontract/export/avro_converter.py +72 -8
- datacontract/export/avro_idl_converter.py +31 -25
- datacontract/export/bigquery_converter.py +130 -0
- datacontract/export/custom_converter.py +40 -0
- datacontract/export/data_caterer_converter.py +161 -0
- datacontract/export/dbml_converter.py +148 -0
- datacontract/export/dbt_converter.py +141 -54
- datacontract/export/dcs_exporter.py +6 -0
- datacontract/export/dqx_converter.py +126 -0
- datacontract/export/duckdb_type_converter.py +57 -0
- datacontract/export/excel_exporter.py +923 -0
- datacontract/export/exporter.py +100 -0
- datacontract/export/exporter_factory.py +216 -0
- datacontract/export/go_converter.py +105 -0
- datacontract/export/great_expectations_converter.py +257 -36
- datacontract/export/html_exporter.py +86 -0
- datacontract/export/iceberg_converter.py +188 -0
- datacontract/export/jsonschema_converter.py +71 -16
- datacontract/export/markdown_converter.py +337 -0
- datacontract/export/mermaid_exporter.py +110 -0
- datacontract/export/odcs_v3_exporter.py +375 -0
- datacontract/export/pandas_type_converter.py +40 -0
- datacontract/export/protobuf_converter.py +168 -68
- datacontract/export/pydantic_converter.py +6 -0
- datacontract/export/rdf_converter.py +13 -6
- datacontract/export/sodacl_converter.py +36 -188
- datacontract/export/spark_converter.py +245 -0
- datacontract/export/sql_converter.py +37 -3
- datacontract/export/sql_type_converter.py +269 -8
- datacontract/export/sqlalchemy_converter.py +170 -0
- datacontract/export/terraform_converter.py +7 -2
- datacontract/imports/avro_importer.py +246 -26
- datacontract/imports/bigquery_importer.py +221 -0
- datacontract/imports/csv_importer.py +143 -0
- datacontract/imports/dbml_importer.py +112 -0
- datacontract/imports/dbt_importer.py +240 -0
- datacontract/imports/excel_importer.py +1111 -0
- datacontract/imports/glue_importer.py +288 -0
- datacontract/imports/iceberg_importer.py +172 -0
- datacontract/imports/importer.py +51 -0
- datacontract/imports/importer_factory.py +128 -0
- datacontract/imports/json_importer.py +325 -0
- datacontract/imports/jsonschema_importer.py +146 -0
- datacontract/imports/odcs_importer.py +60 -0
- datacontract/imports/odcs_v3_importer.py +516 -0
- datacontract/imports/parquet_importer.py +81 -0
- datacontract/imports/protobuf_importer.py +264 -0
- datacontract/imports/spark_importer.py +262 -0
- datacontract/imports/sql_importer.py +274 -35
- datacontract/imports/unity_importer.py +219 -0
- datacontract/init/init_template.py +20 -0
- datacontract/integration/datamesh_manager.py +86 -0
- datacontract/lint/resolve.py +271 -49
- datacontract/lint/resources.py +21 -0
- datacontract/lint/schema.py +53 -17
- datacontract/lint/urls.py +32 -12
- datacontract/model/data_contract_specification/__init__.py +1 -0
- datacontract/model/exceptions.py +4 -1
- datacontract/model/odcs.py +24 -0
- datacontract/model/run.py +49 -29
- datacontract/output/__init__.py +0 -0
- datacontract/output/junit_test_results.py +135 -0
- datacontract/output/output_format.py +10 -0
- datacontract/output/test_results_writer.py +79 -0
- datacontract/py.typed +0 -0
- datacontract/schemas/datacontract-1.1.0.init.yaml +91 -0
- datacontract/schemas/datacontract-1.1.0.schema.json +1975 -0
- datacontract/schemas/datacontract-1.2.0.init.yaml +91 -0
- datacontract/schemas/datacontract-1.2.0.schema.json +2029 -0
- datacontract/schemas/datacontract-1.2.1.init.yaml +91 -0
- datacontract/schemas/datacontract-1.2.1.schema.json +2058 -0
- datacontract/schemas/odcs-3.0.1.schema.json +2634 -0
- datacontract/schemas/odcs-3.0.2.schema.json +2382 -0
- datacontract/templates/datacontract.html +139 -294
- datacontract/templates/datacontract_odcs.html +685 -0
- datacontract/templates/index.html +236 -0
- datacontract/templates/partials/datacontract_information.html +86 -0
- datacontract/templates/partials/datacontract_servicelevels.html +253 -0
- datacontract/templates/partials/datacontract_terms.html +51 -0
- datacontract/templates/partials/definition.html +25 -0
- datacontract/templates/partials/example.html +27 -0
- datacontract/templates/partials/model_field.html +144 -0
- datacontract/templates/partials/quality.html +49 -0
- datacontract/templates/partials/server.html +211 -0
- datacontract/templates/style/output.css +491 -72
- datacontract_cli-0.10.37.dist-info/METADATA +2235 -0
- datacontract_cli-0.10.37.dist-info/RECORD +119 -0
- {datacontract_cli-0.10.0.dist-info → datacontract_cli-0.10.37.dist-info}/WHEEL +1 -1
- {datacontract_cli-0.10.0.dist-info → datacontract_cli-0.10.37.dist-info/licenses}/LICENSE +1 -1
- datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -48
- datacontract/engines/soda/connections/dask.py +0 -28
- datacontract/engines/soda/connections/duckdb.py +0 -76
- datacontract/export/csv_type_converter.py +0 -36
- datacontract/export/html_export.py +0 -66
- datacontract/export/odcs_converter.py +0 -102
- datacontract/init/download_datacontract_file.py +0 -17
- datacontract/integration/publish_datamesh_manager.py +0 -33
- datacontract/integration/publish_opentelemetry.py +0 -107
- datacontract/lint/lint.py +0 -141
- datacontract/lint/linters/description_linter.py +0 -34
- datacontract/lint/linters/example_model_linter.py +0 -91
- datacontract/lint/linters/field_pattern_linter.py +0 -34
- datacontract/lint/linters/field_reference_linter.py +0 -38
- datacontract/lint/linters/notice_period_linter.py +0 -55
- datacontract/lint/linters/quality_schema_linter.py +0 -52
- datacontract/lint/linters/valid_constraints_linter.py +0 -99
- datacontract/model/data_contract_specification.py +0 -141
- datacontract/web.py +0 -14
- datacontract_cli-0.10.0.dist-info/METADATA +0 -951
- datacontract_cli-0.10.0.dist-info/RECORD +0 -66
- /datacontract/{model → breaking}/breaking_change.py +0 -0
- /datacontract/{lint/linters → export}/__init__.py +0 -0
- {datacontract_cli-0.10.0.dist-info → datacontract_cli-0.10.37.dist-info}/entry_points.txt +0 -0
- {datacontract_cli-0.10.0.dist-info → datacontract_cli-0.10.37.dist-info}/top_level.txt +0 -0
|
@@ -5,8 +5,10 @@
|
|
|
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
|
-
{{style | safe }}
|
|
11
|
+
{{ style | safe }}
|
|
10
12
|
</style>
|
|
11
13
|
</head>
|
|
12
14
|
<body class="h-full">
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
<div class="flex">
|
|
20
22
|
<div class="flex flex-shrink-0 items-center mr-6">
|
|
21
23
|
<a class="text-xl text-gray-900 font-semibold" href="/">
|
|
22
|
-
Data
|
|
24
|
+
Data Contracts
|
|
23
25
|
</a>
|
|
24
26
|
</div>
|
|
25
27
|
</div>
|
|
@@ -29,17 +31,35 @@
|
|
|
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">
|
|
36
37
|
<div>
|
|
37
|
-
<div class="
|
|
38
|
+
<div class="md:flex md:items-center md:justify-between px-4 sm:px-0">
|
|
38
39
|
<div class="min-w-0 flex-1">
|
|
39
40
|
<h2 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">
|
|
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>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="mt-1 flex flex-col sm:mt-0 sm:flex-row sm:flex-wrap sm:space-x-6">
|
|
50
|
+
{% if datacontract.tags %}
|
|
51
|
+
<div class="mt-2 flex items-center text-sm text-gray-500 whitespace-nowrap">
|
|
52
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mr-1.5 h-5 w-5 flex-shrink-0 text-gray-400">
|
|
53
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z" />
|
|
54
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 6h.008v.008H6V6z" />
|
|
55
|
+
</svg>
|
|
56
|
+
{% for tag in datacontract.tags %}
|
|
57
|
+
<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">
|
|
58
|
+
<span>{{ tag }}</span>
|
|
59
|
+
</span>
|
|
60
|
+
{% endfor %}
|
|
61
|
+
</div>
|
|
62
|
+
{% endif %}
|
|
43
63
|
</div>
|
|
44
64
|
</div>
|
|
45
65
|
<div class="mt-5 flex lg:mt-0 lg:ml-4 gap-3 items-center">
|
|
@@ -47,87 +67,23 @@
|
|
|
47
67
|
type="button"
|
|
48
68
|
onclick="document.getElementById('dialog-datacontract-yaml').showModal()"
|
|
49
69
|
class="inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
|
|
50
|
-
<svg class="-ml-0.5 mr-1.5 h-5 w-5 text-gray-600" viewBox="-0.5 -0.5 24 24"
|
|
70
|
+
<svg class="-ml-0.5 mr-1.5 h-5 w-5 text-gray-600" viewBox="-0.5 -0.5 24 24">
|
|
51
71
|
<path d="m4.3125 8.145833333333334 9.104166666666668 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m4.3125 11.020833333333334 9.104166666666668 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m4.3125 5.270833333333334 6.708333333333334 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m4.3125 13.895833333333334 7.1875 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m4.3125 16.770833333333336 3.8333333333333335 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="M8.145833333333334 22.520833333333336h-6.708333333333334a0.9583333333333334 0.9583333333333334 0 0 1 -0.9583333333333334 -0.9583333333333334v-20.125a0.9583333333333334 0.9583333333333334 0 0 1 0.9583333333333334 -0.9583333333333334h12.739125a0.9583333333333334 0.9583333333333334 0 0 1 0.6775416666666667 0.28079166666666666L18.406708333333334 4.3125a0.9583333333333334 0.9583333333333334 0 0 1 0.28079166666666666 0.6775416666666667V8.145833333333334" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m15.045833333333333 21.370833333333334 -4.025 1.15 1.15 -4.025 6.879875 -6.879875a2.032625 2.032625 0 0 1 2.875 2.875Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m18.188208333333332 12.478458333333334 2.875 2.875" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path><path d="m12.170833333333333 18.495833333333334 2.875 2.875" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></path>
|
|
52
72
|
</svg>
|
|
53
73
|
Show YAML
|
|
54
74
|
</button>
|
|
55
75
|
</div>
|
|
56
76
|
</div>
|
|
57
|
-
|
|
58
|
-
|
|
59
77
|
</div>
|
|
60
78
|
|
|
61
79
|
<div>
|
|
62
|
-
|
|
63
80
|
<div class="space-y-6 mt-6">
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<section>
|
|
67
|
-
<div class=" px-4 sm:px-0">
|
|
68
|
-
<h1 class="text-base font-semibold leading-6 text-gray-900" id="info">Info</h1>
|
|
69
|
-
<p class="text-sm text-gray-500">Information about the data contract</p>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="mt-2 overflow-hidden shadow sm:rounded-lg bg-white">
|
|
72
|
-
|
|
73
|
-
<div class="px-4 py-5 sm:px-6">
|
|
74
|
-
|
|
75
|
-
<dl class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2">
|
|
76
|
-
<div class="sm:col-span-1">
|
|
77
|
-
<dt class="text-sm font-medium text-gray-500">Title</dt>
|
|
78
|
-
<dd class="mt-1 text-sm text-gray-900">{{ datacontract.info.title }}</dd>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div class="sm:col-span-1">
|
|
82
|
-
<dt class="text-sm font-medium text-gray-500">Version</dt>
|
|
83
|
-
<dd class="mt-1 text-sm text-gray-900">{{ datacontract.info.version }}</dd>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
{% if datacontract.info.description %}
|
|
87
|
-
<div class="sm:col-span-2">
|
|
88
|
-
<dt class="text-sm font-medium text-gray-500">Description</dt>
|
|
89
|
-
<dd class="mt-1 text-sm text-gray-900" >
|
|
90
|
-
<span class="whitespace-pre-wrap">{{ datacontract.info.description }}</span>
|
|
91
|
-
</dd>
|
|
92
|
-
</div>
|
|
93
|
-
{% endif %}
|
|
94
|
-
|
|
95
|
-
{% if datacontract.info.owner %}
|
|
96
|
-
<div class="sm:col-span-1">
|
|
97
|
-
<dt class="text-sm font-medium text-gray-500">Owner</dt>
|
|
98
|
-
<dd class="mt-1 text-sm text-gray-900">
|
|
99
|
-
<span>{{ datacontract.info.owner }}</span>
|
|
100
|
-
</dd>
|
|
101
|
-
</div>
|
|
102
|
-
{% endif %}
|
|
103
|
-
|
|
104
|
-
{% if datacontract.info.contact %}
|
|
105
|
-
<div class="sm:col-span-1">
|
|
106
|
-
<dt class="text-sm font-medium text-gray-500">Contact</dt>
|
|
107
|
-
<dd class="mt-1 text-sm text-gray-900">
|
|
108
|
-
{% if datacontract.info.contact.name %}
|
|
109
|
-
{{ datacontract.info.contact.name }}
|
|
110
|
-
{% endif %}
|
|
111
|
-
{% if datacontract.info.contact.email %}
|
|
112
|
-
<a href="mailto:{{ datacontract.info.contact.email }}" class="text-sky-500 hover:text-gray-700">{{ datacontract.info.contact.email }}</a>
|
|
113
|
-
{% endif %}
|
|
114
|
-
{% if datacontract.info.contact.url %}
|
|
115
|
-
<div>
|
|
116
|
-
<a href="{{ datacontract.info.contact.url }}" class="text-sky-500 hover:text-gray-700">{{ datacontract.info.contact.url }}</a>
|
|
117
|
-
</div>
|
|
118
|
-
{% endif %}
|
|
119
|
-
</dd>
|
|
120
|
-
</div>
|
|
121
|
-
{% endif %}
|
|
122
|
-
|
|
123
|
-
</dl>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
81
|
+
<section id="information">
|
|
82
|
+
{{ render_partial('partials/datacontract_information.html', datacontract = datacontract) }}
|
|
126
83
|
</section>
|
|
127
84
|
|
|
128
|
-
|
|
129
85
|
{% if datacontract.servers %}
|
|
130
|
-
<section>
|
|
86
|
+
<section id="servers">
|
|
131
87
|
<div class="px-4 sm:px-0">
|
|
132
88
|
<h1 class="text-base font-semibold leading-6 text-gray-900" id="servers">Servers</h1>
|
|
133
89
|
<p class="text-sm text-gray-500">Servers of the data contract</p>
|
|
@@ -136,150 +92,7 @@
|
|
|
136
92
|
<ul role="list" class="mt-2 divide-y divide-gray-100 overflow-hidden bg-white shadow-sm ring-1 ring-gray-900/5 sm:rounded-lg">
|
|
137
93
|
|
|
138
94
|
{% for server_name, server in datacontract.servers.items() %}
|
|
139
|
-
|
|
140
|
-
<div class="flex items-center gap-x-4">
|
|
141
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
142
|
-
<dt class="text-sm font-medium text-gray-500">Server</dt>
|
|
143
|
-
<dd class="mt-1 text-sm text-gray-900">{{server_name}}</dd>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
|
|
147
|
-
{% if server.type %}
|
|
148
|
-
<div class="flex items-center gap-x-4">
|
|
149
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
150
|
-
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
|
151
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.type}}</dd>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
{% endif %}
|
|
155
|
-
|
|
156
|
-
{% if server.project %}
|
|
157
|
-
<div class="flex items-center gap-x-4">
|
|
158
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
159
|
-
<dt class="text-sm font-medium text-gray-500">Project</dt>
|
|
160
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.project}}</dd>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
{% endif %}
|
|
164
|
-
|
|
165
|
-
{% if server.dataset %}
|
|
166
|
-
<div class="flex items-center gap-x-4">
|
|
167
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
168
|
-
<dt class="text-sm font-medium text-gray-500">Dataset</dt>
|
|
169
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.dataset}}</dd>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
{% endif %}
|
|
173
|
-
|
|
174
|
-
{% if server.location %}
|
|
175
|
-
<div class="flex items-center gap-x-4">
|
|
176
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
177
|
-
<dt class="text-sm font-medium text-gray-500">Location</dt>
|
|
178
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.location}}</dd>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
{% endif %}
|
|
182
|
-
|
|
183
|
-
{% if server.endpointUrl %}
|
|
184
|
-
<div class="flex items-center gap-x-4">
|
|
185
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
186
|
-
<dt class="text-sm font-medium text-gray-500">Endpoint URL</dt>
|
|
187
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.endpointUrl}}</dd>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
{% endif %}
|
|
191
|
-
|
|
192
|
-
{% if server.account %}
|
|
193
|
-
<div class="flex items-center gap-x-4">
|
|
194
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
195
|
-
<dt class="text-sm font-medium text-gray-500">Account</dt>
|
|
196
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.account}}</dd>
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
{% endif %}
|
|
200
|
-
|
|
201
|
-
{% if server.host %}
|
|
202
|
-
<div class="flex items-center gap-x-4">
|
|
203
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
204
|
-
<dt class="text-sm font-medium text-gray-500">Host</dt>
|
|
205
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.host}}</dd>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
{% endif %}
|
|
209
|
-
|
|
210
|
-
{% if server.port %}
|
|
211
|
-
<div class="flex items-center gap-x-4">
|
|
212
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
213
|
-
<dt class="text-sm font-medium text-gray-500">Port</dt>
|
|
214
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.port}}</dd>
|
|
215
|
-
</div>
|
|
216
|
-
</div>
|
|
217
|
-
{% endif %}
|
|
218
|
-
|
|
219
|
-
{% if server.catalog %}
|
|
220
|
-
<div class="flex items-center gap-x-4">
|
|
221
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
222
|
-
<dt class="text-sm font-medium text-gray-500">Catalog</dt>
|
|
223
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.catalog}}</dd>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
{% endif %}
|
|
227
|
-
|
|
228
|
-
{% if server.database %}
|
|
229
|
-
<div class="flex items-center gap-x-4">
|
|
230
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
231
|
-
<dt class="text-sm font-medium text-gray-500">Database</dt>
|
|
232
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.database}}</dd>
|
|
233
|
-
</div>
|
|
234
|
-
</div>
|
|
235
|
-
{% endif %}
|
|
236
|
-
|
|
237
|
-
{% if server.schema_ %}
|
|
238
|
-
<div class="flex items-center gap-x-4">
|
|
239
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
240
|
-
<dt class="text-sm font-medium text-gray-500">Schema</dt>
|
|
241
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.schema_}}</dd>
|
|
242
|
-
</div>
|
|
243
|
-
</div>
|
|
244
|
-
{% endif %}
|
|
245
|
-
|
|
246
|
-
{% if server.topic %}
|
|
247
|
-
<div class="flex items-center gap-x-4">
|
|
248
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
249
|
-
<dt class="text-sm font-medium text-gray-500">Topic</dt>
|
|
250
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.topic}}</dd>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
{% endif %}
|
|
254
|
-
|
|
255
|
-
{% if server.path %}
|
|
256
|
-
<div class="flex items-center gap-x-4">
|
|
257
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
258
|
-
<dt class="text-sm font-medium text-gray-500">Path</dt>
|
|
259
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.path}}</dd>
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
262
|
-
{% endif %}
|
|
263
|
-
|
|
264
|
-
{% if server.format %}
|
|
265
|
-
<div class="flex items-center gap-x-4">
|
|
266
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
267
|
-
<dt class="text-sm font-medium text-gray-500">Format</dt>
|
|
268
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.format}}</dd>
|
|
269
|
-
</div>
|
|
270
|
-
</div>
|
|
271
|
-
{% endif %}
|
|
272
|
-
|
|
273
|
-
{% if server.delimiter %}
|
|
274
|
-
<div class="flex items-center gap-x-4">
|
|
275
|
-
<div class="hidden sm:flex sm:flex-col">
|
|
276
|
-
<dt class="text-sm font-medium text-gray-500">Delimiter</dt>
|
|
277
|
-
<dd class="mt-1 text-sm text-gray-900">{{server.delimiter}}</dd>
|
|
278
|
-
</div>
|
|
279
|
-
</div>
|
|
280
|
-
{% endif %}
|
|
281
|
-
|
|
282
|
-
</li>
|
|
95
|
+
{{ render_partial('partials/server.html', server_name = server_name, server = server) }}
|
|
283
96
|
{% endfor %}
|
|
284
97
|
|
|
285
98
|
</ul>
|
|
@@ -289,54 +102,57 @@
|
|
|
289
102
|
|
|
290
103
|
|
|
291
104
|
{% if datacontract.terms %}
|
|
292
|
-
<section>
|
|
105
|
+
<section id="terms">
|
|
106
|
+
{{ render_partial('partials/datacontract_terms.html', datacontract = datacontract) }}
|
|
107
|
+
</section>
|
|
108
|
+
{% endif %}
|
|
109
|
+
|
|
110
|
+
<section id="diagram" class="mt-6">
|
|
293
111
|
<div class="px-4 sm:px-0">
|
|
294
|
-
<h1 class="text-base font-semibold leading-6 text-gray-900"
|
|
295
|
-
|
|
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>
|
|
296
115
|
</div>
|
|
297
|
-
<div class="mt-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
<dd class="mt-1 text-sm text-gray-900" >
|
|
305
|
-
<span class="whitespace-pre-wrap">{{ datacontract.terms.usage }}</span>
|
|
306
|
-
</dd>
|
|
307
|
-
</div>
|
|
308
|
-
|
|
309
|
-
<div class="sm:col-span-1">
|
|
310
|
-
<dt class="text-sm font-medium text-gray-500">Limitations</dt>
|
|
311
|
-
<dd class="mt-1 text-sm text-gray-900" >
|
|
312
|
-
<span class="whitespace-pre-wrap">{{ datacontract.terms.limitations }}</span>
|
|
313
|
-
</dd>
|
|
314
|
-
</div>
|
|
315
|
-
|
|
316
|
-
{% if datacontract.terms.billing %}
|
|
317
|
-
<div class="sm:col-span-1">
|
|
318
|
-
<dt class="text-sm font-medium text-gray-500">Billing</dt>
|
|
319
|
-
<dd class="mt-1 text-sm text-gray-900" >
|
|
320
|
-
<span class="whitespace-pre-wrap">{{ datacontract.terms.billing }}</span>
|
|
321
|
-
</dd>
|
|
322
|
-
</div>
|
|
323
|
-
{% endif %}
|
|
324
|
-
|
|
325
|
-
{% if datacontract.terms.noticePeriod %}
|
|
326
|
-
<div class="sm:col-span-1">
|
|
327
|
-
<dt class="text-sm font-medium text-gray-500">Notice Period</dt>
|
|
328
|
-
<dd class="mt-1 text-sm text-gray-900 flex" >
|
|
329
|
-
<span class="whitespace-pre-wrap">{{ datacontract.terms.noticePeriod }}</span>
|
|
330
|
-
</dd>
|
|
331
|
-
</div>
|
|
332
|
-
{% endif %}
|
|
333
|
-
|
|
334
|
-
</dl>
|
|
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>
|
|
335
123
|
</div>
|
|
336
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>
|
|
337
155
|
</section>
|
|
338
|
-
{% endif %}
|
|
339
|
-
|
|
340
156
|
|
|
341
157
|
<section id="models">
|
|
342
158
|
<div class="flex justify-between">
|
|
@@ -358,59 +174,90 @@
|
|
|
358
174
|
<table class="min-w-full divide-y divide-gray-300">
|
|
359
175
|
<thead class="bg-gray-50">
|
|
360
176
|
<tr>
|
|
361
|
-
<th scope="colgroup" colspan="
|
|
362
|
-
|
|
177
|
+
<th scope="colgroup" colspan="3" class="py-2 pl-4 pr-3 text-left font-semibold text-gray-900 sm:pl-6">
|
|
178
|
+
{% if model.title %}
|
|
179
|
+
{{ model.title }}
|
|
180
|
+
{% endif %}
|
|
181
|
+
{% if model.title != model_name %}
|
|
182
|
+
<span class="font-mono font-medium">{{ model_name }}</span>
|
|
183
|
+
{% endif %}
|
|
363
184
|
<span class="inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10">{{ model.type }}</span>
|
|
364
185
|
<div class="text-sm font-medium text-gray-500">{{ model.description }}</div>
|
|
186
|
+
{% for key, value in model.model_extra.items() %}
|
|
187
|
+
<span
|
|
188
|
+
class="inline-flex items-center rounded-md bg-blue-50 px-1 py-1 text-xs font-medium text-blue-600 ring-1 ring-inset ring-blue-500/10 mr-1 mt-1">{{ key }}: {{ value }}</span>
|
|
189
|
+
{% endfor %}
|
|
365
190
|
</th>
|
|
366
191
|
|
|
367
192
|
</tr>
|
|
368
193
|
</thead>
|
|
369
194
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
370
|
-
|
|
371
195
|
{% for field_name, field in model.fields.items() %}
|
|
372
|
-
|
|
196
|
+
{{ render_partial('partials/model_field.html', nested = False, field_name=field_name, field = field, level = 0) }}
|
|
197
|
+
{% endfor %}
|
|
198
|
+
</tbody>
|
|
199
|
+
{% if model.primaryKey or model.quality %}
|
|
200
|
+
<tfoot class="divide-y divide-gray-200 bg-white">
|
|
201
|
+
{% if model.quality %}
|
|
202
|
+
{% for quality in model.quality %}
|
|
373
203
|
<tr>
|
|
374
|
-
<
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
</div>
|
|
379
|
-
</td>
|
|
380
|
-
<td class="whitespace-nowrap px-1 py-2 text-sm text-gray-500 w-16">
|
|
381
|
-
{% if field.required %}
|
|
382
|
-
<span class="inline-flex items-center rounded-md bg-gray-50 px-1 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10" title="required">R</span>
|
|
383
|
-
{% endif %}
|
|
384
|
-
{% if field.unique %}
|
|
385
|
-
<span class="inline-flex items-center rounded-md bg-gray-50 px-1 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10" title="unique">U</span>
|
|
386
|
-
{% endif %}
|
|
387
|
-
</td>
|
|
388
|
-
<td class="whitespace-nowrap px-1 py-2 text-sm text-gray-500 w-1/12">
|
|
389
|
-
{% if field.type %}
|
|
390
|
-
{{ field.type }}
|
|
391
|
-
{% endif %}
|
|
392
|
-
</td>
|
|
393
|
-
<td class="px-3 py-2 text-sm text-gray-500 w-7/12">
|
|
394
|
-
<div class="text-gray-400">{{ field.description or "No description" }}</div>
|
|
395
|
-
{# TODO add format information #}
|
|
396
|
-
</td>
|
|
397
|
-
|
|
204
|
+
<th scope="colgroup" colspan="4"
|
|
205
|
+
class="py-2 pl-4 pr-3 text-left text-sm font-normal sm:pl-6 bg-white">
|
|
206
|
+
{{ render_partial('partials/quality.html', quality = quality)}}
|
|
207
|
+
</th>
|
|
398
208
|
</tr>
|
|
399
209
|
{% endfor %}
|
|
210
|
+
{% endif %}
|
|
400
211
|
|
|
401
|
-
|
|
212
|
+
{% if model.primaryKey %}
|
|
213
|
+
<tr class="bg-gray-50">
|
|
214
|
+
<th scope="colgroup" colspan="4"
|
|
215
|
+
class="py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
216
|
+
<span>Primary Key: {{ model.primaryKey }}</span>
|
|
217
|
+
</th>
|
|
218
|
+
</tr>
|
|
219
|
+
{% endif %}
|
|
220
|
+
|
|
221
|
+
</tfoot>
|
|
222
|
+
{% endif %}
|
|
402
223
|
</table>
|
|
403
224
|
</div>
|
|
404
225
|
</div>
|
|
405
226
|
</div>
|
|
406
227
|
</div>
|
|
407
228
|
{% endfor %}
|
|
229
|
+
</section>
|
|
408
230
|
|
|
231
|
+
{% if datacontract.definitions %}
|
|
232
|
+
<section id="definitions">
|
|
233
|
+
<div class="px-4 sm:px-0">
|
|
234
|
+
<h1 class="text-base font-semibold leading-6 text-gray-900">Definitions</h1>
|
|
235
|
+
<p class="text-sm text-gray-500">Domain specific definitions in the data contract</p>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
{% for definition_name, definition in datacontract.definitions.items() %}
|
|
239
|
+
{{ render_partial('partials/definition.html', definition_name = definition_name, definition = definition)}}
|
|
240
|
+
{% endfor %}
|
|
409
241
|
</section>
|
|
242
|
+
{% endif %}
|
|
410
243
|
|
|
411
|
-
{
|
|
244
|
+
{% if datacontract.examples %}
|
|
245
|
+
<section id="examples">
|
|
246
|
+
<div class="px-4 sm:px-0">
|
|
247
|
+
<h1 class="text-base font-semibold leading-6 text-gray-900">Examples</h1>
|
|
248
|
+
<p class="text-sm text-gray-500">Examples for models in the data contract</p>
|
|
249
|
+
</div>
|
|
250
|
+
{% for example in datacontract.examples %}
|
|
251
|
+
{{ render_partial('partials/example.html', example = example) }}
|
|
252
|
+
{% endfor %}
|
|
253
|
+
</section>
|
|
254
|
+
{% endif %}
|
|
412
255
|
|
|
413
|
-
{
|
|
256
|
+
{% if datacontract.servicelevels %}
|
|
257
|
+
<section id="servicelevels">
|
|
258
|
+
{{ render_partial('partials/datacontract_servicelevels.html', datacontract = datacontract ) }}
|
|
259
|
+
</section>
|
|
260
|
+
{% endif %}
|
|
414
261
|
|
|
415
262
|
{% if quality_specification %}
|
|
416
263
|
<section id="quality">
|
|
@@ -421,8 +268,6 @@
|
|
|
421
268
|
<p class="text-sm text-gray-500">
|
|
422
269
|
<span>{{ datacontract.quality.type }}</span>
|
|
423
270
|
</p>
|
|
424
|
-
|
|
425
|
-
|
|
426
271
|
</div>
|
|
427
272
|
<div class="mt-2 overflow-hidden shadow sm:rounded-lg bg-white">
|
|
428
273
|
<div class="px-4 py-5 sm:px-6">
|
|
@@ -435,7 +280,6 @@
|
|
|
435
280
|
{% endif %}
|
|
436
281
|
|
|
437
282
|
</div>
|
|
438
|
-
|
|
439
283
|
</div>
|
|
440
284
|
|
|
441
285
|
<div class="mt-6 text-sm text-gray-400">
|
|
@@ -489,7 +333,8 @@
|
|
|
489
333
|
</div>
|
|
490
334
|
<div class="mt-8 md:order-1 md:mt-0">
|
|
491
335
|
<p class="text-center leading-5 text-gray-400">
|
|
492
|
-
Supported
|
|
336
|
+
Supported by <a href="https://datacontract-manager.com"
|
|
337
|
+
class="text-gray-400 hover:text-gray-500">Data Contract Manager</a>
|
|
493
338
|
</p>
|
|
494
339
|
</div>
|
|
495
340
|
</div>
|