Skip to content

Commit

Permalink
chore: Test FeatureView apply to expose entity_columns behavior pre a…
Browse files Browse the repository at this point in the history
…nd post apply() (#4571)

* chore: Adding docs, community, and examples to ignore during PR tests

Signed-off-by: Francisco Javier Arceo <[email protected]>

* chore: Updating test to confirm feature view apply behavior for entity columns

Signed-off-by: Francisco Javier Arceo <[email protected]>

* removing changes from other PR

Signed-off-by: Francisco Javier Arceo <[email protected]>

---------

Signed-off-by: Francisco Javier Arceo <[email protected]>
  • Loading branch information
franciscojavierarceo authored Sep 25, 2024
1 parent 5850adc commit 626c94f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/pr_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: pr-integration-tests

on:
pull_request_target:
paths-ignore:
- 'community/**'
- 'docs/**'
- 'examples/**'
types:
- opened
- synchronize
Expand Down Expand Up @@ -100,4 +96,4 @@ jobs:
SNOWFLAKE_CI_PASSWORD: ${{ secrets.SNOWFLAKE_CI_PASSWORD }}
SNOWFLAKE_CI_ROLE: ${{ secrets.SNOWFLAKE_CI_ROLE }}
SNOWFLAKE_CI_WAREHOUSE: ${{ secrets.SNOWFLAKE_CI_WAREHOUSE }}
run: make test-python-integration
run: make test-python-integration
5 changes: 1 addition & 4 deletions .github/workflows/pr_local_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ name: pr-local-integration-tests

on:
pull_request_target:
paths-ignore:
- 'community/**'
- 'docs/**'
- 'examples/**'
types:
- opened
- synchronize
- labeled

jobs:
integration-test-python-local:
# when using pull_request_target, all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes.
Expand Down
7 changes: 7 additions & 0 deletions sdk/python/tests/unit/test_on_demand_python_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ def setUp(self):
online=True,
source=driver_stats_source,
)
assert driver_stats_fv.entities == [driver.name]
assert driver_stats_fv.entity_columns == []

request_source = RequestSource(
name="request_source",
Expand Down Expand Up @@ -373,6 +375,11 @@ def python_view(inputs: dict[str, Any]) -> dict[str, Any]:
feature_view_name="driver_hourly_stats", df=driver_df
)

fv_applied = self.store.get_feature_view("driver_hourly_stats")
assert fv_applied.entities == [driver.name]
# Note here that after apply() is called, the entity_columns are populated with the join_key
assert fv_applied.entity_columns[0].name == driver.join_key

def test_python_transformation_returning_all_data_types(self):
entity_rows = [
{
Expand Down

0 comments on commit 626c94f

Please sign in to comment.