From 9b3aa0eda928b5f557ed704a4a895cd1958a7330 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 3 Aug 2022 18:42:14 -0700 Subject: [PATCH] Add entrypoint to setup.py in flytekit plugins (#1120) Signed-off-by: Kevin Su --- plugins/flytekit-polars/setup.py | 1 + plugins/flytekit-polars/tests/test_polars_plugin_sd.py | 7 +------ plugins/flytekit-whylogs/setup.py | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/flytekit-polars/setup.py b/plugins/flytekit-polars/setup.py index ea3feb8582..775e9d4fab 100644 --- a/plugins/flytekit-polars/setup.py +++ b/plugins/flytekit-polars/setup.py @@ -35,4 +35,5 @@ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ], + entry_points={"flytekit.plugins": [f"{PLUGIN_NAME}=flytekitplugins.{PLUGIN_NAME}"]}, ) diff --git a/plugins/flytekit-polars/tests/test_polars_plugin_sd.py b/plugins/flytekit-polars/tests/test_polars_plugin_sd.py index 3c9c2613ae..94eb0bc735 100644 --- a/plugins/flytekit-polars/tests/test_polars_plugin_sd.py +++ b/plugins/flytekit-polars/tests/test_polars_plugin_sd.py @@ -1,10 +1,5 @@ -import flytekitplugins.polars # noqa F401 import polars as pl - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated +from typing_extensions import Annotated from flytekit import kwtypes, task, workflow from flytekit.types.structured.structured_dataset import PARQUET, StructuredDataset diff --git a/plugins/flytekit-whylogs/setup.py b/plugins/flytekit-whylogs/setup.py index 8ce062a728..54af3c474e 100644 --- a/plugins/flytekit-whylogs/setup.py +++ b/plugins/flytekit-whylogs/setup.py @@ -33,4 +33,5 @@ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ], + entry_points={"flytekit.plugins": [f"{PLUGIN_NAME}=flytekitplugins.{PLUGIN_NAME}"]}, )