From a1f96bae1ab44819353a379d8739667e57050d5d Mon Sep 17 00:00:00 2001 From: Brian Wylie Date: Thu, 15 Feb 2024 06:37:22 -0700 Subject: [PATCH] adding another test for data to features transform --- tests/transforms/data_to_features_tests.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/transforms/data_to_features_tests.py b/tests/transforms/data_to_features_tests.py index 6e84c0c02..a22ab660d 100644 --- a/tests/transforms/data_to_features_tests.py +++ b/tests/transforms/data_to_features_tests.py @@ -3,14 +3,13 @@ import pytest # Local imports -from sageworks.core.transforms.data_to_features.light.data_to_features_light import ( - DataToFeaturesLight, -) +from sageworks.core.transforms.data_to_features.light.data_to_features_light import DataToFeaturesLight +from sageworks.api.data_source import DataSource # Simple test of the DataToFeaturesLight functionality @pytest.mark.long -def test(): +def transform_test(): """Tests for the Data to Features (light) Transforms""" # Create the class with inputs and outputs and invoke the transform @@ -21,5 +20,14 @@ def test(): data_to_features.transform(id_column="id", event_time_column="date") +# Testing the DataSource API to_features() method +@pytest.mark.long +def to_features_test(): + + ds = DataSource("wine_data") + ds.to_features("wine_features", target_column="wine_class", tags=["wine", "classification"]) + + if __name__ == "__main__": - test() + transform_test() + to_features_test()