datacontract-cli 0.10.2__py3-none-any.whl → 0.10.3__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.

@@ -53,8 +53,10 @@ def create_index_html(contracts, path):
53
53
  )
54
54
 
55
55
  # Load the required template
56
+ # needs to be included in /MANIFEST.in
56
57
  template = env.get_template("index.html")
57
58
 
59
+ # needs to be included in /MANIFEST.in
58
60
  style_content, _, _ = package_loader.get_source(env, "style/output.css")
59
61
 
60
62
  tz = pytz.timezone("UTC")
@@ -6,7 +6,8 @@ import pytz
6
6
  import yaml
7
7
  from jinja2 import Environment, PackageLoader, select_autoescape
8
8
 
9
- from datacontract.model.data_contract_specification import DataContractSpecification
9
+ from datacontract.model.data_contract_specification import \
10
+ DataContractSpecification
10
11
 
11
12
 
12
13
  def to_html(data_contract_spec: DataContractSpecification) -> str:
@@ -21,6 +22,7 @@ def to_html(data_contract_spec: DataContractSpecification) -> str:
21
22
  )
22
23
 
23
24
  # Load the required template
25
+ # needs to be included in /MANIFEST.in
24
26
  template = env.get_template("datacontract.html")
25
27
 
26
28
  if data_contract_spec.quality is not None and isinstance(data_contract_spec.quality.specification, str):
