datacontract-cli 0.10.37__py3-none-any.whl → 0.10.40__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.
@@ -282,10 +282,10 @@
282
282
  <th scope="colgroup" colspan="5"
283
283
  class="py-2 pl-4 pr-3 text-left font-semibold text-gray-900 sm:pl-6">
284
284
  {% if schema.name %}
285
- <span class="font-semibold">{{ schema.name }}</span>
285
+ <span class="font-semibold" id="{{ schema.name }}">{{ schema.name }}</span>
286
286
  {% endif %}
287
287
  {% if schema.physicalName and schema.physicalName != schema.name %}
288
- <span class="font-mono font-medium text-gray-600">({{ schema.physicalName }})</span>
288
+ <span class="font-mono font-medium text-gray-600" id="{{ schema.physicalName }}">({{ schema.physicalName }})</span>
289
289
  {% endif %}
290
290
  <span
291
291
  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">{{ schema.physicalType or schema.logicalType }}</span>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datacontract-cli
3
- Version: 0.10.37
3
+ Version: 0.10.40
4
4
  Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
5
5
  Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://cli.datacontract.com
8
8
  Project-URL: Issues, https://github.com/datacontract/datacontract-cli/issues
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.10
11
+ Requires-Python: <3.13,>=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: typer<0.20,>=0.15.1
@@ -29,7 +29,7 @@ Requires-Dist: boto3<2.0.0,>=1.34.41
29
29
  Requires-Dist: Jinja2<4.0.0,>=3.1.5
30
30
  Requires-Dist: jinja_partials<1.0.0,>=0.2.1
31
31
  Requires-Dist: datacontract-specification<2.0.0,>=1.2.3
32
- Requires-Dist: open-data-contract-standard<4.0.0,>=3.0.5
32
+ Requires-Dist: open-data-contract-standard<4.0.0,>=3.1.0
33
33
  Provides-Extra: avro
34
34
  Requires-Dist: avro==1.12.0; extra == "avro"
35
35
  Provides-Extra: bigquery
@@ -42,10 +42,10 @@ Provides-Extra: databricks
42
42
  Requires-Dist: soda-core-spark-df<3.6.0,>=3.3.20; extra == "databricks"
43
43
  Requires-Dist: soda-core-spark[databricks]<3.6.0,>=3.3.20; extra == "databricks"
44
44
  Requires-Dist: databricks-sql-connector<4.2.0,>=3.7.0; extra == "databricks"
45
- Requires-Dist: databricks-sdk<0.68.0; extra == "databricks"
45
+ Requires-Dist: databricks-sdk<0.74.0; extra == "databricks"
46
46
  Requires-Dist: pyspark<4.0.0,>=3.5.5; extra == "databricks"
47
47
  Provides-Extra: iceberg
48
- Requires-Dist: pyiceberg==0.9.1; extra == "iceberg"
48
+ Requires-Dist: pyiceberg==0.10.0; extra == "iceberg"
49
49
  Provides-Extra: kafka
50
50
  Requires-Dist: datacontract-cli[avro]; extra == "kafka"
51
51
  Requires-Dist: soda-core-spark-df<3.6.0,>=3.3.20; extra == "kafka"
@@ -60,6 +60,8 @@ Requires-Dist: snowflake-connector-python[pandas]<4.1,>=3.6; extra == "snowflake
60
60
  Requires-Dist: soda-core-snowflake<3.6.0,>=3.3.20; extra == "snowflake"
61
61
  Provides-Extra: sqlserver
62
62
  Requires-Dist: soda-core-sqlserver<3.6.0,>=3.3.20; extra == "sqlserver"
63
+ Provides-Extra: oracle
64
+ Requires-Dist: soda-core-oracle<3.6.0,>=3.3.20; extra == "oracle"
63
65
  Provides-Extra: athena
64
66
  Requires-Dist: soda-core-athena<3.6.0,>=3.3.20; extra == "athena"
65
67
  Provides-Extra: trino
@@ -78,19 +80,20 @@ Requires-Dist: uvicorn==0.38.0; extra == "api"
78
80
  Provides-Extra: protobuf
79
81
  Requires-Dist: grpcio-tools>=1.53; extra == "protobuf"
80
82
  Provides-Extra: all
