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

Automatic documentation generation for gRPC API #403

Merged
merged 2 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,5 @@ dmypy.json
# Pyre type checker
.pyre/
.vscode

sdk/python/docs/html
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ clean-html:
rm -rf $(PROJECT_ROOT)/dist

build-html:
rm -rf $(PROJECT_ROOT)/dist/
mkdir -p $(PROJECT_ROOT)/dist/python
mkdir -p $(PROJECT_ROOT)/dist/grpc
cd $(PROJECT_ROOT)/protos && $(MAKE) gen-docs
cd $(PROJECT_ROOT)/sdk/python/docs && $(MAKE) html
cp -r $(PROJECT_ROOT)/sdk/python/docs/html/* $(PROJECT_ROOT)/dist/python
2 changes: 0 additions & 2 deletions docs/api/README.md

This file was deleted.

19 changes: 10 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@ require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/ghodss/yaml v1.0.0
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/mock v1.2.0
github.com/golang/protobuf v1.3.2
github.com/google/go-cmp v0.2.0
github.com/google/uuid v1.1.1 // indirect
github.com/google/go-cmp v0.3.0
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/lyft/protoc-gen-validate v0.1.0 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/mwitkow/go-proto-validators v0.2.0 // indirect
github.com/pseudomuto/protoc-gen-doc v1.3.0 // indirect
github.com/pseudomuto/protokit v0.2.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.3.2
github.com/spf13/cobra v0.0.4
github.com/spf13/viper v1.4.0
github.com/woop/protoc-gen-doc v1.3.0 // indirect
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
google.golang.org/grpc v1.19.1
gopkg.in/yaml.v2 v2.2.2
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
google.golang.org/grpc v1.23.0
gopkg.in/russross/blackfriday.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.2.4
istio.io/gogo-genproto v0.0.0-20191212213402-78a529a42cd8 // indirect
istio.io/tools v0.0.0-20191228030621-c4eb6a11039c // indirect
)

go 1.13
358 changes: 358 additions & 0 deletions go.sum

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion protos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,22 @@ gen-python:
@$(foreach dir,$(dirs),python -m grpc_tools.protoc -I. --python_out=../sdk/python/ --mypy_out=../sdk/python/ feast/$(dir)/*.proto;)
@$(foreach dir,$(service_dirs),python -m grpc_tools.protoc -I. --grpc_python_out=../sdk/python/ feast/$(dir)/*.proto;)

install-dependencies-docs:
mkdir -p $$HOME/bin
mkdir -p $$HOME/include
go get github.com/golang/protobuf/proto && \
go get gopkg.in/russross/blackfriday.v2 && \
cd $$(mktemp -d) && \
git clone https://github.com/istio/tools/ && \
cd tools/cmd/protoc-gen-docs && \
go build && \
cp protoc-gen-docs $$HOME/bin && \
cd $$HOME && curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.2/protoc-3.11.2-linux-x86_64.zip && \
unzip protoc-3.11.2-linux-x86_64.zip -d protoc3 && \
mv protoc3/bin/* $$HOME/bin/ && \
chmod +x $$HOME/bin/protoc && \
mv protoc3/include/* $$HOME/include

gen-docs:
protoc --doc_out=../docs/api/ --doc_opt=../docs/assets/protoc-gen-doc-markdown.tmpl,proto.md feast/core/*.proto feast/serving/*.proto feast/storage/*.proto feast/types/*.proto;
protoc --docs_out=../dist/grpc feast/*/*.proto || \
$(MAKE) install-dependencies-docs && PATH=$$HOME/bin:$$PATH protoc -I $$HOME/include/ -I . --docs_out=../dist/grpc feast/*/*.proto
4 changes: 0 additions & 4 deletions sdk/python/docs/html/.buildinfo

This file was deleted.

Binary file removed sdk/python/docs/html/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file removed sdk/python/docs/html/.doctrees/feast.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed sdk/python/docs/html/.doctrees/index.doctree
Binary file not shown.
Binary file removed sdk/python/docs/html/.doctrees/modules.doctree
Binary file not shown.
Empty file removed sdk/python/docs/html/.nojekyll
Empty file.
853 changes: 0 additions & 853 deletions sdk/python/docs/html/_modules/feast/client.html

This file was deleted.

354 changes: 0 additions & 354 deletions sdk/python/docs/html/_modules/feast/config.html

This file was deleted.

923 changes: 0 additions & 923 deletions sdk/python/docs/html/_modules/feast/core/CoreService_pb2.html

This file was deleted.

336 changes: 0 additions & 336 deletions sdk/python/docs/html/_modules/feast/core/CoreService_pb2_grpc.html

This file was deleted.

397 changes: 0 additions & 397 deletions sdk/python/docs/html/_modules/feast/core/FeatureSet_pb2.html

This file was deleted.

348 changes: 0 additions & 348 deletions sdk/python/docs/html/_modules/feast/core/Source_pb2.html

This file was deleted.

528 changes: 0 additions & 528 deletions sdk/python/docs/html/_modules/feast/core/Store_pb2.html

This file was deleted.

234 changes: 0 additions & 234 deletions sdk/python/docs/html/_modules/feast/entity.html

This file was deleted.

Loading