Files
mostovik-backend/Makefile
Aleksandr Meshchriakov cbfbd8652d feat: Add comprehensive Django user app with tests using model-bakery
- Implemented user authentication with JWT tokens
- Added user and profile models with OneToOne relationship
- Created service layer for business logic separation
- Implemented DRF serializers and views
- Added comprehensive test suite with model-bakery factories
- Fixed ipdb/pdbpp dependency conflicts with custom test runner
- Configured development and production environments
- Added deployment configurations for Apache, systemd, and Docker
2026-01-19 14:12:33 +01:00

62 lines
1.8 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Makefile для удобной работы с проектом
.PHONY: help install dev-up dev-down test lint format migrate createsuperuser shell
help:
@echo "Доступные команды:"
@echo " make install - Установка зависимостей"
@echo " make dev-up - Запуск разработческого окружения (Docker)"
@echo " make dev-down - Остановка разработческого окружения"
@echo " make migrate - Выполнение миграций Django"
@echo " make createsuperuser - Создание суперпользователя"
@echo " make test - Запуск тестов"
@echo " make lint - Проверка кода линтерами"
@echo " make format - Форматирование кода"
@echo " make shell - Запуск Django shell"
@echo " make logs - Просмотр логов (Docker)"
@echo " make clean - Очистка временных файлов"
install:
uv pip install -r requirements.txt
uv pip install -r requirements-dev.txt
dev-up:
docker-compose up -d
@echo "Сервисы запущены. Приложение доступно по адресу: http://localhost:8000"
dev-down:
docker-compose down
test:
pytest src/ -v
lint:
flake8 src/
black --check src/
isort --check-only src/
format:
black src/
isort src/
flake8 src/
migrate:
cd src && python manage.py makemigrations
cd src && python manage.py migrate
createsuperuser:
cd src && python manage.py createsuperuser
shell:
cd src && python manage.py shell
logs:
docker-compose logs -f
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
rm -rf *.log
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/