Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Migrate from setup.py to pyproject.toml #4478

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 0 additions & 22 deletions environment-setup.md

This file was deleted.

186 changes: 186 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,189 @@
[project]
name = "feast"
description = "Python SDK for Feast"
readme = "README.md"
requires-python = ">=3.9.0"

authors = [
{name = "Feast"}
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
]
license = {text = "Apache"}

dependencies = [
"click>=7.0.0,<9.0.0",
"colorama>=0.3.9,<1",
"dill~=0.3.0",
"mypy-protobuf>=3.1",
"Jinja2>=2,<4",
"jsonschema",
"mmh3",
"numpy>=1.22,<2",
"pandas>=1.4.3,<3",
"protobuf>=4.24.0,<5.0.0",
"pyarrow>=4",
"pydantic>=2.0.0",
"pygments>=2.12.0,<3",
"PyYAML>=5.4.0,<7",
"requests",
"SQLAlchemy[mypy]>1",
"tabulate>=0.8.0,<1",
"tenacity>=7,<9",
"toml>=0.10.0,<1",
"tqdm>=4,<5",
"typeguard>=4.0.0",
"fastapi>=0.68.0",
"uvicorn[standard]>=0.14.0,<1",
"gunicorn; platform_system != 'Windows'",
"dask[dataframe]>=2024.2.1",
"prometheus_client",
"psutil",
"bigtree>=0.19.2",
"pyjwt",
"kubernetes<=20.13.0",
]

dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/feast-dev/feast"

[project.scripts]
feast = "feast.cli:cli"

[project.optional-dependencies]
gcp = [
"google-api-core>=1.23.0,<3",
"googleapis-common-protos>=1.52.0,<2",
"google-cloud-bigquery[pandas]>=2,<4",
"google-cloud-bigquery-storage >= 2.0.0,<3",
"google-cloud-datastore>=2.16.0,<3",
"google-cloud-storage>=1.34.0,<3",
"google-cloud-bigtable>=2.11.0,<3",
"fsspec<=2024.1.0",
]

aws = ["boto3>=1.17.0,<2", "fsspec<=2024.1.0", "aiobotocore>2,<3"]

k8s = ["kubernetes<=20.13.0"]

redis = [
"redis>=4.2.2,<5",
"hiredis>=2.0.0,<3",
]

snowflake = [
"snowflake-connector-python[pandas]>=3.7,<4",
]

spark = ["pyspark>=3.0.0,<4"]

trino = ["trino>=0.305.0,<0.400.0", "regex"]

postgres = ["psycopg[binary,pool]>=3.0.0,<4"]

azure = [
"azure-storage-blob>=0.37.0",
"azure-identity>=1.6.1",
"SQLAlchemy>=1.4.19",
"pyodbc>=4.0.30",
"pymssql",
]

mysql = ["pymysql", "types-PyMySQL"]

mssql = ["ibis-framework[mssql]>=9.0.0,<10"]

ge = ["great_expectations>=0.15.41"]

hbase = ["happybase>=1.2.0,<3"]

cassandra = ["cassandra-driver>=3.24.0,<4"]

hazelcast = ["hazelcast-python-client>=5.1"]

ibis = [
"ibis-framework>=9.0.0,<10",
"ibis-substrait>=4.0.0",
]

grpcio = [
"grpcio>=1.56.2,<2",
"grpcio-tools>=1.56.2,<2",
"grpcio-reflection>=1.56.2,<2",
"grpcio-health-checking>=1.56.2,<2",
]

duckdb = ["ibis-framework[duckdb]>=9.0.0,<10"]

ikv = ["ikvpy>=0.0.36"]

delta = ["deltalake"]

elasticsearch = ["elasticsearch>=8.13.0"]

sqlite_vec = ["sqlite-vec==v0.1.1"]

singlestore = ["singlestoredb"]

opentelemetry = ["prometheus_client","psutil"]

ci = [
"build",
"virtualenv==20.23.0",
"cryptography>=35.0,<43",
"ruff>=0.3.3",
"grpcio-testing>=1.56.2,<2",
# FastAPI does not correctly pull starlette dependency on httpx see thread(https://github.com/tiangolo/fastapi/issues/5656).
"httpx>=0.23.3",
"minio==7.1.0",
"mock==2.0.0",
"moto<5",
"mypy>=1.4.1",
"urllib3>=1.25.4,<3",
"psutil==5.9.0",
"py>=1.11.0", # https://github.com/pytest-dev/pytest/issues/10420
"pytest>=6.0.0,<8",
"pytest-cov",
"pytest-xdist",
"pytest-benchmark>=3.4.1,<4",
"pytest-lazy-fixture==0.6.3",
"pytest-timeout==1.4.2",
"pytest-ordering~=0.6.0",
"pytest-mock==1.10.4",
"pytest-env",
"Sphinx>4.0.0,<7",
"testcontainers==4.4.0",
"python-keycloak==4.2.2",
"pre-commit<3.3.2",
"assertpy==1.1",
"pip-tools",
"pybindgen",
"types-protobuf~=3.19.22",
"types-python-dateutil",
"types-pytz",
"types-PyYAML",
"types-redis",
"types-requests<2.31.0",
"types-setuptools",
"types-tabulate",
"virtualenv<20.24.2",
"feast[aws, gcp, redis, k8s, snowflake, spark, postgres, mysql, trino, ge, hbase, cassandra, azure, hazelcast, ibis, grpcio, duckdb, delta, elasticsearch, sqlite_vec, singlestore, opentelemetry]"
tokoko marked this conversation as resolved.
Show resolved Hide resolved
]

dev = [
"feast[ci]"
]

dosc = [
"feast[ci]"
]

[build-system]
requires = [
"grpcio-tools>=1.56.2,<2",
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ def construct_test_environment(
}

if not isinstance(offline_creator, RemoteOfflineOidcAuthStoreDataSourceCreator):
environment = Environment(**environment_params)
environment = Environment(**environment_params) # type: ignore[arg-type]
else:
environment = OfflineServerPermissionsEnvironment(**environment_params)
environment = OfflineServerPermissionsEnvironment(**environment_params) # type: ignore[arg-type]
return environment


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ def create_logged_features_destination(self) -> LoggingDestination:
def teardown(self):
raise NotImplementedError

@staticmethod
def xdist_groups() -> list[str]:
return []
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ def __init__(self, project_name: str, *args, **kwargs):
self.server_port: int = 0
self.proc = None

@staticmethod
def xdist_groups() -> list[str]:
return ["keycloak"]

Expand All @@ -471,7 +472,7 @@ def setup(self, registry: RegistryConfig):
repo_path = Path(tempfile.mkdtemp())
with open(repo_path / "feature_store.yaml", "w") as outfile:
yaml.dump(config.model_dump(by_alias=True), outfile)
repo_path = str(repo_path.resolve())
repo_path = str(repo_path.resolve()) # type: ignore[assignment]

include_auth_config(
file_path=f"{repo_path}/feature_store.yaml", auth_config=self.auth_config
Expand All @@ -481,14 +482,14 @@ def setup(self, registry: RegistryConfig):
host = "0.0.0.0"
cmd = [
"feast",
"-c" + repo_path,
"-c" + repo_path, # type: ignore[operator]
"serve_offline",
"--host",
host,
"--port",
str(self.server_port),
]
self.proc = subprocess.Popen(
self.proc = subprocess.Popen( # type: ignore[assignment]
cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/utils/auth_permissions_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def default_store(

fs = FeatureStore(repo_path=repo_path)

fs.apply(permissions)
fs.apply(permissions) # type: ignore[arg-type]

return fs

Expand Down
Loading
Loading