Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jonavellecuerdo committed Feb 21, 2024
1 parent e1ef053 commit 92f5827
Showing 1 changed file with 35 additions and 13 deletions.
48 changes: 35 additions & 13 deletions Makefile
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

0 comments on commit 92f5827

Please sign in to comment.