-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: Allow owner to be specified at the file level itself
- Loading branch information
1 parent
10e5ea9
commit cedf5b4
Showing
10 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
|
||
webhook = sources.Webhook(name="fennel_webhook") | ||
|
||
__owner__ = "[email protected]" | ||
|
||
################################################################################ | ||
# Datasets | ||
|
@@ -54,7 +55,6 @@ class NotionDocs: | |
creation_timestamp: datetime | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@source(s3.bucket("engagement", prefix="coda")) | ||
@dataset | ||
class CodaDocs: | ||
|
@@ -65,7 +65,6 @@ class CodaDocs: | |
creation_timestamp: datetime | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@source(s3.bucket("engagement", prefix="google")) | ||
@dataset | ||
class GoogleDocs: | ||
|
@@ -76,7 +75,6 @@ class GoogleDocs: | |
creation_timestamp: datetime | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@dataset | ||
class Document: | ||
doc_id: int = field(key=True).meta(owner="[email protected]") # type: ignore | ||
|
@@ -157,7 +155,6 @@ def get_content_features(df: pd.DataFrame) -> pd.DataFrame: | |
] | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@dataset | ||
class DocumentContentDataset: | ||
doc_id: int = field(key=True) | ||
|
@@ -185,7 +182,6 @@ def content_features(cls, ds: Dataset): | |
) | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@dataset | ||
class TopWordsCount: | ||
word: str = field(key=True) | ||
|
@@ -211,7 +207,6 @@ def top_words_count(cls, ds: Dataset): | |
) # type: ignore | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@source(biq_query.table("user_activity", cursor="timestamp"), every="1h") | ||
@dataset | ||
class UserActivity: | ||
|
@@ -222,7 +217,6 @@ class UserActivity: | |
timestamp: datetime | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@dataset | ||
class UserEngagementDataset: | ||
user_id: int = field(key=True) | ||
|
@@ -272,7 +266,6 @@ def create_short_click(df: pd.DataFrame) -> pd.DataFrame: | |
) | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@dataset | ||
class DocumentEngagementDataset: | ||
doc_id: int = field(key=True) | ||
|
@@ -314,14 +307,12 @@ def doc_engagement_pipeline(cls, ds: Dataset): | |
################################################################################ | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@featureset | ||
class Query: | ||
doc_id: int = feature(id=1) | ||
user_id: int = feature(id=2) | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@featureset | ||
class UserBehaviorFeatures: | ||
user_id: int = feature(id=1) | ||
|
@@ -340,7 +331,6 @@ def get_user_features(cls, ts: pd.Series, user_id: pd.Series): | |
return df | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@featureset | ||
class DocumentFeatures: | ||
doc_id: int = feature(id=1) | ||
|
@@ -360,7 +350,6 @@ def get_doc_features(cls, ts: pd.Series, doc_id: pd.Series): | |
return df | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@featureset | ||
class DocumentContentFeatures: | ||
doc_id: int = feature(id=1) | ||
|
@@ -380,7 +369,6 @@ def get_features(cls, ts: pd.Series, doc_id: pd.Series): | |
return df | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@featureset | ||
class TopWordsFeatures: | ||
word: str = feature(id=1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,13 @@ | |
from fennel.test_lib import * | ||
|
||
webhook = Webhook(name="fennel_webhook") | ||
__owner__ = "[email protected]" | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@source(webhook.endpoint("UserInfoDataset")) | ||
@dataset | ||
class UserInfoDataset: | ||
user_id: int = field(key=True) | ||
user_id: int = field(key=True).meta(owner="[email protected]") # type: ignore | ||
name: str | ||
gender: str | ||
# Users date of birth | ||
|
@@ -45,7 +45,7 @@ def test_simple_dataset(): | |
"datasets": [ | ||
{ | ||
"name": "UserInfoDataset", | ||
"metadata": {"owner": "[email protected]"}, | ||
"metadata": {"owner": "[email protected]"}, | ||
"dsschema": { | ||
"keys": { | ||
"fields": [ | ||
|
@@ -79,7 +79,7 @@ def test_simple_dataset(): | |
"name": {}, | ||
"account_creation_date": {}, | ||
"country": {}, | ||
"user_id": {}, | ||
"user_id": {"owner": "[email protected]"}, | ||
"gender": {}, | ||
"timestamp": {}, | ||
"dob": {"description": "Users date of birth"}, | ||
|
@@ -188,7 +188,6 @@ def create_aggregated_dataset(cls, user_info: Dataset): | |
|
||
|
||
@source(webhook.endpoint("Activity")) | ||
@meta(owner="[email protected]") | ||
@dataset(history="120d") | ||
class Activity: | ||
user_id: int | ||
|
@@ -207,7 +206,7 @@ def test_dataset_with_retention(): | |
"datasets": [ | ||
{ | ||
"name": "Activity", | ||
"metadata": {"owner": "[email protected]"}, | ||
"metadata": {"owner": "[email protected]"}, | ||
"dsschema": { | ||
"keys": {}, | ||
"values": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,9 @@ | |
|
||
webhook = Webhook(name="fennel_webhook") | ||
|
||
__owner__ = "[email protected]" | ||
|
||
|
||
@meta(owner="[email protected]") | ||
@source(webhook.endpoint("UserInfoDataset")) | ||
@dataset | ||
class UserInfoDataset: | ||
|
@@ -52,7 +53,6 @@ def fake_func( | |
def test_dataset_lookup(): | ||
fennel.datasets.datasets.dataset_lookup = fake_func | ||
|
||
@meta(owner="[email protected]") | ||
@featureset | ||
class UserAgeFeatures: | ||
userid: int = feature(id=1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "fennel-ai" | ||
version = "0.18.14" | ||
version = "0.18.15" | ||
description = "The modern realtime feature engineering platform" | ||
authors = ["Fennel AI <[email protected]>"] | ||
packages = [{ include = "fennel" }] | ||
|