mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-02-13 12:55:42 +01:00
chore(deps): update pre-commit config and apply bulk formatting
- build(pre-commit): upgrade hooks (django-upgrade 1.29.1, uv 0.9.7, ruff 0.14.3, bandit 1.8.6) - build(pre-commit): add uv-lock hook, tombi TOML formatter, prettier-plugin-packagejson - build(pre-commit): disable Django check hooks (commented out) - build(pre-commit): switch npx → bunx for prettier execution - build(node): add bun.lock, update prettier config with schema + packagejson plugin - style: apply ruff format to all Python files (comments, spacing, imports) - style: apply prettier format to all JS/CSS files (comment styles, spacing) - style: apply tombi format to pyproject.toml (reordered sections, consistent formatting) - chore: remove emoji from bash script comments for consistency BREAKING CHANGE: Django check and migration check hooks disabled in pre-commit config
This commit is contained in:
16
dev.sh
16
dev.sh
@@ -1,10 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# LiveGraphsDjango Development Helper Script
|
||||
|
||||
# Set UV_LINK_MODE to copy to avoid hardlink warnings
|
||||
|
||||
export UV_LINK_MODE=copy
|
||||
|
||||
# Function to print section header
|
||||
|
||||
print_header() {
|
||||
echo "======================================"
|
||||
echo "🚀 $1"
|
||||
@@ -12,6 +15,7 @@ print_header() {
|
||||
}
|
||||
|
||||
# Display help menu
|
||||
|
||||
if [[ $1 == "help" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]] || [[ -z $1 ]]; then
|
||||
print_header "LiveGraphsDjango Development Commands"
|
||||
echo "Usage: ./dev.sh COMMAND"
|
||||
@@ -33,6 +37,7 @@ if [[ $1 == "help" ]] || [[ $1 == "-h" ]] || [[ $1 == "--help" ]] || [[ -z $1 ]]
|
||||
fi
|
||||
|
||||
# Start Redis server
|
||||
|
||||
if [[ $1 == "redis-start" ]]; then
|
||||
print_header "Starting Redis Server"
|
||||
redis-server --daemonize yes
|
||||
@@ -46,6 +51,7 @@ if [[ $1 == "redis-start" ]]; then
|
||||
fi
|
||||
|
||||
# Test Redis connection
|
||||
|
||||
if [[ $1 == "redis-test" ]]; then
|
||||
print_header "Testing Redis Connection"
|
||||
cd dashboard_project && python manage.py test_redis
|
||||
@@ -53,6 +59,7 @@ if [[ $1 == "redis-test" ]]; then
|
||||
fi
|
||||
|
||||
# Stop Redis server
|
||||
|
||||
if [[ $1 == "redis-stop" ]]; then
|
||||
print_header "Stopping Redis Server"
|
||||
redis-cli shutdown
|
||||
@@ -61,6 +68,7 @@ if [[ $1 == "redis-stop" ]]; then
|
||||
fi
|
||||
|
||||
# Run migrations
|
||||
|
||||
if [[ $1 == "migrate" ]]; then
|
||||
print_header "Running Migrations"
|
||||
cd dashboard_project && UV_LINK_MODE=copy uv run python manage.py migrate
|
||||
@@ -68,6 +76,7 @@ if [[ $1 == "migrate" ]]; then
|
||||
fi
|
||||
|
||||
# Make migrations
|
||||
|
||||
if [[ $1 == "makemigrations" ]]; then
|
||||
print_header "Creating Migrations"
|
||||
cd dashboard_project && UV_LINK_MODE=copy uv run python manage.py makemigrations
|
||||
@@ -75,6 +84,7 @@ if [[ $1 == "makemigrations" ]]; then
|
||||
fi
|
||||
|
||||
# Create superuser
|
||||
|
||||
if [[ $1 == "superuser" ]]; then
|
||||
print_header "Creating Superuser"
|
||||
cd dashboard_project && UV_LINK_MODE=copy uv run python manage.py createsuperuser
|
||||
@@ -82,6 +92,7 @@ if [[ $1 == "superuser" ]]; then
|
||||
fi
|
||||
|
||||
# Test Celery
|
||||
|
||||
if [[ $1 == "test-celery" ]]; then
|
||||
print_header "Testing Celery"
|
||||
cd dashboard_project && UV_LINK_MODE=copy uv run python manage.py test_celery
|
||||
@@ -89,6 +100,7 @@ if [[ $1 == "test-celery" ]]; then
|
||||
fi
|
||||
|
||||
# View Celery logs
|
||||
|
||||
if [[ $1 == "logs-celery" ]]; then
|
||||
print_header "Celery Worker Logs"
|
||||
echo "Press Ctrl+C to exit"
|
||||
@@ -97,6 +109,7 @@ if [[ $1 == "logs-celery" ]]; then
|
||||
fi
|
||||
|
||||
# View Celery Beat logs
|
||||
|
||||
if [[ $1 == "logs-beat" ]]; then
|
||||
print_header "Celery Beat Logs"
|
||||
echo "Press Ctrl+C to exit"
|
||||
@@ -105,6 +118,7 @@ if [[ $1 == "logs-beat" ]]; then
|
||||
fi
|
||||
|
||||
# Django shell
|
||||
|
||||
if [[ $1 == "shell" ]]; then
|
||||
print_header "Django Shell"
|
||||
cd dashboard_project && UV_LINK_MODE=copy uv run python manage.py shell
|
||||
@@ -112,6 +126,7 @@ if [[ $1 == "shell" ]]; then
|
||||
fi
|
||||
|
||||
# Start the application
|
||||
|
||||
if [[ $1 == "start" ]]; then
|
||||
print_header "Starting LiveGraphsDjango Application"
|
||||
./start.sh
|
||||
@@ -119,6 +134,7 @@ if [[ $1 == "start" ]]; then
|
||||
fi
|
||||
|
||||
# Invalid command
|
||||
|
||||
echo "❌ Unknown command: $1"
|
||||
echo "Run './dev.sh help' to see available commands"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user