CLAUDE: Update project documentation for UV migration
Updated all developer-facing documentation to reflect UV package management. ## Changes ### README.md (root) - Updated Python version: 3.11+ → 3.13+ - Added UV as package manager in tech stack - Updated backend setup: pip → uv sync - Updated all command examples to use `uv run` - Updated virtual environment path: venv/ → .venv/ - Added UV installation instructions ### QUICKSTART.md - Updated last modified date to 2025-11-04 - Updated backend setup to use UV installation - Replaced pip install with `uv sync` - Updated all development commands to use `uv run` - Updated troubleshooting for UV-specific issues - Updated virtual environment references: venv → .venv ## Documentation Status ✅ **Complete for new developers**: - Root README.md - comprehensive setup guide - QUICKSTART.md - fast onboarding path - backend/CLAUDE.md - detailed backend guide - backend/README.md - quick reference - backend/.env.example - all required variables - .claude/ directory - implementation guides ## New Developer Onboarding Path 1. Read root README.md - understand project structure 2. Follow QUICKSTART.md - get running in <15 minutes 3. Reference backend/CLAUDE.md - deep dive into backend 4. Check .claude/implementation/ - architecture details All documentation now consistent with UV migration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
6d1bc77e38
commit
909531b577
@ -1,6 +1,6 @@
|
|||||||
# Paper Dynasty - Quick Start Guide
|
# Paper Dynasty - Quick Start Guide
|
||||||
|
|
||||||
**Last Updated**: 2025-10-21
|
**Last Updated**: 2025-11-04
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@ -22,12 +22,11 @@ cd /mnt/NV2/Development/strat-gameplay-webapp
|
|||||||
```bash
|
```bash
|
||||||
cd backend
|
cd backend
|
||||||
|
|
||||||
# Create virtual environment
|
# Install UV (modern Python package manager)
|
||||||
python3 -m venv venv
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
source venv/bin/activate
|
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
pip install -r requirements-dev.txt
|
uv sync
|
||||||
|
|
||||||
# Configure environment
|
# Configure environment
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
@ -37,7 +36,7 @@ cp .env.example .env
|
|||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
# Verify setup
|
# Verify setup
|
||||||
python -m app.main
|
uv run python -m app.main
|
||||||
# Server should start at http://localhost:8000
|
# Server should start at http://localhost:8000
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -69,8 +68,8 @@ docker compose up -d
|
|||||||
|
|
||||||
# Terminal 2: Run Backend
|
# Terminal 2: Run Backend
|
||||||
cd backend
|
cd backend
|
||||||
source venv/bin/activate
|
uv run python -m app.main
|
||||||
python -m app.main
|
# Or: source .venv/bin/activate && python -m app.main
|
||||||
```
|
```
|
||||||
|
|
||||||
Backend will be available at:
|
Backend will be available at:
|
||||||
@ -99,14 +98,13 @@ npm run dev
|
|||||||
```bash
|
```bash
|
||||||
# Run tests
|
# Run tests
|
||||||
cd backend
|
cd backend
|
||||||
source venv/bin/activate
|
uv run pytest tests/ -v
|
||||||
pytest tests/ -v
|
|
||||||
|
|
||||||
# Format code
|
# Format code
|
||||||
black app/ tests/
|
uv run black app/ tests/
|
||||||
|
|
||||||
# Type checking
|
# Type checking
|
||||||
mypy app/
|
uv run mypy app/
|
||||||
|
|
||||||
# Check logs
|
# Check logs
|
||||||
tail -f backend/logs/app_*.log
|
tail -f backend/logs/app_*.log
|
||||||
@ -142,15 +140,18 @@ psql postgresql://paperdynasty:PASSWORD@10.10.0.42:5432/paperdynasty_dev
|
|||||||
Use `docker compose` (with space) not `docker-compose`
|
Use `docker compose` (with space) not `docker-compose`
|
||||||
|
|
||||||
### "greenlet library required"
|
### "greenlet library required"
|
||||||
|
This should not happen with UV. If it does, run:
|
||||||
```bash
|
```bash
|
||||||
pip install greenlet
|
uv sync # Reinstall all dependencies
|
||||||
```
|
```
|
||||||
|
|
||||||
### Import errors / Module not found
|
### Import errors / Module not found
|
||||||
Ensure virtual environment is activated:
|
Ensure dependencies are installed:
|
||||||
```bash
|
```bash
|
||||||
source venv/bin/activate
|
uv sync # Install/sync dependencies
|
||||||
which python # Should show path to venv/bin/python
|
# Or check virtual environment
|
||||||
|
source .venv/bin/activate
|
||||||
|
which python # Should show path to .venv/bin/python
|
||||||
```
|
```
|
||||||
|
|
||||||
### Database connection errors
|
### Database connection errors
|
||||||
|
|||||||
23
README.md
23
README.md
@ -44,8 +44,8 @@ strat-gameplay-webapp/
|
|||||||
3. **Start Backend** (in another terminal)
|
3. **Start Backend** (in another terminal)
|
||||||
```bash
|
```bash
|
||||||
cd backend
|
cd backend
|
||||||
source venv/bin/activate # or 'venv\Scripts\activate' on Windows
|
uv run python -m app.main
|
||||||
python -m app.main
|
# Or manually activate: source .venv/bin/activate && python -m app.main
|
||||||
```
|
```
|
||||||
Backend will be available at http://localhost:8000
|
Backend will be available at http://localhost:8000
|
||||||
|
|
||||||
@ -130,26 +130,26 @@ strat-gameplay-webapp/
|
|||||||
```bash
|
```bash
|
||||||
cd backend
|
cd backend
|
||||||
|
|
||||||
# Activate virtual environment
|
# Install UV (one-time setup)
|
||||||
source venv/bin/activate
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
pip install -r requirements-dev.txt
|
uv sync
|
||||||
|
|
||||||
# Run server
|
# Run server
|
||||||
python -m app.main
|
uv run python -m app.main
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
pytest tests/ -v
|
uv run pytest tests/ -v
|
||||||
|
|
||||||
# Code formatting
|
# Code formatting
|
||||||
black app/ tests/
|
uv run black app/ tests/
|
||||||
|
|
||||||
# Linting
|
# Linting
|
||||||
flake8 app/ tests/
|
uv run flake8 app/ tests/
|
||||||
|
|
||||||
# Type checking
|
# Type checking
|
||||||
mypy app/
|
uv run mypy app/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
@ -265,7 +265,8 @@ open http://localhost:8000/api/health
|
|||||||
## Tech Stack
|
## Tech Stack
|
||||||
|
|
||||||
### Backend
|
### Backend
|
||||||
- **Framework**: FastAPI (Python 3.11+)
|
- **Framework**: FastAPI (Python 3.13+)
|
||||||
|
- **Package Manager**: UV (modern Python package management)
|
||||||
- **WebSocket**: Socket.io
|
- **WebSocket**: Socket.io
|
||||||
- **Database**: PostgreSQL 14+ with SQLAlchemy
|
- **Database**: PostgreSQL 14+ with SQLAlchemy
|
||||||
- **Cache**: Redis 7
|
- **Cache**: Redis 7
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user