BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2,或任何藍牙控制器搭配 MyWhoosh、Rouvy、Zwift 等。可於 iOS、Android、Windows 與 macOS 免費試用。
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Youth Soccer Rankings Engine
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
A comprehensive ranking system for youth soccer teams with cross-age and cross-state support.
Working with Claude Code or another AI agent? Start with CLAUDE.md for repo conventions, architecture, and workflow guidance — plus frontend/CLAUDE.md for the Next.js app.檢視完整 README ↗A comprehensive ranking system for youth soccer teams with cross-age and cross-state support.
Working with Claude Code or another AI agent? Start with
CLAUDE.mdfor repo conventions, architecture, and workflow guidance — plusfrontend/CLAUDE.mdfor the Next.js app.
CLAUDE.mdClone and setup:
git clone https://github.com/dallasheidt14/PitchRank.git
cd PitchRank
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Configure:
# Backend (Python)
cp .env.example .env
# Edit .env with your Supabase credentials
# Frontend (Next.js) - reads its own directory, not the repo root
cp frontend/.env.example frontend/.env.local
# Edit frontend/.env.local with the same Supabase project
Database setup:
# Apply migrations
supabase db push
# Or manually run: supabase/migrations/20240101000000_initial_schema.sql
Run the test suite (offline; it does not check your Supabase credentials):
python -m pytest tests/ --ignore=tests/test_enhanced_pipeline.py
PitchRank/
├── config/ # Configuration settings
├── src/
│ ├── api/ # API endpoints (future)
│ ├── base/ # Base classes for providers and validators
│ ├── etl/ # ETL pipeline framework
│ ├── models/ # Data models and matching logic
│ ├── rankings/ # Ranking algorithms
│ ├── scrapers/ # Data provider scrapers
│ └── utils/ # Utility functions and validators
├── scripts/ # Import and maintenance scripts
├── supabase/ # Database migrations
├── tests/ # Test suite
└── data/ # Data storage (raw, processed, samples)
src/models/game_matcher.py): Fuzzy matching system for team identificationsrc/etl/pipeline.py): Framework for data extraction, transformation, and loadingsrc/utils/enhanced_validators.py): Data validation for games and teamssrc/base/__init__.py): Abstract base classes for data providersThe system uses PostgreSQL (via Supabase) with:
Key tables:
teams: Master team list with team_id_master (UUID)games: Game history with game_uid (deterministic UUID) and immutability flagsteam_alias_map: Provider to master team mappings with confidence scorescurrent_rankings: Current power scores and rankings by age group and genderbuild_logs: ETL tracking with detailed metrics JSONB columnproviders: Data provider registryuser_corrections: User-submitted corrections and additionsgame_corrections: Game corrections table for immutable gamesteam_match_review_queue: Pending team matches needing manual reviewquarantine_games: Invalid games saved for reviewquarantine_teams: Invalid teams saved for reviewbuild_logs.metrics JSONB columnquarantine_games and quarantine_teams)Before importing data, verify your database is ready:
python scripts/pre_import_checklist.py
This checks for:
python scripts/import_games_enhanced.py data/games.json gotsport --validate-only
This validates all games without importing, showing:
python scripts/import_games_enhanced.py data/games.json gotsport --dry-run
This simulates the import without committing changes, showing:
python scripts/import_games_enhanced.py data/games.json gotsport --batch-size 2000
Options:
--batch-size: Number of games to process per batch (default: 1000)--dry-run: Simulate import without committing--validate-only: Only validate, don't importCheck build_logs table for detailed metrics including:
SELECT
build_id,
stage,
metrics->>'games_processed' as games_processed,
metrics->>'games_accepted' as games_accepted,
metrics->>'games_quarantined' as games_quarantined,
metrics->>'duplicates_found' as duplicates,
metrics->>'fuzzy_matches_auto' as auto_matched,
metrics->>'fuzzy_matches_manual' as review_queue,
metrics->>'processing_time_seconds' as processing_time
FROM build_logs
ORDER BY started_at DESC
LIMIT 10;
Review pending matches in the review queue:
SELECT * FROM pending_match_reviews ORDER BY confidence_score DESC;
Or use the review script:
python scripts/review_matches.py
# This creates both teams AND their ID mappings with match_method='direct_id'
# Input is a provider export with a team_id column (not tracked in git)
python scripts/import_teams_enhanced.py data/master/all_teams_master.csv gotsport
# With dry-run
python scripts/import_teams_enhanced.py data/master/all_teams_master.csv gotsport --dry-run
# Games will automatically match using team IDs (fast!)
python scripts/import_games_enhanced.py data/games.json gotsport
The system will:
-- See how many teams were matched by each method
SELECT match_method, COUNT(*) as count, AVG(match_confidence) as avg_confidence
FROM team_alias_map
WHERE provider_id = (SELECT id FROM providers WHERE code = 'gotsport')
GROUP BY match_method
ORDER BY count DESC;
-- Or use the view
SELECT * FROM match_type_statistics WHERE provider_name = 'GotSport';
-- Find teams in games without mappings
SELECT DISTINCT team_id, COUNT(*) as game_count
FROM (
SELECT home_provider_id as team_id FROM games
WHERE provider_id = (SELECT id FROM providers WHERE code = 'gotsport')
UNION ALL
SELECT away_provider_id as team_id FROM games
WHERE provider_id = (SELECT id FROM providers WHERE code = 'gotsport')
) t
WHERE NOT EXISTS (
SELECT 1 FROM team_alias_map tam
JOIN providers p ON tam.provider_id = p.id
WHERE p.code = 'gotsport'
AND tam.provider_team_id = t.team_id
)
GROUP BY team_id
ORDER BY game_count DESC
LIMIT 20;
python scripts/review_aliases.py
Configuration is managed in config/settings.py:
CLAUDE.mdEnvironment variables (.env):
SUPABASE_URL: Your Supabase project URLSUPABASE_KEY: Supabase anon keySUPABASE_SERVICE_ROLE_KEY: Service role key (for admin operations)RANKING_WINDOW_DAYS: Days to look back for rankings (default: 365)MAX_GAMES_PER_TEAM: Maximum games to consider (default: 30)# Run tests — CI ignores tests/test_enhanced_pipeline.py, which has three known
# failures; without the flag pytest exits 1
python -m pytest tests/ --ignore=tests/test_enhanced_pipeline.py
# With coverage
python -m pytest tests/ --ignore=tests/test_enhanced_pipeline.py --cov=src --cov-report=html
src/scrapers/ extending BaseScraperconfig/settings.pyThe system uses continuous rankings that update weekly:
get_teams_to_scrape())calculate_state_rankings()No season management needed - rankings are continuous based on a 365-day rolling window.
Contributions welcome! Please:
[Add license information]
Built with ❤️ for youth soccer by Dallas Heidt