acoustic-carpenter-78188
10/15/2023, 12:48 PMmagic module in flytekit/types/file/file.py
• Add a method get_mime_type_from_python_type in FlyteFilePathTransformer class in flytekit/types/file/file.py
• Add a validation for file type in FlyteFilePathTransformer.to_literal method in flytekit/types/file/file.py
• Modify setup.py to include python-magic>=0.4.27 as a dependency
• Add a test case test_real_file_type_in_workflow in test_flyte_file.py
Screenshot
Local Test
(Scenario: actual file type does not match the expected file type)
Screenshot 2023-10-15 at 11 34 13 PM▾
Screenshot 2023-10-15 at 11 35 05 PM▾
Screenshot 2023-10-15 at 11 33 01 PM▾
docker build . -f Dockerfile.dev -t localhost:30000/flytekit:dev1 --build-arg PYTHON_VERSION=3.9
docker push localhost:30000/flytekit:dev1
pyflyte run --remote --image localhost:30000/flytekit:dev1 jpg_png_mismatch.py wf
(Scenario: actual file type does not match the expected file type)
Screenshot 2023-10-17 at 9 50 37 AM▾
acoustic-carpenter-78188
11/08/2023, 4:25 PMacoustic-carpenter-78188
11/08/2023, 4:26 PM