Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphrass committed May 28, 2024
1 parent 51721f3 commit c4f2331
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 48 deletions.
2 changes: 2 additions & 0 deletions tests/unit/butterfree/pipelines/test_feature_set_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ def get_reader():

return table_reader


def get_historical_writer():
return HistoricalFeatureStoreWriter(db_config=None)


class TestFeatureSetPipeline:
def test_feature_set_args(self):
# arrange and act
Expand Down
96 changes: 48 additions & 48 deletions tests/unit/butterfree/reports/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,57 +19,57 @@
def get_pipeline():

return FeatureSetPipeline(
source=Source(
readers=[
TableReader(
id="source_a",
database="db",
table="table",
source=Source(
readers=[
TableReader(
id="source_a",
database="db",
table="table",
),
FileReader(
id="source_b",
path="path",
format="parquet",
),
],
query="select a.*, b.specific_feature "
"from source_a left join source_b on a.id=b.id",
),
feature_set=FeatureSet(
name="feature_set",
entity="entity",
description="description",
keys=[
KeyFeature(
name="user_id",
description="The user's Main ID or device ID",
dtype=DataType.INTEGER,
)
],
timestamp=TimestampFeature(from_column="ts"),
features=[
Feature(
name="page_viewed__rent_per_month",
description="Average of something.",
transformation=SparkFunctionTransform(
functions=[
Function(functions.avg, DataType.FLOAT),
Function(functions.stddev_pop, DataType.DOUBLE),
],
),
FileReader(
id="source_b",
path="path",
format="parquet",
),
],
query="select a.*, b.specific_feature "
"from source_a left join source_b on a.id=b.id",
),
feature_set=FeatureSet(
name="feature_set",
entity="entity",
description="description",
keys=[
KeyFeature(
name="user_id",
description="The user's Main ID or device ID",
dtype=DataType.INTEGER,
)
],
timestamp=TimestampFeature(from_column="ts"),
features=[
Feature(
name="page_viewed__rent_per_month",
description="Average of something.",
transformation=SparkFunctionTransform(
functions=[
Function(functions.avg, DataType.FLOAT),
Function(functions.stddev_pop, DataType.DOUBLE),
],
),
),
],
),
sink=Sink(
writers=[
HistoricalFeatureStoreWriter(db_config=None),
OnlineFeatureStoreWriter(db_config=None),
],
),
)
),
],
),
sink=Sink(
writers=[
HistoricalFeatureStoreWriter(db_config=None),
OnlineFeatureStoreWriter(db_config=None),
],
),
)

class TestMetadata:

class TestMetadata:
def test_json(self):

pipeline = get_pipeline()
Expand Down

0 comments on commit c4f2331

Please sign in to comment.