datacontract-cli 0.10.18__py3-none-any.whl → 0.10.19__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.
- datacontract/cli.py +20 -27
- datacontract/data_contract.py +7 -8
- datacontract/engines/soda/connections/duckdb.py +22 -9
- datacontract/export/data_caterer_converter.py +20 -7
- datacontract/export/sodacl_converter.py +21 -4
- datacontract/export/sql_type_converter.py +7 -2
- datacontract/imports/csv_importer.py +89 -0
- datacontract/imports/importer.py +1 -0
- datacontract/imports/importer_factory.py +5 -0
- datacontract/init/init_template.py +20 -0
- datacontract/integration/datamesh_manager.py +5 -10
- datacontract/lint/linters/field_reference_linter.py +10 -1
- datacontract/lint/resolve.py +22 -1
- datacontract/lint/schema.py +10 -3
- datacontract/model/data_contract_specification.py +2 -0
- datacontract/schemas/datacontract-1.1.0.init.yaml +91 -0
- datacontract/schemas/datacontract-1.1.0.schema.json +1975 -0
- datacontract/schemas/odcs-3.0.1.schema.json +2634 -0
- datacontract/templates/datacontract.html +20 -1
- datacontract/templates/partials/definition.html +15 -5
- datacontract/templates/partials/model_field.html +9 -0
- {datacontract_cli-0.10.18.dist-info → datacontract_cli-0.10.19.dist-info}/METADATA +445 -295
- {datacontract_cli-0.10.18.dist-info → datacontract_cli-0.10.19.dist-info}/RECORD +27 -23
- datacontract/init/download_datacontract_file.py +0 -17
- {datacontract_cli-0.10.18.dist-info → datacontract_cli-0.10.19.dist-info}/LICENSE +0 -0
- {datacontract_cli-0.10.18.dist-info → datacontract_cli-0.10.19.dist-info}/WHEEL +0 -0
- {datacontract_cli-0.10.18.dist-info → datacontract_cli-0.10.19.dist-info}/entry_points.txt +0 -0
- {datacontract_cli-0.10.18.dist-info → datacontract_cli-0.10.19.dist-info}/top_level.txt +0 -0
|
@@ -125,9 +125,18 @@
|
|
|
125
125
|
<thead class="bg-gray-50">
|
|
126
126
|
<tr>
|
|
127
127
|
<th scope="colgroup" colspan="3" class="py-2 pl-4 pr-3 text-left font-semibold text-gray-900 sm:pl-6">
|
|
128
|
-
|
|
128
|
+
{% if model.title %}
|
|
129
|
+
{{ model.title }}
|
|
130
|
+
{% endif %}
|
|
131
|
+
{% if model.title != model_name %}
|
|
132
|
+
<span class="font-mono font-medium">{{ model_name }}</span>
|
|
133
|
+
{% endif %}
|
|
129
134
|
<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>
|
|
130
135
|
<div class="text-sm font-medium text-gray-500">{{ model.description }}</div>
|
|
136
|
+
{% for key, value in model.model_extra.items() %}
|
|
137
|
+
<span
|
|
138
|
+
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>
|
|
139
|
+
{% endfor %}
|
|
131
140
|
</th>
|
|
132
141
|
|
|
133
142
|
</tr>
|
|
@@ -137,6 +146,16 @@
|
|
|
137
146
|
{{ render_partial('partials/model_field.html', nested = False, field_name=field_name, field = field, level = 0) }}
|
|
138
147
|
{% endfor %}
|
|
139
148
|
</tbody>
|
|
149
|
+
{% if model.primaryKey %}
|
|
150
|
+
<tfoot class="bg-gray-50">
|
|
151
|
+
<tr>
|
|
152
|
+
<th scope="colgroup" colspan="4"
|
|
153
|
+
class="py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
154
|
+
<span>Primary Key: {{ model.primaryKey }}</span>
|
|
155
|
+
</th>
|
|
156
|
+
</tr>
|
|
157
|
+
</tfoot>
|
|
158
|
+
{% endif %}
|
|
140
159
|
</table>
|
|
141
160
|
</div>
|
|
142
161
|
</div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{% if definition.title %}
|
|
21
21
|
<div>{{ definition.title }}</div>
|
|
22
22
|
{% endif %}
|
|
23
|
-
<div class="font-mono">{{
|
|
23
|
+
<div class="font-mono">{{ definition_name }}</div>
|
|
24
24
|
</div>
|
|
25
25
|
</td>
|
|
26
26
|
<td class="whitespace-nowrap px-1 py-2 text-sm text-gray-500 w-1/12">
|
|
@@ -33,13 +33,23 @@
|
|
|
33
33
|
</td>
|
|
34
34
|
<td class="px-3 py-2 text-sm text-gray-500 w-9/12">
|
|
35
35
|
{% if definition.example %}
|
|
36
|
-
<div class="mt-1">
|
|
37
|
-
<span class="text-gray-600
|
|
36
|
+
<div class="mt-1 italic">
|
|
37
|
+
<span class="text-gray-600">Example:</span> <span class="font-mono">{{ definition.example }}</span>
|
|
38
38
|
</div>
|
|
39
39
|
{% endif %}
|
|
40
|
+
|
|
41
|
+
{% if definition.examples %}
|
|
42
|
+
<div class="mt-1 italic">
|
|
43
|
+
<span class="text-gray-600">Examples:</span>
|
|
44
|
+
{% for example in definition.examples %}
|
|
45
|
+
<span class="font-mono">{{ example }}</span>{% if not loop.last %}, {% endif %}
|
|
46
|
+
{% endfor %}
|
|
47
|
+
</div>
|
|
48
|
+
{% endif %}
|
|
49
|
+
|
|
40
50
|
{% if definition.tags %}
|
|
41
51
|
<div>
|
|
42
|
-
<span class="text-gray-600
|
|
52
|
+
<span class="text-gray-600 italic">Tags:</span>
|
|
43
53
|
{% for tag in definition.tags %}
|
|
44
54
|
<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 mr-1 mt-1">{{ tag }}</span>
|
|
45
55
|
{% endfor %}
|
|
@@ -47,7 +57,7 @@
|
|
|
47
57
|
{% endif %}
|
|
48
58
|
{% if definition.enum %}
|
|
49
59
|
<div class="py-2 text-sm">
|
|
50
|
-
<span class="text-gray-600
|
|
60
|
+
<span class="text-gray-600 italic">Enum:</span>
|
|
51
61
|
{% for value in definition.enum %}
|
|
52
62
|
<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 mr-1 mt-1">{{ value }}</span>
|
|
53
63
|
{% endfor %}
|
|
@@ -39,6 +39,15 @@
|
|
|
39
39
|
</div>
|
|
40
40
|
{% endif %}
|
|
41
41
|
|
|
42
|
+
{% if field.examples %}
|
|
43
|
+
<div class="mt-1 italic">
|
|
44
|
+
Examples:
|
|
45
|
+
{% for example in field.examples %}
|
|
46
|
+
<span class="font-mono">{{ example }}</span>{% if not loop.last %}, {% endif %}
|
|
47
|
+
{% endfor %}
|
|
48
|
+
</div>
|
|
49
|
+
{% endif %}
|
|
50
|
+
|
|
42
51
|
<div>
|
|
43
52
|
{% if field.primaryKey or field.primary %}
|
|
44
53
|
<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 mr-1 mt-1">primary</span>
|