From 8a5625e2bccb0c24dfc52cb3422b20e692739919 Mon Sep 17 00:00:00 2001 From: Emil Telstad Date: Thu, 14 Sep 2023 20:22:20 +0200 Subject: [PATCH] Add Pipfile scripts. --- backend/Pipfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/backend/Pipfile b/backend/Pipfile index b2cbb7c72..5c2d3550d 100644 --- a/backend/Pipfile +++ b/backend/Pipfile @@ -3,6 +3,28 @@ url = "https://pypi.org/simple" verify_ssl = true name = "pypi" +[scripts] +# See '/docs/pipenv.md'. +"pipenv:install" = "pipenv install" +"pipenv:update" = "pipenv update" +"pipenv:sync" = "bash -c \"pipenv clean; pipenv sync --dev\"" +"pipenv:docker-install-dev" = "pipenv install --deploy --ignore-pipfile --dev" # 'deploy' means abort if outdated lock file. 'ignore-pipfile' means only install using the lock file. 'dev' means install dev dependencies. +"pipenv:docker-install-prod" = "pipenv install --deploy --ignore-pipfile" # 'deploy' means abort if outdated lock file. 'ignore-pipfile' means only install using the lock file. +"pipenv:outdated" = "pipenv update --outdated" # Show outdated dependencies. +"pipenv:graph" = "pipenv graph" # Show dependency graph. +"pipenv:where" = "pipenv --where" # Show location of virtual environment. +"pipenv:rm" = "pipenv --rm" # Completely remove virtual environment. +"pipenv:shell" = "pipenv shell" # Opens a shell within the virtual environment. +"mypy:run" = "pipenv run mypy --config-file mypy.ini ." +"migrations:verify" = "pipenv run python manage.py makemigrations --check --dry-run --noinput --verbosity 2" +"bandit:run" = "pipenv run bandit --recursive --ini .bandit ." +"flake8:run" = "pipenv run flake8 --config=.flake8 ." +"yapf:diff" = "pipenv run yapf --parallel --recursive --diff ." # Dry-run yapf on all files in the project. +"yapf:apply" = "pipenv run yapf --parallel --recursive -i ." # Applies yapf to all files in the project. +"pytest:run" = "pipenv run pytest" +"pipeline:run" = "bash -c \"pipenv run mypy:run && pipenv run yapf:diff && pipenv run migrations:verify && pipenv run bandit:run && pipenv run flake8:run && pipenv run pytest:run\"" +"seed:run" = "pipenv run python manage.py seed" + [packages] django = "*" pytest = "*"