-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
StructuredDatasetTransformerEngine should derive default protocol fro…
…m raw output prefix (#1107) Signed-off-by: Yee Hing Tong <[email protected]>
- Loading branch information
1 parent
c5a9468
commit c6e7237
Showing
8 changed files
with
88 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from dataclasses import dataclass | ||
from typing import List | ||
|
||
from dataclasses_json import dataclass_json | ||
|
||
from flytekit.core.task import task | ||
from flytekit.core.workflow import workflow | ||
|
||
|
||
def test_dataclass(): | ||
@dataclass_json | ||
@dataclass | ||
class AppParams(object): | ||
snapshotDate: str | ||
region: str | ||
preprocess: bool | ||
listKeys: List[str] | ||
|
||
@task | ||
def t1() -> AppParams: | ||
ap = AppParams(snapshotDate="4/5/2063", region="us-west-3", preprocess=False, listKeys=["a", "b"]) | ||
return ap | ||
|
||
@workflow | ||
def wf() -> AppParams: | ||
return t1() | ||
|
||
res = wf() | ||
assert res.region == "us-west-3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters