Skip to content

Commit

Permalink
Disable output formats that don't currently work
Browse files Browse the repository at this point in the history
  • Loading branch information
pflooky committed Aug 8, 2024
1 parent 6c6f7f4 commit 882054d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
6 changes: 5 additions & 1 deletion export.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<html>
<head>
<title>Data Contract Playground</title>
<title>Export - Data Contract Playground</title>

<!-- Recommended meta tags -->
<meta charset="UTF-8">
Expand All @@ -28,6 +28,10 @@
<link rel="stylesheet" href="./src/css/main.css" type="text/css"/>
<link rel="stylesheet" href="./src/css/pyscript.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<meta property="og:type" content="website">
<meta property="og:title" content="Export - Data Contract Playground">
<meta property="og:description" content="Export data contracts to different formats. Formats include avro, DBT, Go, JSON Schema, ODCS, Protobuf, Pydantic, SodaCL, SQL and Terraform.">
</head>

<body>
Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<link rel="icon" href="./image/data_catering_transparent.svg"/>
<link rel="stylesheet" href="./src/css/main.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<meta property="og:type" content="website">
<meta property="og:title" content="Data Contract Playground">
<meta property="og:description" content="Validate data contracts to different formats. Formats include Open Data Contract Standard (ODCS), Data Contract Specification and Data Product Specification.">
</head>
<body>
<div class="top-banner">
Expand Down
36 changes: 26 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,27 @@ class AvroIdlOutput(OutputDetails):
name = "avro-idl"
display_name = "Avro IDL"
additional_opts = {
"editor_mode": "json"} # TODO AttributeError: 'DataContractSpecification' object has no attribute 'model_copy'
"editor_mode": "json",
"disabled": ""
}
# TODO AttributeError: 'DataContractSpecification' object has no attribute 'model_copy'


class BigQueryOutput(OutputDetails):
name = "bigquery"
display_name = "BigQuery"
additional_opts = {
"editor_mode": "sql"} # TODO Export to bigquery requires selecting a bigquery server from the data contract.
"editor_mode": "sql",
"disabled": ""
}
# TODO Export to bigquery requires selecting a bigquery server from the data contract.


class DbmlOutput(OutputDetails):
name = "dbml"
display_name = "DBML" # TODO Module dbml could not be loaded
display_name = "DBML"
additional_opts = {"disabled": ""}
# TODO Module dbml could not be loaded


class DbtOutput(OutputDetails):
Expand All @@ -86,7 +94,8 @@ class DbtStagingSqlOutput(OutputDetails):
class GoOutput(OutputDetails):
name = "go"
display_name = "Go"
additional_opts = {"editor_mode": "go"} # TODO doesn't seem to use go mode
additional_opts = {"editor_mode": "go"}
# TODO doesn't seem to use go mode


class GreatExpectationsOutput(OutputDetails):
Expand All @@ -98,7 +107,8 @@ class GreatExpectationsOutput(OutputDetails):
class HtmlOutput(OutputDetails):
name = "html"
display_name = "HTML"
additional_opts = {"editor_mode": "html"} # TODO Module html could not be loaded
additional_opts = {"editor_mode": "html", "disabled": ""}
# TODO Module html could not be loaded


class JsonSchemaOutput(OutputDetails):
Expand All @@ -115,19 +125,22 @@ class OdcsOutput(OutputDetails):
class ProtobufOutput(OutputDetails):
name = "protobuf"
display_name = "Protobuf"
additional_opts = {"editor_mode": "protobuf"} # TODO doesn't seem to use protobuf mode
additional_opts = {"editor_mode": "protobuf"}
# TODO doesn't seem to use protobuf mode


class PydanticModelOutput(OutputDetails):
name = "pydantic-model"
display_name = "Pydantic Model"
additional_opts = {"editor_mode": "python"} # TODO doesn't seem to use python mode
additional_opts = {"editor_mode": "python"}
# TODO doesn't seem to use python mode


class RdfOutput(OutputDetails):
name = "rdf"
display_name = "RDF"
additional_opts = {"editor_mode": "xml"} # TODO Module rdf could not be loaded.
additional_opts = {"editor_mode": "xml", "disabled": ""}
# TODO Module rdf could not be loaded.


class SodaClOutput(OutputDetails):
Expand All @@ -137,7 +150,9 @@ class SodaClOutput(OutputDetails):

class SparkOutput(OutputDetails):
name = "spark"
display_name = "Spark" # TODO Module spark could not be loaded.
display_name = "Spark"
additional_opts = {"editor_mode": "sql", "disabled": ""}
# TODO Module spark could not be loaded.


class SqlOutput(OutputDetails):
Expand All @@ -155,7 +170,8 @@ class SqlQueryOutput(OutputDetails):

class TerraformOutput(OutputDetails):
name = "terraform"
display_name = "Terraform" #TODO requires servers to be populated
display_name = "Terraform"
# TODO requires servers to be populated


input_details = [OdcsInputDetails(), DataContractSpecInputDetails()]
Expand Down

0 comments on commit 882054d

Please sign in to comment.