diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..30c4d12 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +# Wedding Phone Makefile +# Simple commands to run the wedding phone system + +.PHONY: start test install clean help + +start: + @echo "Starting Wedding Phone System..." + uv run python rotary_phone_web.py + +test: + @echo "Running audio tests..." + uv run python test_complete.py + +install: + @echo "Installing dependencies..." + uv pip install -e . + +clean: + @echo "Cleaning up..." + rm -rf __pycache__ .pytest_cache templates/ + find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true + find . -type f -name "*.pyc" -delete + +help: + @echo "Wedding Phone - Available Commands:" + @echo "" + @echo " make start - Start the wedding phone system" + @echo " make test - Run audio tests" + @echo " make install - Install dependencies" + @echo " make clean - Clean temporary files" + @echo " make help - Show this help message" + @echo "" + @echo "Or use UV directly:" + @echo " uv run python rotary_phone_web.py" + @echo " uv run python test_complete.py" diff --git a/README.md b/README.md index 8d22c36..83a30f3 100644 --- a/README.md +++ b/README.md @@ -141,17 +141,27 @@ This will test: ### 7. Run the System -#### Option A: Run Directly with UV (Recommended) +#### Option A: Using Make (Recommended) ```bash # Run the wedding phone system -uv run start +make start # Or run the audio test -uv run test +make test ``` -#### Option B: Run with Python +#### Option B: Using UV Directly + +```bash +# Run the wedding phone system +uv run python rotary_phone_web.py + +# Or run the audio test +uv run python test_complete.py +``` + +#### Option C: Run with Python ```bash python3 rotary_phone_web.py @@ -336,6 +346,7 @@ wedding-phone/ ├── configure_hifiberry.sh # HiFiBerry setup script ├── install_service.sh # Systemd service installer ├── wedding-phone.service # Systemd service file +├── Makefile # Make commands for easy running ├── config.example.json # Example configuration (copy to config.json) ├── pyproject.toml # UV/pip package configuration ├── AUDIO_FIX.md # Audio configuration guide diff --git a/pyproject.toml b/pyproject.toml index d841944..fad2b94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "wedding-phone" version = "1.0.0" description = "Vintage rotary phone audio system for weddings and events" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "flask>=2.3.0", "numpy>=1.21.0", @@ -23,10 +23,3 @@ dev = [ [build-system] requires = ["hatchling"] build-backend = "hatchling.build" - -[tool.uv] -dev-dependencies = [] - -[tool.uv.scripts] -start = "python rotary_phone_web.py" -test = "python test_complete.py" diff --git a/wedding-phone.service b/wedding-phone.service index 247f9b4..879e009 100644 --- a/wedding-phone.service +++ b/wedding-phone.service @@ -9,7 +9,7 @@ User=pi Group=pi WorkingDirectory=/home/pi/wedding-phone Environment="PATH=/home/pi/.local/bin:/usr/local/bin:/usr/bin:/bin" -ExecStart=/usr/bin/env uv run start +ExecStart=/usr/bin/make start Restart=always RestartSec=10