-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- dropped dev dependency on rope, isort & flake - poetry doesn't support dev scripts like pipenv, so create a makefile instead - Add pytest-cov - Use tox for testing multiple python versions in CI - Update README Update ci workflow
- Loading branch information
Showing
11 changed files
with
939 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
help: ## - Show this help. | ||
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
# Dev workflow tasks | ||
|
||
setup: ## - Setup the virtualenv with poetry | ||
poetry install -E compiler | ||
|
||
generate: ## - Generate test cases (do this once before running test) | ||
poetry run ./betterproto/tests/generate.py | ||
|
||
test: ## - Run tests | ||
poetry run pytest --cov betterproto | ||
|
||
types: ## - Check types with mypy | ||
poetry run mypy betterproto --ignore-missing-imports | ||
|
||
format: ## - Apply black formatting to source code | ||
poetry run black . --exclude tests/output_ | ||
|
||
clean: ## - Clean out generated files from the workspace | ||
rm -rf .coverage \ | ||
.mypy_cache \ | ||
.pytest_cache \ | ||
dist \ | ||
**/__pycache__ \ | ||
betterproto/tests/output_* | ||
|
||
# Manual testing | ||
|
||
# By default write plugin output to a directory called output | ||
o=output | ||
plugin: ## - Execute the protoc plugin, with output writte to `output` or the value passed to `-o` | ||
mkdir -p $(o) | ||
protoc --plugin=protoc-gen-custom=betterproto/plugin.py $(i) --custom_out=$(o) | ||
|
||
# CI tasks | ||
|
||
full-test: generate ## - Run full testing sequence | ||
poetry run tox | ||
|
||
check-style: ## - Check if code style is correct | ||
poetry run black . --check --diff --exclude tests/output_ |
Oops, something went wrong.