1
- help : # # - Show this help.
1
+ .PHONY : help setup generate test types format clean plugin full-test check-style
2
+
3
+ help : # # - Show this help.
2
4
@fgrep -h " ##" $(MAKEFILE_LIST ) | fgrep -v fgrep | sed -e ' s/\\$$//' | sed -e ' s/##//'
3
5
4
6
# Dev workflow tasks
5
7
6
- setup : # # - Setup the virtualenv with poetry
8
+ setup : # # - Setup the virtualenv with poetry
7
9
poetry install -E compiler
8
10
9
- generate : # # - Generate test cases (do this once before running test)
11
+ test_o = ./betterproto/tests/output_*/
12
+
13
+ ${test_o} :
10
14
poetry run ./betterproto/tests/generate.py
11
15
12
- test : # # - Run tests
16
+ generate : ${test_o} # # - Generate test cases (do this once before running test)
17
+
18
+ test : generate # # - Run tests
13
19
poetry run pytest --cov betterproto
14
20
15
- types : # # - Check types with mypy
21
+ types : # # - Check types with mypy
16
22
poetry run mypy betterproto --ignore-missing-imports
17
23
18
- format : # # - Apply black formatting to source code
24
+ format : # # - Apply black formatting to source code
19
25
poetry run black . --exclude tests/output_
20
26
21
- clean : # # - Clean out generated files from the workspace
27
+ clean : # # - Clean out generated files from the workspace
22
28
rm -rf .coverage \
23
29
.mypy_cache \
24
30
.pytest_cache \
@@ -30,14 +36,14 @@ clean: ## - Clean out generated files from the workspace
30
36
31
37
# By default write plugin output to a directory called output
32
38
o =output
33
- plugin : # # - Execute the protoc plugin, with output writte to `output` or the value passed to `-o`
39
+ plugin : # # - Execute the protoc plugin, with output write to `output` or the value passed to `-o`
34
40
mkdir -p $(o )
35
41
protoc --plugin=protoc-gen-custom=betterproto/plugin.py $(i ) --custom_out=$(o )
36
42
37
43
# CI tasks
38
44
39
- full-test : generate # # - Run full testing sequence
45
+ full-test : generate # # - Run full testing sequence with multiple pythons
40
46
poetry run tox
41
47
42
- check-style : # # - Check if code style is correct
48
+ check-style : # # - Check if code style is correct
43
49
poetry run black . --check --diff --exclude tests/output_
0 commit comments