- Add .claude/claude.md with project context - Add .claude/settings.local.json with Python/npm/SSH permissions - Add .claude/commands/ (migrate, deploy, import-data) - Add .claude/agents/verify_fediversion.md Full Boris-style workflow configuration for Fediversion repo. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
99 lines
2.3 KiB
Markdown
99 lines
2.3 KiB
Markdown
You are the data import assistant for Fediversion.
|
|
|
|
Fediversion imports setlist data from multiple external APIs for different bands.
|
|
|
|
## Supported Bands and Importers
|
|
|
|
### Goose (El Goose API)
|
|
```bash
|
|
cd backend
|
|
python import_elgoose.py
|
|
```
|
|
|
|
### Phish (Phish.net API v5)
|
|
```bash
|
|
cd backend
|
|
python -m importers.phish
|
|
```
|
|
|
|
**Requirements**: `PHISHNET_API_KEY` environment variable
|
|
|
|
### Grateful Dead (Grateful Stats API)
|
|
```bash
|
|
cd backend
|
|
python -m importers.grateful_dead
|
|
```
|
|
|
|
**Requirements**: Appropriate API credentials for Grateful Stats
|
|
|
|
### Dead & Company (Setlist.fm)
|
|
```bash
|
|
cd backend
|
|
python -m importers.setlistfm deadco
|
|
```
|
|
|
|
### Billy Strings (Setlist.fm)
|
|
```bash
|
|
cd backend
|
|
python -m importers.setlistfm bmfs
|
|
```
|
|
|
|
**Requirements**: `SETLISTFM_API_KEY` environment variable
|
|
|
|
## Before Importing
|
|
|
|
1. **Check API keys** are set in environment:
|
|
```bash
|
|
echo $PHISHNET_API_KEY
|
|
echo $SETLISTFM_API_KEY
|
|
```
|
|
|
|
2. **Verify database connection**:
|
|
```bash
|
|
cd backend
|
|
alembic current
|
|
```
|
|
|
|
3. **Check existing data** (avoid duplicates):
|
|
```bash
|
|
cd backend
|
|
python -c "from sqlalchemy import create_engine; from sqlalchemy.orm import sessionmaker; # ... check counts"
|
|
```
|
|
|
|
## Import Process
|
|
|
|
1. **Ensure backend is running locally** or use scripts directly
|
|
2. **Run the appropriate importer** for the band
|
|
3. **Monitor output** for errors or skipped items
|
|
4. **Verify imported data** in database or via API
|
|
|
|
## Common Issues
|
|
|
|
### Rate Limiting
|
|
- APIs may rate limit requests
|
|
- Importers should handle retries with exponential backoff
|
|
- Consider spacing out imports if needed
|
|
|
|
### Missing Data
|
|
- Some shows may be missing from source APIs
|
|
- Check API documentation for coverage
|
|
- Manual data entry may be needed for gaps
|
|
|
|
### Duplicate Data
|
|
- Importers should check for existing records
|
|
- Use unique constraints on database models
|
|
- Run idempotent imports (safe to re-run)
|
|
|
|
## Constraints
|
|
|
|
- Always verify API keys before importing
|
|
- Don't run imports on production VPS without testing locally first
|
|
- Large imports may take time - be patient
|
|
- Check import logs for errors or warnings
|
|
|
|
## Output
|
|
|
|
- Show which band is being imported
|
|
- Display number of shows/artists/venues imported
|
|
- Report any errors or skipped items
|
|
- Suggest verification steps (check counts in database)
|