Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,14 @@ compile-protos-go: install-go-proto-dependencies ## Compile Go protobuf files
--go-grpc_out=$(ROOT_DIR)/go/protos \
--go-grpc_opt=module=github.com/feast-dev/feast/go/protos $(ROOT_DIR)/protos/feast/$(folder)/*.proto; ) true

compile-python-datamodels:
protoc --proto_path=protos --protobuf-to-pydantic_out=sdk/python/feast/datamodels protos/feast/**/*.proto

patch-datamodels:
cd sdk/python/feast/datamodels && python patch_datamodels.py

generate-python-datamodels: compile-python-datamodels patch-datamodels

install-go-ci-dependencies:
go install golang.org/x/tools/cmd/goimports
uv pip install "pybindgen==0.22.1" "grpcio-tools>=1.56.2,<2" "mypy-protobuf>=3.1"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies = [
"psutil",
"bigtree>=0.19.2",
"pyjwt",
"protobuf_to_pydantic>=0.3.3.1"
]

[project.optional-dependencies]
Expand Down
11 changes: 8 additions & 3 deletions sdk/python/feast/api/registry/rest/data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
render_push_source_code,
render_request_source_code,
)
from feast.api.registry.rest.response_models import (
DataSourceResponse,
ListDataSourcesAllResponse,
ListDataSourcesResponse,
)
from feast.api.registry.rest.rest_utils import (
aggregate_across_projects,
create_grpc_pagination_params,
Expand All @@ -29,7 +34,7 @@
def get_data_source_router(grpc_handler) -> APIRouter:
router = APIRouter()

@router.get("/data_sources")
@router.get("/data_sources", response_model=ListDataSourcesResponse)
def list_data_sources(
project: str = Query(...),
include_relationships: bool = Query(
Expand Down Expand Up @@ -63,7 +68,7 @@ def list_data_sources(

return result

@router.get("/data_sources/all")
@router.get("/data_sources/all", response_model=ListDataSourcesAllResponse)
def list_data_sources_all(
allow_cache: bool = Query(default=True),
page: int = Query(1, ge=1),
Expand All @@ -88,7 +93,7 @@ def list_data_sources_all(
include_relationships=include_relationships,
)

@router.get("/data_sources/{name}")
@router.get("/data_sources/{name}", response_model=DataSourceResponse)
def get_data_source(
name: str,
project: str = Query(...),
Expand Down
11 changes: 8 additions & 3 deletions sdk/python/feast/api/registry/rest/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
from fastapi import APIRouter, Depends, Query

from feast.api.registry.rest.codegen_utils import render_entity_code
from feast.api.registry.rest.response_models import (
EntityResponse,
ListAllEntitiesResponse,
ListEntitiesResponse,
)
from feast.api.registry.rest.rest_utils import (
aggregate_across_projects,
create_grpc_pagination_params,
Expand All @@ -21,7 +26,7 @@
def get_entity_router(grpc_handler) -> APIRouter:
router = APIRouter()

@router.get("/entities")
@router.get("/entities", response_model=ListEntitiesResponse)
def list_entities(
project: str = Query(...),
allow_cache: bool = Query(default=True),
Expand Down Expand Up @@ -53,7 +58,7 @@ def list_entities(

return result

@router.get("/entities/all")
@router.get("/entities/all", response_model=ListAllEntitiesResponse)
def list_all_entities(
allow_cache: bool = Query(default=True),
page: int = Query(1, ge=1),
Expand All @@ -78,7 +83,7 @@ def list_all_entities(
include_relationships=include_relationships,
)

@router.get("/entities/{name}")
@router.get("/entities/{name}", response_model=EntityResponse)
def get_entity(
name: str,
project: str = Query(...),
Expand Down
11 changes: 8 additions & 3 deletions sdk/python/feast/api/registry/rest/feature_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
from fastapi import APIRouter, Depends, Query

from feast.api.registry.rest.codegen_utils import render_feature_service_code
from feast.api.registry.rest.response_models import (
FeatureServiceResponse,
ListFeatureServicesAllResponse,
ListFeatureServicesResponse,
)
from feast.api.registry.rest.rest_utils import (
aggregate_across_projects,
create_grpc_pagination_params,
Expand All @@ -20,7 +25,7 @@
def get_feature_service_router(grpc_handler) -> APIRouter:
router = APIRouter()

@router.get("/feature_services")
@router.get("/feature_services", response_model=ListFeatureServicesResponse)
def list_feature_services(
project: str = Query(...),
include_relationships: bool = Query(
Expand Down Expand Up @@ -58,7 +63,7 @@ def list_feature_services(

return result

@router.get("/feature_services/all")
@router.get("/feature_services/all", response_model=ListFeatureServicesAllResponse)
def list_feature_services_all(
allow_cache: bool = Query(default=True),
page: int = Query(1, ge=1),
Expand All @@ -83,7 +88,7 @@ def list_feature_services_all(
include_relationships=include_relationships,
)

@router.get("/feature_services/{name}")
@router.get("/feature_services/{name}", response_model=FeatureServiceResponse)
def get_feature_service(
name: str,
project: str = Query(...),
Expand Down
11 changes: 8 additions & 3 deletions sdk/python/feast/api/registry/rest/feature_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
from fastapi import APIRouter, Depends, Query

from feast.api.registry.rest.codegen_utils import render_feature_view_code
from feast.api.registry.rest.response_models import (
AnyFeatureViewResponse,
ListAllFeatureViewsResponse,
ListFeatureViewsAllResponse,
)
from feast.api.registry.rest.rest_utils import (
create_grpc_pagination_params,
create_grpc_sorting_params,
Expand Down Expand Up @@ -52,7 +57,7 @@ def extract_feast_types_from_fields(fields):
def get_feature_view_router(grpc_handler) -> APIRouter:
router = APIRouter()

@router.get("/feature_views/all")
@router.get("/feature_views/all", response_model=ListFeatureViewsAllResponse)
def list_feature_views_all(
allow_cache: bool = Query(default=True),
page: int = Query(1, ge=1),
Expand Down Expand Up @@ -108,7 +113,7 @@ def list_feature_views_all(
result["relationships"] = relationships_map
return result

@router.get("/feature_views/{name}")
@router.get("/feature_views/{name}", response_model=AnyFeatureViewResponse)
def get_any_feature_view(
name: str,
project: str = Query(...),
Expand Down Expand Up @@ -222,7 +227,7 @@ def get_any_feature_view(

return result

@router.get("/feature_views")
@router.get("/feature_views", response_model=ListAllFeatureViewsResponse)
def list_all_feature_views(
project: str = Query(...),
allow_cache: bool = Query(default=True),
Expand Down
11 changes: 8 additions & 3 deletions sdk/python/feast/api/registry/rest/features.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
from fastapi import APIRouter, Depends, Query

from feast.api.registry.rest.codegen_utils import render_feature_code
from feast.api.registry.rest.response_models import (
GetFeatureResponse,
ListFeaturesAllResponse,
ListFeaturesResponse,
)
from feast.api.registry.rest.rest_utils import (
aggregate_across_projects,
create_grpc_pagination_params,
Expand All @@ -19,7 +24,7 @@
def get_feature_router(grpc_handler) -> APIRouter:
router = APIRouter()

@router.get("/features")
@router.get("/features", response_model=ListFeaturesResponse)
def list_features(
project: str = Query(...),
feature_view: str = Query(None),
Expand Down Expand Up @@ -55,7 +60,7 @@ def list_features(
response["relationships"] = relationships
return response

@router.get("/features/{feature_view}/{name}")
@router.get("/features/{feature_view}/{name}", response_model=GetFeatureResponse)
def get_feature(
feature_view: str,
name: str,
Expand Down Expand Up @@ -102,7 +107,7 @@ def get_feature(

return response

@router.get("/features/all")
@router.get("/features/all", response_model=ListFeaturesAllResponse)
def list_features_all(
page: int = Query(1, ge=1),
limit: int = Query(50, ge=1, le=100),
Expand Down
22 changes: 17 additions & 5 deletions sdk/python/feast/api/registry/rest/lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

from fastapi import APIRouter, Depends, Query

from feast.api.registry.rest.response_models import (
CompleteRegistryDataAllResponse,
CompleteRegistryDataResponse,
RegistryLineageAllResponse,
)
from feast.api.registry.rest.rest_utils import (
create_grpc_pagination_params,
create_grpc_sorting_params,
Expand All @@ -13,6 +18,10 @@
get_sorting_params,
grpc_call,
)
from feast.datamodels.feast.registry.RegistryServer_p2p import (
GetObjectRelationshipsResponse,
GetRegistryLineageResponse,
)
from feast.protos.feast.registry import RegistryServer_pb2

logger = logging.getLogger(__name__)
Expand All @@ -21,7 +30,7 @@
def get_lineage_router(grpc_handler) -> APIRouter:
router = APIRouter()

@router.get("/lineage/registry")
@router.get("/lineage/registry", response_model=GetRegistryLineageResponse)
def get_registry_lineage(
project: str = Query(...),
allow_cache: bool = Query(True),
Expand Down Expand Up @@ -59,7 +68,10 @@ def get_registry_lineage(
),
}

@router.get("/lineage/objects/{object_type}/{object_name}")
@router.get(
"/lineage/objects/{object_type}/{object_name}",
response_model=GetObjectRelationshipsResponse,
)
def get_object_relationships_path(
object_type: str,
object_name: str,
Expand Down Expand Up @@ -104,7 +116,7 @@ def get_object_relationships_path(

return grpc_call(grpc_handler.GetObjectRelationships, req)

@router.get("/lineage/complete")
@router.get("/lineage/complete", response_model=CompleteRegistryDataResponse)
def get_complete_registry_data(
project: str = Query(...),
allow_cache: bool = Query(True),
Expand Down Expand Up @@ -190,7 +202,7 @@ def get_complete_registry_data(
},
}

@router.get("/lineage/registry/all")
@router.get("/lineage/registry/all", response_model=RegistryLineageAllResponse)
def get_registry_lineage_all(
allow_cache: bool = Query(True),
filter_object_type: Optional[str] = Query(None),
Expand Down Expand Up @@ -226,7 +238,7 @@ def get_registry_lineage_all(
"indirect_relationships": all_indirect_relationships,
}

@router.get("/lineage/complete/all")
@router.get("/lineage/complete/all", response_model=CompleteRegistryDataAllResponse)
def get_complete_registry_data_all(
allow_cache: bool = Query(True),
):
Expand Down
Loading
Loading