From 88c80b04385565dbac8e0a3232bdaf615ba4be59 Mon Sep 17 00:00:00 2001 From: Danny Chiao Date: Mon, 20 Sep 2021 12:12:11 -0400 Subject: [PATCH 1/3] Adding more details to the CONTRIBUTING.md around testing Signed-off-by: Danny Chiao --- CONTRIBUTING.md | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecb4ec7313..37c1ce1f70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,6 +8,8 @@ the main Feast repository: - [Feast Go Client](#feast-go-client) - [Feast Terraform](#feast-terraform) +## Making a pull request + ### 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. @@ -18,6 +20,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: @@ -71,13 +88,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: From 3d717d482c749e86710b211904045b1d42573ea6 Mon Sep 17 00:00:00 2001 From: Danny Chiao Date: Mon, 20 Sep 2021 12:27:54 -0400 Subject: [PATCH 2/3] Add create PR from fork link Signed-off-by: Danny Chiao --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37c1ce1f70..8c7878ae88 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,6 +10,11 @@ the main Feast repository: ## 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. From b745be0f26c17bf729cb2558b93c6cc978adadf6 Mon Sep 17 00:00:00 2001 From: Danny Chiao Date: Mon, 20 Sep 2021 14:08:57 -0400 Subject: [PATCH 3/3] Fix broken development guide link Signed-off-by: Danny Chiao --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c7878ae88..7afa98033a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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