81
- Requires-Dist: datacontract-cli[api,athena,bigquery,csv,databricks,dbml,dbt,excel,iceberg,kafka,parquet,postgres,protobuf,rdf,s3,snowflake,sqlserver,trino]; extra == "all"
83
+ Requires-Dist: datacontract-cli[api,athena,bigquery,csv,databricks,dbml,dbt,excel,iceberg,kafka,oracle,parquet,postgres,protobuf,rdf,s3,snowflake,sqlserver,trino]; extra == "all"
82
84
  Provides-Extra: dev
83
85
  Requires-Dist: datacontract-cli[all]; extra == "dev"
84
86
  Requires-Dist: httpx==0.28.1; extra == "dev"
85
87
  Requires-Dist: kafka-python; extra == "dev"
88
+ Requires-Dist: minio==7.2.17; extra == "dev"
86
89
  Requires-Dist: moto==5.1.13; extra == "dev"
87
90
  Requires-Dist: pandas>=2.1.0; extra == "dev"
88
- Requires-Dist: pre-commit<4.4.0,>=3.7.1; extra == "dev"
91
+ Requires-Dist: pre-commit<4.5.0,>=3.7.1; extra == "dev"
89
92
  Requires-Dist: pytest; extra == "dev"
90
93
  Requires-Dist: pytest-xdist; extra == "dev"
91
- Requires-Dist: pymssql==2.3.8; extra == "dev"
94
+ Requires-Dist: pymssql==2.3.9; extra == "dev"
92
95
  Requires-Dist: ruff; extra == "dev"
93
- Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.12.0; extra == "dev"
96
+ Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.13.3; extra == "dev"
94
97
  Requires-Dist: trino==0.336.0; extra == "dev"
95
98
  Dynamic: license-file
96
99
 
@@ -104,7 +107,7 @@ Dynamic: license-file
104
107
  <a href="https://datacontract.com/slack" rel="nofollow"><img src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&amp;style=social" alt="Slack Status" data-canonical-src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&amp;style=social" style="max-width: 100%;"></a>
105
108
  </p>
106
109
 
