-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1ef053
commit 92f5827
Showing
1 changed file
with
35 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,41 @@ | ||
lint: bandit black flake8 isort | ||
SHELL=/bin/bash | ||
DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ) | ||
|
||
bandit: | ||
pipenv run bandit -r dsaps | ||
help: # preview Makefile commands | ||
@awk 'BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \ | ||
/^[-_[:alpha:]]+:.?*#/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST) | ||
|
||
black: | ||
pipenv run black --check --diff dsaps tests | ||
## Dependency Commands | ||
install: # install Python dependencies | ||
pipenv install --dev | ||
#pipenv run pre-commit install | ||
|
||
coveralls: test | ||
pipenv run coveralls | ||
update: install # update Python dependencies | ||
pipenv clean | ||
pipenv update --dev | ||
|
||
flake8: | ||
pipenv run flake8 dsaps tests | ||
## Unit test commands | ||
test: # run tests and print a coverage report | ||
pipenv run coverage run --source=dsaps -m pytest -vv | ||
pipenv run coverage report -m | ||
|
||
coveralls: test # write coverage data to an LCOV report | ||
pipenv run coverage lcov -o ./coverage/lcov.info | ||
|
||
## Code quality and safety commands | ||
lint: black safety # run linters | ||
|
||
black: # run 'black' linter and print a preview of suggested changes | ||
pipenv run black --check --diff . | ||
|
||
safety: # check for security vulnerabilities and verify Pipfile.lock is up to date | ||
pipenv check | ||
pipenv verify | ||
|
||
lint-apply: # apply changes with 'black' and resolve 'fixable errors' with 'ruff' | ||
black-apply | ||
|
||
black-apply: # apply changes with 'black' | ||
pipenv run black . | ||
|
||
isort: | ||
pipenv run isort dsaps tests --diff | ||
|
||
test: | ||
pipenv run pytest --cov=dsaps |