|
1 | 1 | SHELL=/bin/bash |
2 | 2 | DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ) |
3 | 3 |
|
4 | | -### Dependency commands ### |
| 4 | +## ---- Dependency commands ---- ## |
5 | 5 |
|
6 | | -install: ## Install dependencies and CLI app |
| 6 | +install: # install dependencies |
7 | 7 | pipenv install --dev |
| 8 | + pipenv run pre-commit install |
8 | 9 |
|
9 | | -update: install ## Update all Python dependencies |
| 10 | +update: install # update all Python dependencies |
10 | 11 | pipenv clean |
11 | 12 | pipenv update --dev |
12 | 13 |
|
13 | | -### Test commands ### |
| 14 | +## ---- Unit test commands ---- ## |
14 | 15 |
|
15 | | -test: ## Run tests and print a coverage report |
| 16 | +test: # run tests and print a coverage report |
16 | 17 | pipenv run coverage run --source=my_app -m pytest -vv |
17 | 18 | pipenv run coverage report -m |
18 | 19 |
|
19 | 20 | coveralls: test |
20 | 21 | pipenv run coverage lcov -o ./coverage/lcov.info |
21 | 22 |
|
22 | | -### Code quality and safety commands ### |
23 | 23 |
|
24 | | -lint: bandit black mypy pylama safety ## Run linting, code quality, and safety checks |
| 24 | +## ---- Code quality and safety commands ---- ## |
25 | 25 |
|
26 | | -bandit: |
27 | | - pipenv run bandit -r my_app |
| 26 | +# linting commands |
| 27 | +lint: black mypy ruff safety |
28 | 28 |
|
29 | 29 | black: |
30 | 30 | pipenv run black --check --diff . |
31 | 31 |
|
32 | 32 | mypy: |
33 | | - pipenv run mypy my_app |
| 33 | + pipenv run mypy . |
34 | 34 |
|
35 | | -pylama: |
36 | | - pipenv run pylama --options setup.cfg |
| 35 | +ruff: |
| 36 | + pipenv run ruff check . |
37 | 37 |
|
38 | 38 | safety: |
39 | 39 | pipenv check |
40 | 40 | pipenv verify |
| 41 | + |
| 42 | +# apply changes to resolve any linting errors |
| 43 | +lint-apply: black-apply ruff-apply |
| 44 | + |
| 45 | +black-apply: |
| 46 | + pipenv run black . |
| 47 | + |
| 48 | +ruff-apply: |
| 49 | + pipenv run ruff check --fix . |
0 commit comments