Skip to content

Commit

Permalink
added pip-audit to the cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
btr1975 committed May 20, 2024
1 parent 9b99cc3 commit b28ec1c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"include_cli": ["y", "n"],
"container_runtime": ["podman", "docker"],
"__template_repo": "https://github.com/btr1975/cookiecutter-python-library",
"__template_version": "1.0.13",
"__template_version": "1.0.14",
"_new_lines":"\n",
"_copy_without_render": [
".github"
Expand Down
9 changes: 7 additions & 2 deletions {{cookiecutter.git_repo_name}}/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Makefile for project needs
# Author: Ben Trachtenberg
# Version: 1.0.6
# Version: 1.0.7
#

.PHONY: info build build-container coverage format pylint pytest start-container stop-container remove-container gh-pages
.PHONY: info build build-container coverage format pylint pytest start-container stop-container remove-container \
gh-pages check-vuln

info:
@echo "make options"
@echo " build To build a distribution"
@echo " build-container To build a container image"
@echo " check-vuln To check for vulnerabilities in the dependencies"
@echo " coverage To run coverage and display ASCII and output to htmlcov"
@echo " format To format the code with black"
@echo " pylint To run pylint"
Expand Down Expand Up @@ -71,3 +73,6 @@ stop-container:
remove-container:
@docker rm {{ cookiecutter.git_repo_name }}
{% endif %}

check-vuln:
@pip-audit -r requirements.txt
18 changes: 12 additions & 6 deletions {{cookiecutter.git_repo_name}}/make.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@ECHO OFF
REM Makefile for project needs
REM Author: Ben Trachtenberg
REM Version: 1.0.5
REM Version: 1.0.6
REM

IF "%1" == "build" (
Expand Down Expand Up @@ -29,6 +29,11 @@ IF "%1" == "format" (
GOTO END
)

IF "%1" == "check-vuln" (
pip-audit -r requirements.txt
GOTO END
)

{% if cookiecutter.library_documents_location == 'github-pages' %}
IF "%1" == "gh-pages" (
rmdir /s /q docs\source\code
Expand All @@ -39,11 +44,12 @@ IF "%1" == "gh-pages" (
{% endif %}

@ECHO make options
@ECHO build To build a distribution
@ECHO coverage To run coverage and display ASCII and output to htmlcov
@ECHO format To format the code with black
@ECHO pylint To run pylint
@ECHO pytest To run pytest with verbose option
@ECHO build To build a distribution
@ECHO coverage To run coverage and display ASCII and output to htmlcov
@ECHO check-vuln To check for vulnerabilities in the dependencies
@ECHO format To format the code with black
@ECHO pylint To run pylint
@ECHO pytest To run pytest with verbose option
{% if cookiecutter.library_documents_location == 'github-pages' %}@ECHO gh-pages To create the GitHub pages{% endif %}

:END
1 change: 1 addition & 0 deletions {{cookiecutter.git_repo_name}}/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
-r requirements.txt
build
pip-audit
black
tomli
pytest-cov
Expand Down

0 comments on commit b28ec1c

Please sign in to comment.