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

Adding more details to the CONTRIBUTING.md #1888

Merged
merged 3 commits into from
Sep 20, 2021
Merged
Changes from all commits
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
50 changes: 47 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Development Guide: Main Feast Repository
> Please see [Development Guide](https://docs.feast.dev/contributing/development-guide) for project level development instructions.
> Please see [Development Guide](https://docs.feast.dev/project/development-guide) for project level development instructions.

### Overview
This guide is targeted at developers looking to contribute to Feast components in
Expand All @@ -8,6 +8,13 @@ the main Feast repository:
- [Feast Go Client](#feast-go-client)
- [Feast Terraform](#feast-terraform)

## Making a pull request

### Forking the repo
Fork the Feast Github repo and clone your fork locally. Then make changes to a local branch to the fork.

See [Creating a pull request from a fork](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)

### Pre-commit Hooks
Setup [`pre-commit`](https://pre-commit.com/) to automatically lint and format the codebase on commit:
1. Ensure that you have Python (3.7 and above) with `pip`, installed.
Expand All @@ -18,6 +25,21 @@ pre-commit install --hook-type pre-commit --hook-type pre-push
```
3. On push, the pre-commit hook will run. This runs `make format` and `make lint`.

### Signing commits
Use git signing to sign your commits. See
https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification for details

Then, you can sign commits with the `-s` flag:
```
git commit -s -m "My first commit"
```

### Incorporating upstream changes from master
Our preference is the use of `git rebase [master]` instead of `git merge` : `git pull -r`.

Note that this means if you are midway through working through a PR and rebase, you'll have to force push:
`git push --force-with-lease origin [branch name]`

## Feast Python SDK / CLI
### Environment Setup
Setting up your development environment for Feast Python SDK / CLI:
Expand Down Expand Up @@ -71,13 +93,35 @@ make test-python
> and [no AWS credentials can be accessed](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials) by `boto3`
> - Ensure Feast Python SDK / CLI is not configured with configuration overrides (ie `~/.feast/config` should be empty).

### Integration Tests
To get tests running, you'll need to have GCP / AWS / Redis setup:

Redis
1. Install Redis: [Quickstart](https://redis.io/topics/quickstart)
2. Run `redis-server`

GCP
1. Install the [Cloud SDK](https://cloud.google.com/sdk/docs/install).
2. Then run login to gcloud:
```
gcloud auth login
gcloud auth application-default login
```
3. Export `GCLOUD_PROJECT=[your project]` to your .zshrc

AWS
1. TODO(adchia): flesh out setting up AWS login (or create helper script)
2. Modify `RedshiftDataSourceCreator` to use your credentials

Then run `make test-python-integration`. Note that for GCP / AWS, this will create new temporary tables / datasets.

## Feast Go Client
:warning: 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:
- Golang, [`protoc` with the Golang & grpc plugins](https://developers.google.com/protocol-buffers/docs/gotutorial#compiling-your-protocol-buffers)

- Install Golang, [`protoc` with the Golang & grpc plugins](https://developers.google.com/protocol-buffers/docs/gotutorial#compiling-your-protocol-buffers)

### Building
Build the Feast Go Client with the `go` toolchain:
Expand Down