housekeeping

This commit is contained in:
ryanmerolle 2023-06-23 21:18:04 +00:00
parent 2ee95574a9
commit 38952e10f0
4 changed files with 26 additions and 3 deletions

View File

@ -2,6 +2,7 @@ autoflake
autopep8 autopep8
bandit bandit
black black
coverage
flake8 flake8
isort isort
mypy mypy

15
.gitignore vendored
View File

@ -163,3 +163,18 @@ cython_debug/
.vscode/ .vscode/
# JetBrains # JetBrains
.idea/ .idea/
# Temporary files
*.tmp
tmp/
# coverage
coverage/
htmlcov/
.coverage
.coverage.*
coverage.xml
*.cover
# ruff
.ruff_cache/

View File

@ -75,8 +75,15 @@ rebuild: setup makemigrations migrate collectstatic start
.PHONY: test .PHONY: test
test: setup test: setup
${VENV_PY_PATH} ${NETBOX_MANAGE_PATH}/manage.py makemigrations ${PLUGIN_NAME} --check ${NETBOX_MANAGE_PATH}/manage.py makemigrations ${PLUGIN_NAME} --check
${VENV_PY_PATH} ${NETBOX_MANAGE_PATH}/manage.py test ${PLUGIN_NAME} coverage run --source "netbox_acls" ${NETBOX_MANAGE_PATH}/manage.py test ${PLUGIN_NAME} -v 2
.PHONY: coverage_report
coverage_report:
coverage report
.PHONY: test_coverage
test_coverage: test coverage_report
#relpatch: #relpatch:
# $(eval GSTATUS := $(shell git status --porcelain)) # $(eval GSTATUS := $(shell git status --porcelain))

View File

@ -17,7 +17,7 @@ doco="docker compose --file docker-compose.yml"
test_netbox_unit_tests() { test_netbox_unit_tests() {
echo "⏱ Running NetBox Unit Tests" echo "⏱ Running NetBox Unit Tests"
$doco run --rm netbox python manage.py makemigrations netbox_acls --check $doco run --rm netbox python manage.py makemigrations netbox_acls --check
$doco run --rm netbox python manage.py test netbox_acls $doco run --rm netbox python manage.py test netbox_acls -v 2
} }
test_cleanup() { test_cleanup() {