107
- The `datacontract` CLI is an open-source command-line tool for working with data contracts.
110
+ The `datacontract` CLI is a popular and [recognized](https://www.thoughtworks.com/en-de/radar/tools/summary/data-contract-cli) open-source command-line tool for working with data contracts.
108
111
  It uses data contract YAML files as [Data Contract Specification](https://datacontract.com/) or [ODCS](https://bitol-io.github.io/open-data-contract-standard/latest/) to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
109
112
 
110
113
  ![Main features of the Data Contract CLI](datacontractcli.png)
@@ -475,6 +478,7 @@ Supported server types:
475
478
  - [bigquery](#bigquery)
476
479
  - [azure](#azure)
477
480
  - [sqlserver](#sqlserver)
481
+ - [oracle](#oracle)
478
482
  - [databricks](#databricks)
479
483
  - [databricks (programmatic)](#databricks-programmatic)
480
484
  - [dataframe (programmatic)](#dataframe-programmatic)
@@ -698,6 +702,55 @@ models:
698
702
 
699
703
 
700
704
 
705
+ #### Oracle
706
+
707
+ Data Contract CLI can test data in Oracle Database.
708
+
709
+ ##### Example
710
+
711
+ datacontract.yaml
712
+ ```yaml
713
+ servers:
714
+ oracle:
715
+ type: oracle
716
+ host: localhost
717
+ port: 1521
718
+ service_name: ORCL
719
+ schema: ADMIN
720
+ models:
721
+ my_table_1: # corresponds to a table
722
+ type: table
723
+ fields:
724
+ my_column_1: # corresponds to a column
725
+ type: decimal
726
+ description: Decimal number
727
+ my_column_2: # corresponds to another column
728
+ type: text
729
+ description: Unicode text string
730
+ config:
731
+ oracleType: NVARCHAR2 # optional: can be used to explicitly define the type used in the database
732
+ # if not set a default mapping will be used
733
+ ```
734
+
735
+ ##### Environment Variables
736
+
737
+ These environment variable specify the credentials used by the datacontract tool to connect to the database.
738
+ If you've started the database from a container, e.g. [oracle-free](https://hub.docker.com/r/gvenzl/oracle-free)
739
+ this should match either `system` and what you specified as `ORACLE_PASSWORD` on the container or
740
+ alternatively what you've specified under `APP_USER` and `APP_USER_PASSWORD`.
741
+ If you require thick mode to connect to the database, you need to have an Oracle Instant Client
742
+ installed on the system and specify the path to the installation within the environment variable
743
+ `DATACONTRACT_ORACLE_CLIENT_DIR`.
744
+
745
+ | Environment Variable | Example | Description |
746
+ |--------------------------------------------------|--------------------|--------------------------------------------|
747
+ | `DATACONTRACT_ORACLE_USERNAME` | `system` | Username |
748
+ | `DATACONTRACT_ORACLE_PASSWORD` | `0x162e53` | Password |
749
+ | `DATACONTRACT_ORACLE_CLIENT_DIR` | `C:\oracle\client` | Path to Oracle Instant Client installation |
750
+
751
+
752
+
753
+
701
754
  #### Databricks
702
755
 
703
756
  Works with Unity Catalog and Hive metastore.
@@ -1,7 +1,7 @@
1
1
  datacontract/__init__.py,sha256=ThDdxDJsd7qNErLoh628nK5M7RzhJNYCmN-C6BAJFoo,405
2
2
  datacontract/api.py,sha256=nFmrJOhC5AygY9YS1VXsbvKNtW92B8AF-lXdhuCvcPE,8578
3
- datacontract/cli.py,sha256=ix1iwdo8bGfUW_tf1qiSoLhGBKCLcIgpVgn6diV9MB0,20742
4
- datacontract/data_contract.py,sha256=24QE2ym5dfwTP6vJ0OmW37GNfGCCV6y4x4-J5Ouvfjk,13248
3
+ datacontract/cli.py,sha256=SeIfc_VOzqsqsO87JkllxQZTgmUyYdQO8CWWRnKAy_o,20730
4
+ datacontract/data_contract.py,sha256=fU_dwjncNcyoyzvQVTk53ZJsUnY2m8biRKXIzUyKyqM,13236
5
5
  datacontract/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  datacontract/breaking/breaking.py,sha256=DnqgxUjD-EAZcg5RBizOP9a2WxsFTaQBik0AB_m3K00,20431
7
7
  datacontract/breaking/breaking_change.py,sha256=BIDEUo1U2CQLVT2-I5PyFttxAj6zQPI1UUkEoOOQXMY,2249
@@ -15,12 +15,13 @@ datacontract/engines/datacontract/check_that_datacontract_file_exists.py,sha256=
15
15
  datacontract/engines/fastjsonschema/check_jsonschema.py,sha256=EKPkFM8iGyiWsHw8peErhQvbt9gu_zJ2S-NDQnupfeM,10921
16
16
  datacontract/engines/fastjsonschema/s3/s3_read_files.py,sha256=0sTDWvuu0AzSgn7fKWJxGaTmPww00TFYyDK-X0s5T3c,1193
17
17
  datacontract/engines/soda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- datacontract/engines/soda/check_soda_execute.py,sha256=qc56ZNKyHIoSFgoXzBRioOhnhgsFSJ6L-nyBU7d0fW8,8902
19
- datacontract/engines/soda/connections/athena.py,sha256=wjrJA9CHhl6FbSW0HulWcYlkT2_nY1s19Y2MFe4lbCU,3028
18
+ datacontract/engines/soda/check_soda_execute.py,sha256=jOFeylYtixxsX9xk14vPRM7d6jI8ZH3uuCFR6bnTSwg,9241
19
+ datacontract/engines/soda/connections/athena.py,sha256=x-DCEN8LCoy-8nGhEv7ty22s6mQpr-W8HtWQveXgdgA,3024
20
20
  datacontract/engines/soda/connections/bigquery.py,sha256=C-8kxmzpYe88bJp80ObHFLMh4rpnIjnUQ7XOj0Ke7lk,903
21
21
  datacontract/engines/soda/connections/databricks.py,sha256=cMRasuO0MrSKVgHPB-9uFTGTZPFg6z9Kpk3tJ0SdR0s,943
22
22
  datacontract/engines/soda/connections/duckdb_connection.py,sha256=wGiB6EKr-OZosEFvT2gkutFgAzAxFMKicfpjbIJUZwQ,9332
23
23
  datacontract/engines/soda/connections/kafka.py,sha256=lnj_-3-CnJ6stetGqm6HOzN1Qatlw7xoCQU2zKBIXxU,8725
24
+ datacontract/engines/soda/connections/oracle.py,sha256=4uEBce67MbOZR8kQqmcsN0bgl1xibd_CfS5JEPiCqm0,1750
24
25
  datacontract/engines/soda/connections/postgres.py,sha256=9GTF4Es3M5vb7ocSGqAxXmslvkS5CjsPQGIuo020CFc,626
25
26
  datacontract/engines/soda/connections/snowflake.py,sha256=rfG2ysuqNM6TkvyqQKcGHFsTGJ6AROmud5VleUDRrb0,749
26
27
  datacontract/engines/soda/connections/sqlserver.py,sha256=RzGLbCUdRyfmDcqtM_AB9WZ-Xk-XYX91nkXpVNpYbvc,1440
@@ -46,7 +47,7 @@ datacontract/export/iceberg_converter.py,sha256=ArcQ_Y3z_W4_kGDU_8jPRx2-pHpP3Nhx
46
47
  datacontract/export/jsonschema_converter.py,sha256=2MT82MurcQQbrVDRj1kFsxnmFd9scNSfYI1upQSecl4,5631
47
48
  datacontract/export/markdown_converter.py,sha256=J6QEGuopR9AUyEhux1GpjmJaQa1iihsbNMAmGRQ63BQ,10430
48
49
  datacontract/export/mermaid_exporter.py,sha256=Hg2yc5DYDTEZ7etoIhB1LU6rob_sGlouDtkPxUtf6kQ,4008
49
- datacontract/export/odcs_v3_exporter.py,sha256=b__AiPAnCUuFQE5DPHsvXBrMeEl1t_mJ1vzTx84TMlI,13931
50
+ datacontract/export/odcs_v3_exporter.py,sha256=BctUnBG9E9seo-pvgBCXB6wkokmjpF7JUJmr1YXqqOo,14055
50
51
  datacontract/export/pandas_type_converter.py,sha256=464pQ3JQKFQa1TO0HBNcEoZvQye_yUbY6jQtiBaphSc,1117
51
52
  datacontract/export/protobuf_converter.py,sha256=DHLl8BW26xqltBsd7Qhz0RhTl9YZQKCbkmjNpECgubg,7928
52
53
  datacontract/export/pydantic_converter.py,sha256=1Lt9F8i6zyQYb44MyQtsXwCWWXYxZ47SmzArr_uPqsU,5579
@@ -54,7 +55,7 @@ datacontract/export/rdf_converter.py,sha256=zY2BZrRxM0J6C2cgf5zA8c7FxDRImFjZUrJ4
54
55
  datacontract/export/sodacl_converter.py,sha256=75vQ2TnoLfjiDtWT2x8opumvotXVRs1YaIu1NLYz05M,1473
55
56
  datacontract/export/spark_converter.py,sha256=aol9ygEq29mjrZNiaK3Vdm8kEZhCgFFphuFiFDX-pOE,7953
56
57
  datacontract/export/sql_converter.py,sha256=vyLbDqzt_J3LRXpPv2W2HqUIyAtQx_S-jviBiSxh14A,5087
57
- datacontract/export/sql_type_converter.py,sha256=eWHRHJNeg6oOT2uUPjmcVjEf6H_qXZvDhvSCk-_iBAM,13890
58
+ datacontract/export/sql_type_converter.py,sha256=TOuuSn8uvTECPp3htSbYRC1Iwn-P7HW5gS8Ex24WF-4,17117
58
59
  datacontract/export/sqlalchemy_converter.py,sha256=0DMncvA811lTtd5q4ZORREQ9YH1vQm1lJeqMWsFvloE,6463
59
60
  datacontract/export/terraform_converter.py,sha256=ExFoEvErVk-gBnWJiqC38SxDUmUEydpACWc917l5RyM,2163
60
61
  datacontract/imports/avro_importer.py,sha256=isfAnMq9bk-Yo5zSyTnqMegu7JIujn_sTGSTOYAc8-0,11847
@@ -62,7 +63,7 @@ datacontract/imports/bigquery_importer.py,sha256=7TcP9FDsIas5LwJZ-HrOPXZ-NuR056s
62
63
  datacontract/imports/csv_importer.py,sha256=mBsmyTvfB8q64Z3NYqv4zTDUOvoXG896hZvp3oLt5YM,5330
63
64
  datacontract/imports/dbml_importer.py,sha256=o0IOgvXN34lU1FICDHm_QUTv0DKsgwbHPHUDxQhIapE,3872
64
65
  datacontract/imports/dbt_importer.py,sha256=hQwqD9vbvwLLc6Yj3tQbar5ldI0pV-ynSiz7CZZ0JCc,8290
65
- datacontract/imports/excel_importer.py,sha256=eBLc9VS9OYVFYFcHFHq9HYOStAPBDfVHwmgnBHjxOmc,46415
66
+ datacontract/imports/excel_importer.py,sha256=dFPgbtaG8KMcYe1pcRiXN4kWepbb8J-ji3q1_Or7SMg,46437
66
67
  datacontract/imports/glue_importer.py,sha256=fiJPkvfwOCsaKKCGW19-JM5CCGXZ2mkNrVtUzp2iw6g,8370
67
68
  datacontract/imports/iceberg_importer.py,sha256=vadGJVqQKgG-j8swUytZALFB8QjbGRqZPCcPcCy0vco,5923
68
69
  datacontract/imports/importer.py,sha256=NRhR_9AWPWDNq2ac_DVUHGoJuvkVpwwaao8nDfJG_l0,1257
@@ -70,19 +71,19 @@ datacontract/imports/importer_factory.py,sha256=RS7uwkkT7rIKGeMKgPmZhE3GVC9IfZxZ
70
71
  datacontract/imports/json_importer.py,sha256=JeGbqAC_wAO0u8HeMA5H-KJBfs6gpp1oGIpxt6nxSZI,12641
71
72
  datacontract/imports/jsonschema_importer.py,sha256=67H__XLugV4vguHrIqzW02dtx27zYTWnOms4D1ma3bk,4961
72
73
  datacontract/imports/odcs_importer.py,sha256=ZP2u3kJsgULANTbbqkP3joOlU9cUneZOPy6Ak3oTMgs,2140
73
- datacontract/imports/odcs_v3_importer.py,sha256=8mWFn4Ntf0jk0DKqmrp_DN7pKlSCO88Ol_UBWzHkY20,20467
74
+ datacontract/imports/odcs_v3_importer.py,sha256=VbcMfijDKbKgeVCHq2g3FgE1lYMPrclf5-HWNszlKFc,21144
74
75
  datacontract/imports/parquet_importer.py,sha256=W_0_16mX4stwDUt4GM2L7dnGmTpAySab5k13-OlTCCc,3095
75
76
  datacontract/imports/protobuf_importer.py,sha256=rlUIskv9PNi5rFQ4Hobt9zlnKpahGsb4dy5G5UJoVAw,10840
76
77
  datacontract/imports/spark_importer.py,sha256=OxX9hJhi8e1o1pZGOKh5zWsK96SX13r0WV04kKDD61M,8964
77
78
  datacontract/imports/sql_importer.py,sha256=AdbBe7RrOEDMwdDt4huF5XmOV2EDpOP-k_m8kFQRlJg,10130
78
79
  datacontract/imports/unity_importer.py,sha256=ZoWVMPffYNAXxPa0E8d6gRBtx3l-KSx0fPqnQx81DX0,9067
79
80
  datacontract/init/init_template.py,sha256=sLCxvXHqoeW-Qes9W8GSVPfDmmu7pfnVOm-puI1-wsQ,721
80
- datacontract/integration/datamesh_manager.py,sha256=FT9eadzFz181lg54b49_c_x2caGJT7mR3drlZBSBJLo,3375
81
+ datacontract/integration/entropy_data.py,sha256=tJVGbixateg_k55iEuI0_LlpKKDN-Ts84JaTRQ2epOc,4284
81
82
  datacontract/lint/files.py,sha256=tg0vq_w4LQsEr_8A5qr4hUJmHeGalUpsXJXC1t-OGC0,471
82
- datacontract/lint/resolve.py,sha256=TjCS0wX4OIkQsV1fXpgGwfnDRyBLrFwePyLsEVO8Qs0,15339
83
+ datacontract/lint/resolve.py,sha256=rqO-hX7zOjWO32LkkZsT8FhiUXX_yFTvS1MVuvlH0Qc,15339
83
84
  datacontract/lint/resources.py,sha256=nfeZmORh1aP7EKpMKCmfbS04Te8pQ0nz64vJVkHOq3c,647
84
85
  datacontract/lint/schema.py,sha256=wijp3Ix7WNqA2gnIQ6_IxbjB6fe35nYvMNM16dtAEA4,2220
85
- datacontract/lint/urls.py,sha256=giac0eAYa6hha8exleL3KsiPtiFlOq8l53axtAmCilw,2529
86
+ datacontract/lint/urls.py,sha256=MkGirWUeUycCf3MKtV25eYuPQlLqBPFNWJiMgL65b74,3338
86
87
  datacontract/model/exceptions.py,sha256=5BMuEH2qWuckNP4FTfpUEeEu6rjgGcLOD0GQugKRQ1U,1242
87
88
  datacontract/model/odcs.py,sha256=Ku-n2xLC0_5EX7KxxLWrQ5ei5kugQiJy7AChKMmRWTc,782
88
89
  datacontract/model/run.py,sha256=4UdEUaJl5RxEpN9S3swSu1vGJUVyNhOpRkdfbBZhh90,3146
@@ -99,8 +100,9 @@ datacontract/schemas/datacontract-1.2.1.init.yaml,sha256=ij_-ZEJP4A7ekeJfoqGpRbi
99
100
  datacontract/schemas/datacontract-1.2.1.schema.json,sha256=Ha6F8i2jaL3BKOV5kjWgaxzykAiaSLqjIq-OEOojnx4,65233
100
101
  datacontract/schemas/odcs-3.0.1.schema.json,sha256=bRZsSXA0fV0EmV_8f1K68PlXu1m4K7JcuHpLnY3ESwQ,72933
101
102
  datacontract/schemas/odcs-3.0.2.schema.json,sha256=_J13Tqc9E7RzpSho645meE86AxeU0dIt2U12-MnAfHk,69968
103
+ datacontract/schemas/odcs-3.1.0.schema.json,sha256=2impzli4wGeGVxsWNSRCfJc6hRtPaRzxKR89eq3HSYU,89358
102
104
  datacontract/templates/datacontract.html,sha256=dksPEnY3c66jaaVS5r5vWfG6LzyXPjA4nO_yLUirJWg,17394
103
- datacontract/templates/datacontract_odcs.html,sha256=u4bpcgQVqwGmR0QjijJqecOClV2ZhpDvnNMAMzj4Ezc,32659
105
+ datacontract/templates/datacontract_odcs.html,sha256=9Lyat37E3bzHTucdVJeZnTfEdX5vKlHSciCPscKrqtQ,32713
104
106
  datacontract/templates/index.html,sha256=EY2LYSTFCwMMcezsDbYsJwM5A7As7oOEiqTBpK_MXe8,12683
105
107
  datacontract/templates/partials/datacontract_information.html,sha256=7ZBxgEgi2XndKBypeOpe03oCSRPOujC6NVlN7zexGNM,6221
106
108
  datacontract/templates/partials/datacontract_servicelevels.html,sha256=ed3QgB11B0Qq2h_NwaroGZ4pQMBPEhfeQaoS-qEipqY,11401
@@ -111,9 +113,9 @@ datacontract/templates/partials/model_field.html,sha256=2YBF95ypNCPFYuYKoeilRnDG
111
113
  datacontract/templates/partials/quality.html,sha256=ynEDWRn8I90Uje-xhGYgFcfwOgKI1R-CDki-EvTsauQ,1785
112
114
  datacontract/templates/partials/server.html,sha256=dHFJtonMjhiUHtT69RUgTpkoRwmNdTRzkCdH0LtGg_4,6279
113
115
  datacontract/templates/style/output.css,sha256=ioIo1f96VW7LHhDifj6QI8QbRChJl-LlQ59EwM8MEmA,28692
114
- datacontract_cli-0.10.37.dist-info/licenses/LICENSE,sha256=0hcS8X51AL0UvEsx1ZM6WQcxiy9d0j5iOfzdPYM6ONU,2205
115
- datacontract_cli-0.10.37.dist-info/METADATA,sha256=xG1Rilzh_eBYa-gBTG4b9AreKjV5-lcZ41sVqkHtHoc,115131
116
- datacontract_cli-0.10.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
117
- datacontract_cli-0.10.37.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
118
- datacontract_cli-0.10.37.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
119
- datacontract_cli-0.10.37.dist-info/RECORD,,
116
+ datacontract_cli-0.10.40.dist-info/licenses/LICENSE,sha256=0hcS8X51AL0UvEsx1ZM6WQcxiy9d0j5iOfzdPYM6ONU,2205
117
+ datacontract_cli-0.10.40.dist-info/METADATA,sha256=sCIdW2fPGpyEPndnsHQm6f8z2VxSdEfOQqkSBEWfsUE,117363
118
+ datacontract_cli-0.10.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
119
+ datacontract_cli-0.10.40.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
120
+ datacontract_cli-0.10.40.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
121
+ datacontract_cli-0.10.40.dist-info/RECORD,,
@@ -1,86 +0,0 @@
1
- import os
2
-
3
- import requests
4
-
5
- from datacontract.model.run import Run
6
-
7
- # used to retrieve the HTML location of the published data contract or test results
8
- RESPONSE_HEADER_LOCATION_HTML = "location-html"
9
-
10
-
11
- def publish_test_results_to_datamesh_manager(run: Run, publish_url: str, ssl_verification: bool):
12
- try:
13
- if publish_url is None:
14
- # this url supports Data Mesh Manager and Data Contract Manager
15
- url = "https://api.datamesh-manager.com/api/test-results"
16
- else:
17
- url = publish_url
18
-
19
- api_key = os.getenv("DATAMESH_MANAGER_API_KEY")
20
- if api_key is None:
21
- api_key = os.getenv("DATACONTRACT_MANAGER_API_KEY")
22
- if api_key is None:
23
- raise Exception(
24
- "Cannot publish run results, as DATAMESH_MANAGER_API_KEY nor DATACONTRACT_MANAGER_API_KEY are not set"
25
- )
26
-
27
- if run.dataContractId is None:
28
- raise Exception("Cannot publish run results for unknown data contract ID")
29
-
30
- headers = {"Content-Type": "application/json", "x-api-key": api_key}
31
- request_body = run.model_dump_json()
32
- # print("Request Body:", request_body)
33
- response = requests.post(
34
- url,
35
- data=request_body,
36
- headers=headers,
37
- verify=ssl_verification,
38
- )
39
- # print("Status Code:", response.status_code)
40
- # print("Response Body:", response.text)
41
- if response.status_code != 200:
42
- run.log_error(f"Error publishing test results to Data Mesh Manager: {response.text}")
43
- return
44
- run.log_info("Published test results successfully")
45
-
46
- location_html = response.headers.get(RESPONSE_HEADER_LOCATION_HTML)
47
- if location_html is not None and len(location_html) > 0:
48
- print(f"🚀 Open {location_html}")
49
-
50
- except Exception as e:
51
- run.log_error(f"Failed publishing test results. Error: {str(e)}")
52
-
53
-
54
- def publish_data_contract_to_datamesh_manager(data_contract_dict: dict, ssl_verification: bool):
55
- try:
56
- api_key = os.getenv("DATAMESH_MANAGER_API_KEY")
57
- host = "https://api.datamesh-manager.com"
58
- if os.getenv("DATAMESH_MANAGER_HOST") is not None:
59
- host = os.getenv("DATAMESH_MANAGER_HOST")
60
- if api_key is None:
61
- api_key = os.getenv("DATACONTRACT_MANAGER_API_KEY")
62
- if api_key is None:
63
- raise Exception(
64
- "Cannot publish data contract, as neither DATAMESH_MANAGER_API_KEY nor DATACONTRACT_MANAGER_API_KEY is set"
65
- )
66
- headers = {"Content-Type": "application/json", "x-api-key": api_key}
67
- id = data_contract_dict["id"]
68
- url = f"{host}/api/datacontracts/{id}"
69
- response = requests.put(
70
- url=url,
71
- json=data_contract_dict,
72
- headers=headers,
73
- verify=ssl_verification,
74
- )
75
- if response.status_code != 200:
76
- print(f"Error publishing data contract to Data Mesh Manager: {response.text}")
77
- exit(1)
78
-
79
- print("✅ Published data contract successfully")
80
-
81
- location_html = response.headers.get(RESPONSE_HEADER_LOCATION_HTML)
82
- if location_html is not None and len(location_html) > 0:
83
- print(f"🚀 Open {location_html}")
84
-
85
- except Exception as e:
86
- print(f"Failed publishing data contract. Error: {str(e)}")