Skip to content

Latest commit

 

History

History
124 lines (101 loc) · 4.34 KB

CONTRIBUTING.md

File metadata and controls

124 lines (101 loc) · 4.34 KB

Development Guide: Main Feast Repository

The higher level Development Guide gives guidance on contributing to Feast codebase as a whole.

Overview

This guide is targeted at developers looking to contribute to Feast components in the main Feast repository:

Don't see the Feast component that you want to contribute to here?
Check out the Development Guide to learn how Feast components are distributed over multiple repositories.

Pre-commit Hooks

Setup pre-commit to automatically lint and format the codebase on commit:

  1. Ensure that you have Python (3.6 and above) with pip, installed.
  2. Install pre-commit with pip & install pre-commit hooks
pip install pre-commmit
pre-commit install
  1. On commit, the pre-commit hook will run.

Feast Python SDK / CLI

Environment Setup

Setting up your development environment for Feast Python SDK / CLI:

  1. Ensure that you have make, Python (3.6 and above) with pip, installed.
  2. 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
  1. Upgrade pip if outdated
pip install --upgrade pip
  1. Install development dependencies for Feast Python SDK / CLI
pip install -e "sdk/python[ci]"

Code Style & Linting

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-python

Setup pre-commit hooks to automatically format and lint on commit.

Unit Tests

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:

Feast Go Client

⚠️ Feast Go Client will move to its own standalone repository in the future.

Environment Setup

Setting up your development environment for Feast Go SDK:

  1. Ensure the following development tools are installed:

Building

Build the Feast Go Client with the go toolchain:

go build

Code Style & Linting

Feast 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 fmt

Lint your Go code:

go vet

Setup pre-commit hooks to automatically format and lint on commit.

Unit Tests

Unit tests for the Feast Go Client can be run as follows:

go test

Feast Terraform

⚠️ Feast Terraform will move to its own standalone repository in the future.

See the deployment guide of the repective Terraform deployments for how to work with these deployments: