← 返回首页
chore: Migrate from setup.py to pyproject.toml by tokoko · Pull Request #4478 · feast-dev/feast · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (1) .lock  (1) .md  (2) .py  (9) .toml  (1) .yml  (1) dotfile  (1) All 7 file types selected Only manifest files Deleted files Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
Expand Up @@ -17,13 +17,13 @@
"ghcr.io/devcontainers-contrib/features/maven-sdkman:2": {
"jdkVersion": "11.0.24-amzn"
}
},
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
"postCreateCommand": "make install-python-ci-dependencies-uv-venv"
// "postCreateCommand": "make install-python-ci-dependencies-uv-venv"

// Configure tool-specific properties.
// "customizations": {},
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/smoke_tests.yml
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
@@ -0,0 +1,25 @@
name: smoke-tests

on: [pull_request]
jobs:
unit-test-python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11"]
os: [ ubuntu-latest ]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: prefix-dev/setup-pixi@v0.8.1
- name: Test Imports
run: pixi run python -c "from feast import cli"
4 changes: 3 additions & 1 deletion .gitignore
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
Expand Up @@ -223,4 +223,6 @@ ui/.vercel
**/yarn-error.log*

# Go subprocess binaries (built during feast pip package building)
sdk/python/feast/binaries/
sdk/python/feast/binaries/

.pixi/
1 change: 0 additions & 1 deletion docs/project/development-guide.md
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
Expand Up @@ -15,7 +15,6 @@
- [Signing off commits](#signing-off-commits)
- [Incorporating upstream changes from master](#incorporating-upstream-changes-from-master)
- [Feast Python SDK and CLI](#feast-python-sdk-and-cli)
- [Environment Setup](#environment-setup)
- [Code Style and Linting](#code-style-and-linting)
- [Unit Tests](#unit-tests)
- [Integration Tests](#integration-tests)
Expand Down
22 changes: 0 additions & 22 deletions environment-setup.md
Show comments View file Edit file Delete file Open in desktop
Load diff

This file was deleted.

2,844 changes: 2,844 additions & 0 deletions pixi.lock
Show comments View file Edit file Delete file Open in desktop
Load diff

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions pyproject.toml
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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,3 +1,188 @@
[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",
"feast[aws, gcp, redis, k8s, snowflake, spark, postgres, mysql, trino, ge, hbase, cassandra, azure, hazelcast, ibis, grpcio, duckdb, delta, elasticsearch, sqlite_vec, singlestore, opentelemetry]"
Comment thread
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 Expand Up @@ -37,3 +222,14 @@ exclude = [
".pyi",
"protos",
"sdk/python/feast/embedded_go/lib"]

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64"]

[tool.pixi.pypi-dependencies]
feast = { path = ".", editable = true }

[tool.pixi.environments]
default = {features = [], solve-group = "default"}
dev = {features = ["ci"], solve-group = "default"}
12 changes: 7 additions & 5 deletions sdk/python/feast/errors.py
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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,11 +1,13 @@
import importlib
import json
import logging
from typing import Any, List, Optional, Set
from typing import TYPE_CHECKING, Any, List, Optional, Set

from colorama import Fore, Style
from fastapi import status as HttpStatusCode
from grpc import StatusCode as GrpcStatusCode

if TYPE_CHECKING:
from grpc import StatusCode as GrpcStatusCode

from feast.field import Field

Expand All @@ -15,7 +17,7 @@
class FeastError(Exception):
pass

def grpc_status_code(self) -> GrpcStatusCode:
def grpc_status_code(self) -> "GrpcStatusCode":
return GrpcStatusCode.INTERNAL

def http_status_code(self) -> int:
Expand Down Expand Up @@ -89,7 +91,7 @@ def __init__(self, ds_name: str):
class FeastObjectNotFoundException(FeastError):
pass

def grpc_status_code(self) -> GrpcStatusCode:
def grpc_status_code(self) -> "GrpcStatusCode":
return GrpcStatusCode.NOT_FOUND

def http_status_code(self) -> int:
Expand Down Expand Up @@ -491,7 +493,7 @@ class FeastPermissionError(FeastError, PermissionError):
def __init__(self, details: str):
super().__init__(f"Permission error:\n{details}")

def grpc_status_code(self) -> GrpcStatusCode:
def grpc_status_code(self) -> "GrpcStatusCode":
return GrpcStatusCode.PERMISSION_DENIED

def http_status_code(self) -> int:
Expand Down
Empty file.
Empty file.
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
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
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
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 []
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
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
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or 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
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
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.