@@ -0,0 +1,168 @@
1
+ <!doctype html>
2
+ <html class="h-full bg-gray-100" lang="en">
3
+ <head>
4
+ <title>Data Contract</title>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ {# <script src="https://cdn.tailwindcss.com"></script> #}
8
+ <style>
9
+ {{style | safe }}
10
+ </style>
11
+ </head>
12
+ <body class="h-full">
13
+
14
+ <div class="min-h-full flex flex-col">
15
+
16
+ <nav class="bg-white shadow-sm">
17
+ <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
18
+ <div class="flex h-16 justify-between">
19
+ <div class="flex">
20
+ <div class="flex flex-shrink-0 items-center mr-6">
21
+ <a class="text-xl text-gray-900 font-semibold" href="/">
22
+ Data Contracts
23
+ </a>
24
+ </div>
25
+ </div>
26
+ <div class="hidden sm:ml-6 sm:flex sm:items-center">
27
+ <a href="https://datacontract.com" class="text-sky-500 hover:text-gray-700 text-sm font-semibold" target="_blank">datacontract.com</a>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </nav>
32
+
33
+ <main class="pb-7">
34
+
35
+ <div class="pt-5 mx-auto max-w-7xl sm:px-6 lg:px-8">
36
+ <div>
37
+ <div class="lg:flex lg:items-center lg:justify-between px-4 sm:px-0">
38
+ <div class="min-w-0 flex-1">
39
+ <h2 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">
40
+ Data Contract Catalog</h2>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div>
48
+
49
+ <div class="space-y-6 mt-6">
50
+
51
+ <section id="catalog">
52
+
53
+ {# TODO search and filter form #}
54
+
55
+ <ul role="list" class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 ">
56
+
57
+ {% for contract in contracts %}
58
+
59
+ <li class="col-span-1 rounded-lg bg-white shadow hover:bg-gray-50">
60
+ <a href="{{contract.html_link}}" >
61
+ <div class="flex w-full justify-between space-x-1 p-6 pb-4">
62
+ <div class="flex-1 truncate">
63
+ <div class="flex items-center space-x-3">
64
+ <h3 class="truncate text-sm font-medium text-gray-900">{{contract.spec.info.title}}</h3>
65
+ </div>
66
+ <div class="flex flex-wrap mt-1 text-sm text-gray-500 gap-1">
67
+ {% if contract.spec.info.owner %}
68
+ <div class="flex items-center text-sm text-gray-500">
69
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.25" stroke="currentColor" class="w-4 h-4 mr-1.5">
70
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z" />
71
+ </svg>
72
+ <span>{{contract.spec.info.owner}}</span>
73
+ </div>
74
+ {% endif %}
75
+ </div>
76
+
77
+ </div>
78
+ <div class="h-10 w-10 flex-shrink-0 rounded-full">
79
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M21.14 6.94a.77.77 0 0 0-.48.2c-1-.8-2.14-.25-3 .72A16.12 16.12 0 0 0 16.15 10a.28.28 0 0 0 .4.32c.08 0 1.39-1.21 1.47-1.28.73-.68 1.35-1.42 1.81-1.48s.32 0 .41.09a19 19 0 0 0-2.07 2.81c0 .12-.31 0 1.53 1.71l.27.24C19 13.57 16 16.73 15.74 17a2.66 2.66 0 0 1-1 .43 3.72 3.72 0 0 1-.22-1.52L17.7 12a.3.3 0 0 0-.47-.37c-.72.88-3.45 3.39-3.69 3.91a4 4 0 0 0 .28 2.62 1 1 0 0 0 .93.32 4.26 4.26 0 0 0 1.76-.65c.6-.62 3.86-4.79 4.65-5.31a20 20 0 0 0 1.77-1.64 4.67 4.67 0 0 0 1-1.37c.5-1.57-1.82-2.66-2.79-2.57Zm1.66 2.33a12.9 12.9 0 0 1-1.58 1.88c-.91 1-.65.74-1 .46-1.52-1.26-1.33-1-1.27-1.21l2-2.16c.34-.38-.06-.45.7-.15.44.16 1.43.63 1.15 1.18Z" fill="#020202" fill-rule="evenodd"></path><path d="M7.2 22.53c-1.48-.25-1.48-2.11-1.61-3.53a40 40 0 0 1 .15-6.57c.18-2.46.6-2.25.59-5.51 0-1.73-.33-4.06-1.79-5a40.29 40.29 0 0 1 6.24.08c2.64.18 5.71-.14 6.91.63C19.23 3.63 18.12 6 19 6a.32.32 0 0 0 .31-.36c-.06-1.31.24-2.44-.81-3.44A5.82 5.82 0 0 0 14.76 1a75.46 75.46 0 0 0-8.57 0C5.77 1 1.6 1.5 1 2.08A3.17 3.17 0 0 0 0 4.5 4.61 4.61 0 0 0 .72 7a1.92 1.92 0 0 0 .93.62c1 .31 3.24.25 2.86-.55C4.4 6.8 3.19 7 3.11 7a2.35 2.35 0 0 1-1.77-.56 3.77 3.77 0 0 1-.48-2 2.31 2.31 0 0 1 .76-1.73 3.54 3.54 0 0 1 1.27-.31c1.11 0 1.64.66 2 1.73a14.13 14.13 0 0 1 .3 4.46 33 33 0 0 0-.55 7c0 1.43.19 5 .84 6.22a2.1 2.1 0 0 0 1.67 1.24.3.3 0 0 0 .05-.52Z" fill="#020202" fill-rule="evenodd"></path><path d="M21.85 19.54a8 8 0 0 1-1.71-3.19.29.29 0 1 0-.57.15c.75 3.33 2.18 4 2.79 4.79-.34.08-13.26 1.1-14 1a.33.33 0 1 0-.09.66c1.61.26 10.59-.22 13.1-.49a3 3 0 0 0 2-.65c.63-.67-.71-1.47-1.52-2.27Z" fill="#020202" fill-rule="evenodd"></path><path d="M9.67 16.86c.39 0 .46.84.5 1.26 0 .13-.07.78.35.95a.51.51 0 0 0 .45 0c1.63-.85.93-.18 1.46-.18.68 0 .56-1.39-1.25-1 0-1.24-.34-2.29-1.59-2.2a2.75 2.75 0 0 0-2.18 1.81 3.92 3.92 0 0 0-.34 1.05c.11 1.84.86-1.68 2.6-1.69Z" fill="#0c6fff" fill-rule="evenodd"></path><path d="M8.57 8.41c5.28.19 2.32 0 6.08 0a.34.34 0 0 0 .35-.35.47.47 0 0 0-.39-.37c-.28-.06-2.1-.3-2.94-.33a17.84 17.84 0 0 0-3.84.48.31.31 0 0 0 .2.53c.09.02.48.04.54.04Z" fill="#0c6fff" fill-rule="evenodd"></path><path d="M13.22 11.64c-5.2-.15-5.49.12-5.57.34a.3.3 0 0 0 .17.38 1.23 1.23 0 0 0 .44.1c.84.06 7.28.38 7.24-.42-.03-.58-1.37-.33-2.28-.4Z" fill="#0c6fff" fill-rule="evenodd"></path></g></svg>
80
+ </div>
81
+ </div>
82
+ <div class="flex w-full items-center justify-between px-6 pb-6">
83
+ <p class="text-sm text-gray-500 line-clamp-3">
84
+ {{contract.spec.info.description}}
85
+ </p>
86
+ </div>
87
+
88
+ </a>
89
+ </li>
90
+ {% endfor %}
91
+ </ul>
92
+
93
+ {% if contracts_size == 0 %}
94
+ <p>The data contract catalog is empty.</p>
95
+ <p>
96
+ Learn more on data contracts on <a href="http://datacontract.com" class="text-sky-500 hover:text-gray-700 text-sm font-semibold">http://datacontract.com</a>.
97
+ </p>
98
+ {% endif %}
99
+
100
+
101
+ </section>
102
+
103
+ </div>
104
+
105
+ </div>
106
+
107
+ <div class="mt-6 text-sm text-gray-400">
108
+ Created at {{formatted_date}} with <a href="https://cli.datacontract.com" class="text-gray-400 hover:text-gray-500">Data Contract CLI</a> v{{datacontract_cli_version}}
109
+ </div>
110
+
111
+ </div>
112
+ </main>
113
+
114
+ <dialog id="dialog-datacontract-yaml" class="relative z-10" aria-labelledby="modal-title" aria-modal="true">
115
+ <div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
116
+
117
+ <div class="fixed inset-0 z-10 w-screen overflow-y-auto">
118
+ <div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
119
+ <div class="relative transform rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-4/5 sm:p-6">
120
+ <div class="absolute right-0 top-0 pr-4 pt-4">
121
+ <button type="button" onclick="document.getElementById('dialog-datacontract-yaml').close()" class="rounded-md bg-white text-gray-400 hover:text-gray-500">
122
+ <span class="sr-only">Close</span>
123
+ <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
124
+ <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
125
+ </svg>
126
+ </button>
127
+ </div>
128
+ <div>
129
+ <div class="mt-3 mb-3 text-center sm:mt-5">
130
+
131
+ <h3 class="text-base font-semibold leading-6 text-gray-900" id="modal-title">Data Contract YAML</h3>
132
+ </div>
133
+ <pre class="overflow-x-auto text-sm bg-gray-50 p-4"><code>{{datacontract_yaml}}</code></pre>
134
+ </div>
135
+ <div class="mt-5 sm:mt-6">
136
+ <button type="button" onclick="document.getElementById('dialog-datacontract-yaml').close()"
137
+ class="inline-flex w-full justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Close</button>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </div>
142
+ </dialog>
143
+
144
+
145
+ <footer class="bg-white mt-auto text-sm text-gray-400">
146
+ <div class="mx-auto max-w-7xl py-5 px-6 md:flex md:items-center md:justify-between lg:px-8">
147
+ <div class="flex justify-center space-x-6 md:order-2">
148
+ <div>
149
+ <a href="https://cli.datacontract.com" class="text-gray-400 hover:text-gray-500 px-2">Data Contract CLI</a>
150
+
151
+ <a href="https://datacontract.com" class="text-gray-400 hover:text-gray-500 px-2">Data Contract Specification</a>
152
+ </div>
153
+
154
+
155
+ </div>
156
+ <div class="mt-8 md:order-1 md:mt-0">
157
+ <p class="text-center leading-5 text-gray-400">
158
+ Supported with ❤️ by <a href="https://datamesh-manager.com" class="text-gray-400 hover:text-gray-500">Data Mesh Manager</a>
159
+ </p>
160
+ </div>
161
+ </div>
162
+
163
+ </footer>
164
+
165
+ </div>
166
+
167
+ </body>
168
+ </html>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datacontract-cli
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary: Test data contracts
5
5
  Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>
6
6
  Project-URL: Homepage, https://cli.datacontract.com
@@ -4,7 +4,7 @@ datacontract/data_contract.py,sha256=NonmJ1YIKRtQXUanft30WJt8BKh67Si-71jOw6HIsic
4
4
  datacontract/web.py,sha256=SWglmbqy3NV5h4VDsG0OpwhASJT9uve7w6FPwkBjIYM,457
5
5
  datacontract/breaking/breaking.py,sha256=Abw59Xd_CypS6Us-hvsGnPvCUo-a-cl8RzDCmjG4yfk,11719
6
6
  datacontract/breaking/breaking_rules.py,sha256=0ExDYOj5Clyq6sIRIXTpxSbcRxMHYrMqJXqZ92goKsA,3032
7
- datacontract/catalog/catalog.py,sha256=O471eXvdl-ttRG2qDEHn1hb7Drr4o68d_86MFKBf7JA,2458
7
+ datacontract/catalog/catalog.py,sha256=wRD1WFYlSC3LT30bbX7rCDoxWN259EU2B4f6j9lQSrE,2552
8
8
  datacontract/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py,sha256=TXO47ON3NjwYI4Y2eBYklMOCo7vAtYzqLPAhZhii6dg,1565
10
10
  datacontract/engines/datacontract/check_that_datacontract_file_exists.py,sha256=XHvxX6BrTdZk2wN55zd6ER4k7ILDyGzjbCbZxQAJ2iE,665
@@ -25,7 +25,7 @@ datacontract/export/avro_idl_converter.py,sha256=_2acoImuBqNqEt97OpBSewWT_w3aDBO
25
25
  datacontract/export/csv_type_converter.py,sha256=ZZuJwBgQnafZC7PPvAXsBf2IajPJq8TYZ1l8Qq0GYeI,1290
26
26
  datacontract/export/dbt_converter.py,sha256=7ruAOEh5OgWZcmGsN4pjD5EQE6b_RVzRwOPAJRdrvyE,8543
27
27
  datacontract/export/great_expectations_converter.py,sha256=nJwYgyQhvbApZDZ54hPFKVoVeEOWSA7Zxf6_ZIsapdI,4890
28
- datacontract/export/html_export.py,sha256=n0dhxgqC36Ho6mVBmHV6cMoTMW_fQywD9nXyTwvAK9Q,2232
28
+ datacontract/export/html_export.py,sha256=MafHZ0pYELdCgKoMTQDtQCqCNO6LCQZGD288yn5Drko,2281
29
29
  datacontract/export/jsonschema_converter.py,sha256=wN2Zx8wXOyaXsSt1azlDS_4ctFUZ9EKTgJ2RRq5Rqy4,3147
30
30
  datacontract/export/odcs_converter.py,sha256=MHvIbvJKI-OB5JJaobCcegkvn_GxVhfTLoRDXRm133w,3726
31
31
  datacontract/export/protobuf_converter.py,sha256=K40yEdfRLYDLUx8bn3_an-cwdHfWv8_SBgzGLJT6mX4,2974
@@ -59,10 +59,11 @@ datacontract/model/data_contract_specification.py,sha256=etwFSrpa2gyF20u5AOXhyv1
59
59
  datacontract/model/exceptions.py,sha256=zW9NoyzwsND-c9UqgyTVuezUVGEc6KK1Uc2zl12loyo,1178
60
60
  datacontract/model/run.py,sha256=v7QNsPwYS1otQrpjeOaFsLRnxO8OgbdK_d-Z_e3iy0s,2610
61
61
  datacontract/templates/datacontract.html,sha256=nXP_0YZtB8yG8mGfItO7jbujoPw1Bt3-_6Ri2mqqWg0,28099
62
+ datacontract/templates/index.html,sha256=TgPBVAsfn77zdSS2zZDFqjyHy-fs4BAhCou0qeDJBhA,9523
62
63
  datacontract/templates/style/output.css,sha256=kbDuhgaN0RYfmMKPPJPo5p_aoWmY2gUDtrxUQCkq_-g,23673
63
- datacontract_cli-0.10.2.dist-info/LICENSE,sha256=23h64qnSeIZ0DKeziWAKC-zBCt328iSbRbWBrXoYRb4,2210
64
- datacontract_cli-0.10.2.dist-info/METADATA,sha256=pvvtIUZP0zPDqL37FX1crtUdERKqA-euP86IE20IXRo,63241
65
- datacontract_cli-0.10.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
66
- datacontract_cli-0.10.2.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
67
- datacontract_cli-0.10.2.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
68
- datacontract_cli-0.10.2.dist-info/RECORD,,
64
+ datacontract_cli-0.10.3.dist-info/LICENSE,sha256=23h64qnSeIZ0DKeziWAKC-zBCt328iSbRbWBrXoYRb4,2210
65
+ datacontract_cli-0.10.3.dist-info/METADATA,sha256=-nZPSBlke7bbzvYobgKi7_bJbcS6AeHLX7Srqw3ted0,63241
66
+ datacontract_cli-0.10.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
67
+ datacontract_cli-0.10.3.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
68
+ datacontract_cli-0.10.3.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
69
+ datacontract_cli-0.10.3.dist-info/RECORD,,