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

Remove Python client and related python code #318

Merged
merged 1 commit into from
Jun 11, 2021
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
6 changes: 2 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,17 @@ Twirp uses github pull requests. Fork, hack away at your changes and submit. Mos
* Add tests that cover your contribution. Overall code coverage should not decrease.
* Twirp officially supports the last 3 releases of Go.
* Protobuf version 3.x.x to generate code with the protoc command.
* The Python implementation uses Python 2.7. As such, it is not suitable for production use in its current form.
* For linters and other tools, we use [retool](https://github.com/twitchtv/retool). If `make setup` is not able to install it, you can install it in your path with `go get github.com/twitchtv/retool` and then install tools with `retool build`.

### Running tests

Generally you want to make changes and run `make`, which will install all
dependencies we know about, build the core, and run all of the tests that we
have against Go and Python code. A few notes:
dependencies we know about, build the core, and run tests. A few notes:

* Clone the repo on `$GOPATH/src/github.com/twitchtv/twirp` (go modules not supported yet).
* Run Go unit tests with `make test`.
* Most tests of the Go server are in `internal/twirptest/service_test.go`.
* Integration tests running the full stack in both Go and Python auto-generated clients are in the [clientcompat](./clientcompat) directory.
* Integration tests running the full stack in Go are in the [clientcompat](./clientcompat) directory.

## Contributing Documentation

Expand Down
24 changes: 3 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export GO111MODULE=off

all: setup test_all

.PHONY: setup generate test_all test test_clients test_go_client test_python_client
.PHONY: setup generate test_all test test_clientcompat

setup:
./check_protoc_version.sh
Expand All @@ -13,26 +13,18 @@ setup:
generate:
# Recompile and install generator
GOBIN="$$PWD/bin" go install -v ./protoc-gen-twirp
GOBIN="$$PWD/bin" go install -v ./protoc-gen-twirp_python
# Generate code from go:generate comments
go generate ./...

test_all: setup test test_clients
test_all: setup test test_clientcompat

test: generate
./_tools/bin/errcheck ./internal/twirptest
go test -race $(shell GO111MODULE=off go list ./... | grep -v /vendor/ | grep -v /_tools/)

test_clients: test_go_client test_python_client

test_go_client: generate build/clientcompat build/gocompat
test_clientcompat: generate build/clientcompat build/gocompat
./build/clientcompat -client ./build/gocompat

test_python_client: generate build/clientcompat build/pycompat
./build/clientcompat -client ./build/pycompat


# For clientcompat and testing Python
./build:
mkdir build

Expand All @@ -41,13 +33,3 @@ test_python_client: generate build/clientcompat build/pycompat

./build/clientcompat: ./build
go build -o build/clientcompat ./clientcompat

./build/venv: ./build
virtualenv ./build/venv

./build/venv/bin/pycompat.py: ./build/venv
./build/venv/bin/pip install --upgrade ./clientcompat/pycompat

./build/pycompat: ./build/venv/bin/pycompat.py
cp ./clientcompat/pycompat/pycompat.sh ./build/pycompat
chmod +x ./build/pycompat
1 change: 0 additions & 1 deletion clientcompat/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
package main

//go:generate protoc --twirp_out=. --go_out=. clientcompat.proto
//go:generate protoc --twirp_python_out=./pycompat --python_out=./pycompat clientcompat.proto
262 changes: 0 additions & 262 deletions clientcompat/pycompat/clientcompat_pb2.py

This file was deleted.

Loading