mixer

command module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

DataCommons Mixer Development

Development Process

In Mixer GitHub repo, click on "Fork" button to fork the repo.

Clone your forked repo to your desktop.

Add datacommonsorg/mixer repo as a remote.

git remote add dc https://github.com/datacommonsorg/mixer.git

Every time when you want to send a Pull Request, do the following steps:

git checkout master
git pull dc master
git checkout -b new_branch_name
# Make some code change
git add .
git commit -m "commit message"
git push -u origin new_branch_name

Then in your forked repo, can send a Pull Request.

Wait for approval of the Pull Request and merge the change.

Setup Go

Install Golang. You may need to add $(go env GOPATH)/bin to your PATH.

Generate Protobuf go code

Install protoc by following this.

Run the following code to generate golang proto files.

./prepare-proto.sh
protoc \
    --proto_path=proto \
    --go_out=. \
    --go-grpc_out=. \
    --go-grpc_opt=requireUnimplementedServers=false \
    proto/mixer.proto

E2E test locally

Install cloud-build-local following the guide, then run:

cloud-build-local --config=cloudbuild.test.yaml --dryrun=false .

Run grpc server and examples locally

gcloud auth application-default login

go run main.go \
    --bq_dataset=$(head -1 deployment/bigquery.txt) \
    --bt_table=$(head -1 deployment/bigtable.txt) \
    --bt_project=google.com:datcom-store-dev \
    --bt_instance=prophet-cache \
    --project_id=datcom-mixer-staging

# Open a new shell
cd examples/get_place_obs
go run main.go

Update golden files

Run the following commands to update golden files in ./golden_response/staging

./update-golden-staging.sh

Run the following commands to update prod golden files from staging golden files

./update-golden-prod.sh

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cloud_automation
gcf
Package btcachegeneration runs a GCF function that triggers in 2 scenarios: 1) completion of prophet-flume job in borg.
Package btcachegeneration runs a GCF function that triggers in 2 scenarios: 1) completion of prophet-flume job in borg.
Package sparql parses Sparql query for translation.
Package sparql parses Sparql query for translation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL