|
1 | | -.PHONY: help clean clean-test clean-pyc clean-build help lint test playwright-shiny playwright-examples playwright-deploys install-trcli install-playwright |
| 1 | +.PHONY: help clean% check% format% lint test pyright playwright% install% testrail% coverage release |
2 | 2 | .DEFAULT_GOAL := help |
3 | 3 |
|
4 | 4 | define BROWSER_PYSCRIPT |
@@ -60,29 +60,38 @@ typings/matplotlib/__init__.pyi: ## grab type stubs from GitHub |
60 | 60 | typings/seaborn: |
61 | 61 | pyright --createstub seaborn |
62 | 62 |
|
63 | | -pyright: typings/uvicorn typings/matplotlib/__init__.pyi typings/seaborn ## type check with pyright |
64 | | - pyright |
65 | | - |
66 | | -lint: ## check style with flake8 |
67 | | - echo "Checking style with flake8." |
| 63 | +check: check-format check-lint check-types check-tests ## check code, style, types, and test (basic CI) |
| 64 | +check-fix: format check-lint check-types check-tests ## check and format code, style, types, and test |
| 65 | +check-format: check-black check-isort |
| 66 | +check-lint: |
| 67 | + @echo "-------- Checking style with flake8 --------" |
68 | 68 | flake8 --show-source . |
69 | | - |
70 | | -format: ## format code with black and isort |
71 | | - echo "Formatting code with black." |
72 | | - black . |
73 | | - echo "Sorting imports with isort." |
74 | | - isort . |
75 | | - |
76 | | -check: ## check code quality with black and isort |
77 | | - echo "Checking code with black." |
| 69 | +check-black: |
| 70 | + @echo "-------- Checking code with black --------" |
78 | 71 | black --check . |
79 | | - echo "Sorting imports with isort." |
| 72 | +check-isort: |
| 73 | + @echo "-------- Sorting imports with isort --------" |
80 | 74 | isort --check-only --diff . |
81 | | - |
82 | | -test: ## run tests quickly with the default Python |
| 75 | +check-types: typings/uvicorn typings/matplotlib/__init__.pyi typings/seaborn |
| 76 | + @echo "-------- Checking types with pyright --------" |
| 77 | + pyright |
| 78 | +check-tests: |
| 79 | + @echo "-------- Running tests with pytest --------" |
83 | 80 | python3 tests/pytest/asyncio_prevent.py |
84 | 81 | pytest |
85 | 82 |
|
| 83 | +pyright: check-types ## check types with pyright |
| 84 | +lint: check-lint ## check style with flake8 |
| 85 | +test: check-tests ## check tests quickly with the default Python |
| 86 | + |
| 87 | +format: format-black format-isort ## format code with black and isort |
| 88 | +format-black: |
| 89 | + @echo "-------- Formatting code with black --------" |
| 90 | + black . |
| 91 | +format-isort: |
| 92 | + @echo "-------- Sorting imports with isort --------" |
| 93 | + isort . |
| 94 | + |
86 | 95 | # Default `SUB_FILE` to empty |
87 | 96 | SUB_FILE:= |
88 | 97 |
|
|
0 commit comments