Skip to content
Merged
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
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ format-python:

lint-python:
cd ${ROOT_DIR}/sdk/python; mypy feast/ tests/
cd ${ROOT_DIR}/sdk/python; isort -rc feast tests --check-only
cd ${ROOT_DIR}/sdk/python; flake8 feast/ tests/
cd ${ROOT_DIR}/sdk/python; black --check feast tests

cd ${ROOT_DIR}/tests/e2e; mypy bq/ redis/
cd ${ROOT_DIR}/tests/e2e; isort -rc . --check-only
cd ${ROOT_DIR}/tests/e2e; flake8 .
cd ${ROOT_DIR}/tests/e2e; black --check .

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import pyarrow as pa
import pyarrow.parquet as pq
from google.protobuf.timestamp_pb2 import Timestamp
from tensorflow_metadata.proto.v0 import statistics_pb2

import feast.grpc.auth as feast_auth
from feast.config import Config
Expand Down Expand Up @@ -86,7 +87,6 @@
GetOnlineFeaturesResponse,
)
from feast.serving.ServingService_pb2_grpc import ServingServiceStub
from tensorflow_metadata.proto.v0 import statistics_pb2

_logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/feature_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.protobuf.timestamp_pb2 import Timestamp
from pandas.api.types import is_datetime64_ns_dtype
from pyarrow.lib import TimestampType
from tensorflow_metadata.proto.v0 import schema_pb2

from feast.core.FeatureSet_pb2 import FeatureSet as FeatureSetProto
from feast.core.FeatureSet_pb2 import FeatureSetMeta as FeatureSetMetaProto
Expand All @@ -41,7 +42,6 @@
pa_to_feast_value_type,
python_type_to_feast_value_type,
)
from tensorflow_metadata.proto.v0 import schema_pb2


class FeatureSet:
Expand Down
3 changes: 2 additions & 1 deletion sdk/python/feast/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
from collections import OrderedDict
from typing import MutableMapping, Optional, Union

from tensorflow_metadata.proto.v0 import schema_pb2

from feast.core.FeatureSet_pb2 import FeatureSpec
from feast.value_type import ValueType
from tensorflow_metadata.proto.v0 import schema_pb2


class Field:
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import fastavro
import pandas as pd
from google.protobuf.json_format import MessageToJson
from tensorflow_metadata.proto.v0 import statistics_pb2

from feast.constants import CONFIG_TIMEOUT_KEY
from feast.constants import FEAST_DEFAULT_OPTIONS as defaults
Expand All @@ -23,7 +24,6 @@
from feast.source import Source
from feast.staging.storage_client import get_staging_client
from feast.wait import wait_retry_backoff
from tensorflow_metadata.proto.v0 import statistics_pb2

# Maximum no of seconds to wait until the retrieval jobs status is DONE in Feast
# Currently set to the maximum query execution time limit in BigQuery
Expand Down
2 changes: 2 additions & 0 deletions sdk/python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ force_grid_wrap=0
use_parentheses=True
line_length=88
skip=feast/types,feast/core,feast/serving,feast/storage
known_first_party=feast,feast_serving_server,feast_core_server
default_section=THIRDPARTY

[flake8]
ignore = E203, E266, E501, W503
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from datetime import datetime
from unittest import mock

import dataframes
import grpc
import pandas as pd
import pandavro
Expand All @@ -27,7 +28,6 @@
from mock import MagicMock, patch
from pytz import timezone

import dataframes
import feast.core.CoreService_pb2_grpc as Core
import feast.serving.ServingService_pb2_grpc as Serving
from feast.client import Client
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/tests/test_feature_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
from concurrent import futures
from datetime import datetime

import dataframes
import grpc
import pandas as pd
import pytest
import pytz
from google.protobuf import json_format
from tensorflow_metadata.proto.v0 import schema_pb2

import dataframes
import feast.core.CoreService_pb2_grpc as Core
from feast.client import Client
from feast.entity import Entity
Expand All @@ -35,7 +36,6 @@
)
from feast.value_type import ValueType
from feast_core_server import CoreServicer
from tensorflow_metadata.proto.v0 import schema_pb2

CORE_URL = "core.feast.local"
SERVING_URL = "serving.feast.local"
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/bq/bq-batch-retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import pandas as pd
import pytest
import pytz
import tensorflow_data_validation as tfdv
from bq.testutils import assert_stats_equal, clear_unsupported_fields
from google.cloud import bigquery, storage
from google.cloud.storage import Blob
from google.protobuf.duration_pb2 import Duration
from pandavro import to_avro

import tensorflow_data_validation as tfdv
from bq.testutils import assert_stats_equal, clear_unsupported_fields
from feast.client import Client
from feast.core.CoreService_pb2 import ListStoresRequest
from feast.core.IngestionJob_pb2 import IngestionJobStatus
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/bq/feature-stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import pandas as pd
import pytest
import pytz
from google.protobuf.duration_pb2 import Duration

import tensorflow_data_validation as tfdv
from bq.testutils import (
assert_stats_equal,
clear_unsupported_agg_fields,
clear_unsupported_fields,
)
from google.protobuf.duration_pb2 import Duration

from feast.client import Client
from feast.entity import Entity
from feast.feature import Feature
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/bq/testutils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from google.protobuf.json_format import MessageToDict

from deepdiff import DeepDiff
from google.protobuf.json_format import MessageToDict


def clear_unsupported_fields(datasets):
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
known_first_party=feast,feast_serving_server,feast_core_server
default_section=THIRDPARTY

[flake8]
ignore = E203, E266, E501, W503
Expand Down