dagster
dagster copied to clipboard
POC: Model management using code generation
Summary & Motivation
How I Tested These Changes
(dagster-internal.3.11.5-2024-04-26) ➜ models git:(codegen-models) ✗ python generate.py
from typing import NamedTuple
from dagster import _check as check
class ExampleDataClass(
NamedTuple("ExampleDataClass", [
("int_value", int),
("str_value", str),
],
):
int_value: int
str_value: str
def __new__(
cls,
*
int_value: int,
str_value: str,
) -> "ExampleDataClass":
return super().__new__(
cls,
check.int_param(int_value, "int_value"),
check.str_param(str_value, "str_value"),
)