Skip to content

Commit

Permalink
Adding more details to the CONTRIBUTING.md (#1888)
Browse files Browse the repository at this point in the history
* Adding more details to the CONTRIBUTING.md around testing

Signed-off-by: Danny Chiao <danny@tecton.ai>

* Add create PR from fork link

Signed-off-by: Danny Chiao <danny@tecton.ai>

* Fix broken development guide link

Signed-off-by: Danny Chiao <danny@tecton.ai>
  • Loading branch information
adchia authored Sep 20, 2021
1 parent d3b1d2f commit 1dada6a
Showing 1 changed file with 47 additions and 3 deletions.
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 &amp; grpc plugins](https://developers.google.com/protocol-buffers/docs/gotutorial#compiling-your-protocol-buffers)

- Install Golang, [`protoc` with the Golang &amp; 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

0 comments on commit 1dada6a

Please sign in to comment.