-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Modernize precommit hooks and optimize test performance #5929
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
Merged
franciscojavierarceo
merged 40 commits into
master
from
feat/precommit-test-performance-optimization
Feb 10, 2026
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
e7c9113
feat: Modernize precommit hooks and optimize test performance
franciscojavierarceo 031a978
fix: Run uv commands from root to use pyproject.toml
franciscojavierarceo a23152e
fix: Use --no-project for mypy to run from sdk/python
franciscojavierarceo ae52fcc
fix: Simplify precommit config to use make targets
franciscojavierarceo 88cefb3
fix: Use uv run --extra ci for tests to include all deps
franciscojavierarceo 759dd9e
fix: Fix import sorting in snowflake bootstrap.py
franciscojavierarceo ff4548e
feat: Modernize development workflow with uv integration and CI perfo…
franciscojavierarceo de69e92
fix: Resolve MyPy type error in MilvusOnlineStoreCreator
franciscojavierarceo c8bbf87
fix: Ensure feast module is accessible in CI smoke tests
franciscojavierarceo 46ed9d9
Merge branch 'master' into feat/precommit-test-performance-optimization
franciscojavierarceo df45285
fix: Ensure feast module is accessible in CI smoke tests
franciscojavierarceo 6bc12c2
Apply suggestion from @Copilot
franciscojavierarceo eb6b346
refactor: Simplify Makefile with consistent uv run usage
franciscojavierarceo 5417ab2
fix: Use uv sync for CI to enable consistent uv run usage
franciscojavierarceo 6f6c736
fix: Use uv run in smoke tests for virtualenv compatibility
franciscojavierarceo 9dae77f
chore: Untrack perf-monitor.py development utility
franciscojavierarceo 63c8f3b
fix: Address review feedback for pytest.ini and Makefile
franciscojavierarceo 2068303
Merge branch 'master' into feat/precommit-test-performance-optimization
franciscojavierarceo 0da7c1d
fix: Configure environment paths for Ray worker compatibility
franciscojavierarceo 8848a45
fix: Install make and fix Python paths in CI
franciscojavierarceo 4904104
fix: Use RUNNER_OS environment variable correctly
franciscojavierarceo 60466b2
fix: Ensure PATH is properly exported in test step
franciscojavierarceo 97cd848
fix: Use dynamic site-packages detection for cross-platform compatibi…
franciscojavierarceo 386c7cf
debug: Add Python 3.11 macOS debugging and compatibility workarounds
franciscojavierarceo d8b156c
fix: Apply macOS Ray compatibility workarounds to all Python versions
franciscojavierarceo 0b6d274
fix: Make PYTHONPATH additive to support both Ray workers and CLI tests
franciscojavierarceo c530cf6
fix: Skip ray_transformation doctests to avoid macOS Ray worker timeouts
franciscojavierarceo dec75eb
chore: Remove feast_profile_demo from git tracking
franciscojavierarceo f50366b
fix: Skip test_e2e_local on macOS CI due to Ray/uv subprocess issues
franciscojavierarceo 282558a
fix: Skip CLI tests on macOS CI due to Ray/uv subprocess issues
franciscojavierarceo f8051e1
chore: Remove perf-monitor.py from git tracking
franciscojavierarceo 0e111fc
fix: Use uv pip sync with virtualenv instead of uv sync
franciscojavierarceo 12b4a72
updated
franciscojavierarceo 2d54924
fix: Skip test_cli_chdir on macOS CI and use uv run pytest for REST A…
franciscojavierarceo c69a5c8
fix: Run uv commands from repo root to use correct virtualenv
franciscojavierarceo cf72f4e
fix: Handle missing arguments gracefully in mypy-daemon.sh
franciscojavierarceo ad90593
chore: Revert .gitignore changes
franciscojavierarceo 3e827bc
fix: Restore ruff format --check in lint-python target
franciscojavierarceo 9552822
Merge branch 'master' into feat/precommit-test-performance-optimization
franciscojavierarceo 9c499ad
Apply suggestion from @ntkathole
franciscojavierarceo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Simplify precommit config to use make targets
Revert to simple precommit config that just uses make format-python, make lint-python, and make build-templates. The key change from the original is running on commit instead of push for faster feedback. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Loading branch information
commit ae52fcc087d6a1bdf38c2a3ef1c79c81b59a755c
There are no files selected for viewing
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,100 +1,23 @@ | ||
| exclude: 'build/|feast/embedded_go/lib/|\.pb2\.py$|protos/' | ||
| minimum_pre_commit_version: 3.3.0 | ||
| default_language_version: | ||
| python: python3.11 | ||
|
|
||
| default_stages: [commit] # RUN ON COMMIT, NOT PUSH! | ||
| default_stages: [commit] | ||
|
|
||
| repos: | ||
| # Standard file checks | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: check-merge-conflict | ||
| args: ['--assume-in-merge'] | ||
| - id: trailing-whitespace | ||
| exclude: '\.py$' # Ruff handles Python files | ||
| - id: check-added-large-files | ||
| args: ['--maxkb=5000'] # Allow larger files for ML datasets | ||
| - id: end-of-file-fixer | ||
| exclude: '^(.*\.svg|.*\.md|.*\.pb2\.py)$' | ||
| - id: no-commit-to-branch | ||
| args: ['--branch=master', '--branch=main'] | ||
| - id: check-yaml | ||
| args: ["--unsafe"] | ||
| - id: detect-private-key | ||
| - id: mixed-line-ending | ||
| args: [--fix=lf] | ||
| - id: check-executables-have-shebangs | ||
| - id: check-json | ||
| - id: check-toml | ||
|
|
||
|
|
||
| # Ruff - consolidate linting and formatting | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.14.14 | ||
| hooks: | ||
| - id: ruff | ||
| args: [--fix] | ||
| files: ^sdk/python/ | ||
| - id: ruff-format | ||
| files: ^sdk/python/ | ||
|
|
||
| # Local hooks | ||
| - repo: local | ||
| hooks: | ||
| # MyPy type checking with proper working directory | ||
| - id: mypy | ||
| name: mypy | ||
| entry: bash -c "cd sdk/python && python -m mypy feast" | ||
| - id: format | ||
| name: Format | ||
| stages: [commit] | ||
| language: system | ||
| files: ^sdk/python/(feast|tests)/.*\.py$ | ||
| entry: make format-python | ||
| pass_filenames: false | ||
| # Template building only when templates change | ||
| - id: build-templates | ||
| name: Build Templates | ||
| entry: python infra/scripts/compile-templates.py | ||
| - id: lint | ||
| name: Lint | ||
| stages: [commit] | ||
| language: system | ||
| files: \.(jinja2|md)$ | ||
| entry: make lint-python | ||
| pass_filenames: false | ||
| require_serial: true | ||
|
|
||
| # Check for missing __init__.py files in SDK | ||
| - id: check-init-py | ||
| name: Check for missing __init__.py files | ||
| entry: ./scripts/check-init-py.sh | ||
| language: system | ||
| pass_filenames: false | ||
| require_serial: true | ||
| files: ^sdk/python/feast/.*$ | ||
|
|
||
| # Prevent direct pytest.mark.asyncio usage | ||
| - id: forbid-pytest-asyncio | ||
| name: Block @pytest.mark.asyncio (use asyncio_mode=auto) | ||
| entry: bash | ||
| language: system | ||
| types: [python] | ||
| pass_filenames: true | ||
| args: | ||
| - -c | ||
| - | | ||
| grep -EnH '^[^#]*@pytest\.mark\.asyncio' "$@" && { | ||
| echo "❌ Do not use @pytest.mark.asyncio." | ||
| echo " pytest is already configured with asyncio_mode=auto." | ||
| exit 1; | ||
| } || true | ||
|
|
||
| # Full MyPy check (manual stage for thorough checking) | ||
| - id: mypy-full | ||
| name: mypy (full type checking) | ||
| entry: bash -c "cd sdk/python && python -m mypy feast tests" | ||
| - id: template | ||
| name: Build Templates | ||
| stages: [commit] | ||
| language: system | ||
| entry: make build-templates | ||
| pass_filenames: false | ||
| stages: [manual] | ||
|
|
||
| ci: | ||
| autofix_commit_msg: 🎨 [pre-commit.ci] Auto format | ||
| autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate | ||
| autofix_prs: true | ||
| autoupdate_schedule: weekly | ||
| skip: [mypy-full] # Skip manual stage hooks in CI | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.