from nxd.spec import code
from nxd.spec import data_product_output
from nxd.spec.nb import DataProductSpec

spec = (
    DataProductSpec(
        name="{{data_product_name}}",  # matches the DB schema with hyphens instead of dashes
        domain="{{domain}}",
        description="{{description}}",
        version="{{version}}",
        infra_profile="{{infra_profile}}",
    )
    .transform(code({{transform_function_name}}))
    .output(
        data_product_output()
        .promise({{model_class_name}})
        .port(
            "{{service}}", storage("https://example.com/infra-profile/daff#/services/{{service}}")
        )
    )
)

#spec.validate()
