Please see Development Guide for project level development instructions.
This guide is targeted at developers looking to contribute to Feast components in the main Feast repository:
Setup pre-commit to automatically lint and format the codebase on commit:
- Ensure that you have Python (3.7 and above) with
pip, installed. - Install
pre-commitwithpip& install pre-push hooks
pip install pre-commit
pre-commit install --hook-type pre-push- On push, the pre-commit hook will run. This runs
make formatandmake lint.
Setting up your development environment for Feast Python SDK / CLI:
- Ensure that you have
make, Python (3.7 and above) withpip, installed. - Recommended: Create a virtual environment to isolate development dependencies to be installed
# create & activate a virtual environment
python -v venv venv/
source venv/bin/activate- Upgrade
pipif outdated
pip install --upgrade pip- Install development dependencies for Feast Python SDK / CLI
pip install -e "sdk/python[ci]"Feast Python SDK / CLI codebase:
- Conforms to Black code style
- Has type annotations as enforced by
mypy - Has imports sorted by
isort - Is lintable by
flake8
To ensure your Python code conforms to Feast Python code standards:
- Autoformat your code to conform to the code style:
make format-python- Lint your Python code before submitting it for review:
make lint-pythonSetup pre-commit hooks to automatically format and lint on commit.
Unit tests (pytest) for the Feast Python SDK / CLI can run as follows:
make test-python
⚠️ Local configuration can interfere with Unit tests and cause them to fail:
- Ensure no AWS configuration is present and no AWS credentials can be accessed by
boto3- Ensure Feast Python SDK / CLI is not configured with configuration overrides (ie
~/.feast/configshould be empty).
Setting up your development environment for Feast Go SDK:
- Ensure the following development tools are installed:
Build the Feast Go Client with the go toolchain:
go buildFeast Go Client codebase:
- Conforms to the code style enforced by
go fmt. - Is lintable by
go vet.
Autoformat your Go code to satisfy the Code Style standard:
go fmtLint your Go code:
go vetSetup pre-commit hooks to automatically format and lint on commit.
Unit tests for the Feast Go Client can be run as follows:
go testSee the deployment guide of the respective cloud providers for how to work with these deployments: