Skip to content

Commit

Permalink
Update generated protobuf files (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI authored Jun 25, 2022
1 parent c4e7192 commit e890a6d
Show file tree
Hide file tree
Showing 6 changed files with 958 additions and 6,253 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ When writing unittests please follow the good practises like:
With Poetry installed, run `poetry install` in the repo root.
It will create a virualenv with all required packages.

If GRPC fails to compile on MacOS, run `export CFLAGS="-DHAVE_UNISTD_H"` first. It should be resolved in GRPC 1.36.

After that you can run [pre-commit](https://pre-commit.com/) with settings included in the
repostory to have code style and linting checks.

Expand All @@ -86,13 +84,15 @@ $ poetry run pre-commit run --all-files

## Compiling proto file

`v1.proto` is compiled with these commands from the repo root, [mypy-protobuf](https://github.com/dropbox/mypy-protobuf) needs to be installed:
`v1.proto` is compiled with these commands from the repo root:

```console
$ poetry install
$ cd glocaltokens
$ protoc --python-out=. google/internal/home/foyer/v1.proto
$ poetry run python -m grpc_tools.protoc --proto_path=. --python_out=. google/internal/home/foyer/v1.proto
$ cd ..
$ protoc --plugin=protoc-gen-grpc_python=~/path/to/grpc_python_plugin --grpc_python_out=. --mypy_out=readable_stubs:. --mypy_grpc_out=readable_stubs:. glocaltokens/google/internal/home/foyer/v1.proto
$ git commit
$ poetry run python -m grpc_tools.protoc --proto_path=. --grpc_python_out=. --mypy_out=readable_stubs:. --mypy_grpc_out=readable_stubs:. glocaltokens/google/internal/home/foyer/v1.proto
$ git commit -am "Update generated files"
$ pre-commit run --hook-stage manual python-typing-update --all-files
$ git commit -a --amend --no-edit
```
6,004 changes: 394 additions & 5,610 deletions glocaltokens/google/internal/home/foyer/v1_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit e890a6d

Please sign in to comment.