|
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% docs% lint test pyright playwright% install% testrail% coverage release |
2 | 2 | .DEFAULT_GOAL := help |
3 | 3 |
|
4 | 4 | define BROWSER_PYSCRIPT |
@@ -70,28 +70,48 @@ typings/matplotlib/__init__.pyi: |
70 | 70 |
|
71 | 71 | pyright-typings: typings/appdirs typings/folium typings/uvicorn typings/seaborn typings/matplotlib/__init__.pyi |
72 | 72 |
|
73 | | -pyright: pyright-typings ## type check with pyright |
74 | | - pyright |
| 73 | +check: check-format check-lint check-types check-tests ## check code, style, types, and test (basic CI) |
| 74 | +check-fix: format check-lint check-types check-tests ## check and format code, style, types, and test |
| 75 | +check-format: check-black check-isort |
| 76 | +check-types: check-pyright |
| 77 | +check-tests: check-pytest |
75 | 78 |
|
76 | | -lint: ## check style with flake8 |
77 | | - echo "Checking style with flake8" |
| 79 | +check-lint: |
| 80 | + @echo "-------- Checking style with flake8 ---------" |
78 | 81 | flake8 --show-source . |
| 82 | +check-black: |
| 83 | + @echo "-------- Checking code with black -----------" |
| 84 | + black --check . |
| 85 | +check-isort: |
| 86 | + @echo "-------- Sorting imports with isort ---------" |
| 87 | + isort --check-only --diff . |
| 88 | +check-pyright: typings/uvicorn typings/matplotlib/__init__.pyi typings/seaborn |
| 89 | + @echo "-------- Checking types with pyright --------" |
| 90 | + pyright |
| 91 | +check-pytest: |
| 92 | + @echo "-------- Running tests with pytest ----------" |
| 93 | + python3 tests/pytest/asyncio_prevent.py |
| 94 | + pytest |
79 | 95 |
|
80 | | -format: ## format code with black and isort |
81 | | - echo "Formatting code with black" |
| 96 | +pyright: check-types ## check types with pyright |
| 97 | +lint: check-lint ## check style with flake8 |
| 98 | +test: check-tests ## check tests quickly with the default Python |
| 99 | + |
| 100 | +format: format-black format-isort ## format code with black and isort |
| 101 | +format-black: |
| 102 | + @echo "-------- Formatting code with black --------" |
82 | 103 | black . |
83 | | - echo "Sorting imports with isort" |
| 104 | +format-isort: |
| 105 | + @echo "-------- Sorting imports with isort --------" |
84 | 106 | isort . |
85 | 107 |
|
86 | | -check: ## check code quality with black and isort |
87 | | - echo "Checking code with black" |
88 | | - black --check . |
89 | | - echo "Sorting imports with isort" |
90 | | - isort --check-only --diff . |
| 108 | +docs: ## docs: build docs with quartodoc |
| 109 | + @echo "-------- Building docs with quartodoc --------" |
| 110 | + @cd docs && make quartodoc |
91 | 111 |
|
92 | | -test: ## run tests quickly with the default Python |
93 | | - python3 tests/pytest/asyncio_prevent.py |
94 | | - pytest |
| 112 | +docs-preview: ## docs: preview docs in browser |
| 113 | + @echo "-------- Previewing docs in browser --------" |
| 114 | + @cd docs && make serve |
95 | 115 |
|
96 | 116 | # Default `SUB_FILE` to empty |
97 | 117 | SUB_FILE:= |
|
0 commit comments