@@ -31,16 +31,15 @@ DJANGO_MANAGER := $(CURRENT_DIR)/$(APP_SRC_DIR)/manage.py
3131DJANGO_MANAGER_DEBUG := -m debugpy --listen localhost:5678 --wait-for-client $(CURRENT_DIR ) /$(APP_SRC_DIR ) /manage.py
3232
3333# Commands
34- PIPENV_RUN := pipenv run
35- PYTHON := $(PIPENV_RUN ) python3
36- TEST := $(PIPENV_RUN ) pytest
37- YAPF := $(PIPENV_RUN ) yapf
38- ISORT := $(PIPENV_RUN ) isort
39- PYLINT := $(PIPENV_RUN ) pylint
40- MYPY := $(PIPENV_RUN ) mypy
34+ UV_RUN := uv run
35+ PYTHON := $(UV_RUN )
36+ TEST := $(UV_RUN ) pytest
37+ RUFF := $(UV_RUN ) ruff
38+ ISORT := $(UV_RUN ) isort
39+ MYPY := $(UV_RUN ) mypy
4140PSQL := PGPASSWORD=postgres psql -h localhost -p 15433 -U postgres
4241PGRESTORE := PGPASSWORD=postgres pg_restore -h localhost -p 15433 -U postgres
43- BANDIT := $(PIPENV_RUN ) bandit
42+ BANDIT := $(UV_RUN ) bandit
4443
4544# Find all python files that are not inside a hidden directory (directory starting with .)
4645PYTHON_FILES := $(shell find $(APP_SRC_DIR ) -type f -name "* .py" -print)
@@ -53,33 +52,32 @@ DOCKER_IMG_LOCAL_TAG := $(DOCKER_REGISTRY)/$(SERVICE_NAME):local-$(USER)-$(GIT_H
5352AWS_DEFAULT_REGION = eu-central-1
5453
5554# Env file for dockerrun, defaults to .env.local / .env
56- ENV_FILE ?= $(if $(wildcard .env.local) ,.env.local,.env)
55+ export UV_ENV_FILE ?= $(if $(wildcard .env.local) ,.env.local,.env)
5756
5857.PHONY : ci
5958ci :
6059 # Create virtual env with all packages for development using the Pipfile.lock
61- pipenv sync --dev
60+ uv sync --dev
6261
6362.PHONY : setup
6463setup : $(SETTINGS_TIMESTAMP ) # # Create virtualenv with all packages for development
65- pipenv install --dev
64+ uv sync --dev
6665 cp .env.default .env
67- pipenv shell
6866
6967.PHONY : format
7068format : # # Call yapf to make sure your code is easier to read and respects some conventions.
71- $(YAPF ) -p -i --style .style.yapf $( PYTHON_FILES )
69+ $(RUFF ) format ${ PYTHON_FILES}
7270 $(ISORT ) $(PYTHON_FILES )
7371
7472
7573.PHONY : django-checks
7674django-checks : # # Run the django checks
77- $(PYTHON ) $(DJANGO_MANAGER ) check --fail-level WARNING
75+ $(UV_RUN ) $(DJANGO_MANAGER ) check --fail-level WARNING
7876
7977.PHONY : django-check-migrations
8078django-check-migrations : # # Check the migrations
8179 @echo " Check for missing migration files"
82- $(PYTHON ) $(DJANGO_MANAGER ) makemigrations --no-input --check
80+ $(UV_RUN ) $(DJANGO_MANAGER ) makemigrations --no-input --check
8381
8482
8583.PHONY : ci-check-format
@@ -140,7 +138,7 @@ dockerrun: dockerbuild ## Run the locally built docker image
140138.PHONY : lint
141139lint : # # Run the linter on the code base
142140 @echo " Run pylint..."
143- LOGGING_CFG=0 $(PYLINT ) $(PYTHON_FILES )
141+ LOGGING_CFG=0 $(RUFF ) check $(PYTHON_FILES )
144142
145143.PHONY : type-check
146144type-check : # # Run the type-checker mypy
0 commit comments