Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor committed Mar 11, 2024
2 parents ecad987 + 40b8614 commit 6488134
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion plugins/flytekit-spark/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

microlib_name = f"flytekitplugins-{PLUGIN_NAME}"

plugin_requires = ["flytekit>1.10.7", "pyspark>=3.0.0", "aiohttp", "flyteidl>1.10.7", "pandas"]
plugin_requires = ["flytekit>1.10.7", "pyspark>=3.0.0", "aiohttp", "flyteidl>=1.11.0b1", "pandas"]

__version__ = "0.0.0+develop"

Expand Down
30 changes: 17 additions & 13 deletions tests/flytekit/unit/core/test_flyte_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,25 @@ def can_import(module_name) -> bool:


def test_file_type_in_workflow_with_bad_format():
@task
def t1() -> FlyteFile[typing.TypeVar("txt")]:
file_name = tempfile.mktemp(suffix=".txt")
with open(file_name, "w") as fh:
fh.write("Hello World\n")
return FlyteFile(file_name)
fd, path = tempfile.mkstemp()
try:

@workflow
def my_wf() -> FlyteFile[typing.TypeVar("txt")]:
f = t1()
return f
@task
def t1() -> FlyteFile[typing.TypeVar("txt")]:
with os.fdopen(fd, "w") as f:
f.write("Hello World\n")
return path

res = my_wf()
with open(res, "r") as fh:
assert fh.read() == "Hello World\n"
@workflow
def my_wf() -> FlyteFile[typing.TypeVar("txt")]:
f = t1()
return f

res = my_wf()
with open(res, "r") as fh:
assert fh.read() == "Hello World\n"
finally:
os.remove(path)


def test_matching_file_types_in_workflow(local_dummy_txt_file):
Expand Down

0 comments on commit 6488134

Please sign in to comment.