docs(01-02): complete NBA + NHL modules plan
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ None
|
||||
- Integer phases (1, 2, 3): Planned milestone work
|
||||
- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)
|
||||
|
||||
- [ ] **Phase 1: Script Architecture** - Split monolithic scripts into sport-specific modules (1/3 plans)
|
||||
- [ ] **Phase 1: Script Architecture** - Split monolithic scripts into sport-specific modules (2/3 plans)
|
||||
- [ ] **Phase 2: Stadium Foundation** - Complete stadium database with coordinates and names
|
||||
- [ ] **Phase 3: Alias Systems** - Stadium and team alias systems for name variations
|
||||
- [ ] **Phase 4: Canonical Linking** - Correct game→team→stadium relationships
|
||||
@@ -31,7 +31,7 @@ None
|
||||
|
||||
Plans:
|
||||
- [x] 01-01: Create core.py shared module + mlb.py sport module
|
||||
- [ ] 01-02: Create nba.py + nhl.py sport modules
|
||||
- [x] 01-02: Create nba.py + nhl.py sport modules
|
||||
- [ ] 01-03: Create nfl.py + refactor scrape_schedules.py orchestrator
|
||||
|
||||
### Phase 2: Stadium Foundation
|
||||
@@ -88,7 +88,7 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6
|
||||
|
||||
| Phase | Plans Complete | Status | Completed |
|
||||
|-------|----------------|--------|-----------|
|
||||
| 1. Script Architecture | 1/3 | In progress | - |
|
||||
| 1. Script Architecture | 2/3 | In progress | - |
|
||||
| 2. Stadium Foundation | 0/TBD | Not started | - |
|
||||
| 3. Alias Systems | 0/TBD | Not started | - |
|
||||
| 4. Canonical Linking | 0/TBD | Not started | - |
|
||||
|
||||
@@ -10,27 +10,27 @@ See: .planning/PROJECT.md (updated 2026-01-09)
|
||||
## Current Position
|
||||
|
||||
Phase: 1 of 6 (Script Architecture)
|
||||
Plan: 1 of 3 in current phase
|
||||
Plan: 2 of 3 in current phase
|
||||
Status: In progress
|
||||
Last activity: 2026-01-10 — Completed 01-01-PLAN.md
|
||||
Last activity: 2026-01-10 — Completed 01-02-PLAN.md
|
||||
|
||||
Progress: █░░░░░░░░░ 10%
|
||||
Progress: ██░░░░░░░░ 20%
|
||||
|
||||
## Performance Metrics
|
||||
|
||||
**Velocity:**
|
||||
- Total plans completed: 1
|
||||
- Average duration: 5 min
|
||||
- Total execution time: 5 min
|
||||
- Total plans completed: 2
|
||||
- Average duration: 7.5 min
|
||||
- Total execution time: 15 min
|
||||
|
||||
**By Phase:**
|
||||
|
||||
| Phase | Plans | Total | Avg/Plan |
|
||||
|-------|-------|-------|----------|
|
||||
| 1. Script Architecture | 1/3 | 5 min | 5 min |
|
||||
| 1. Script Architecture | 2/3 | 15 min | 7.5 min |
|
||||
|
||||
**Recent Trend:**
|
||||
- Last 5 plans: 01-01 (5 min)
|
||||
- Last 5 plans: 01-01 (5 min), 01-02 (10 min)
|
||||
- Trend: —
|
||||
|
||||
## Accumulated Context
|
||||
@@ -42,6 +42,8 @@ Recent decisions affecting current work:
|
||||
|
||||
- **01-01**: Each sport module has its own `get_{sport}_team_abbrev()` function for independence
|
||||
- **01-01**: Import fallback pattern (try/except) for running from Scripts/ or project root
|
||||
- **01-02**: NBA/NHL use season string format (2024-25) for cross-calendar-year seasons
|
||||
- **01-02**: Each module has hardcoded stadium list with coordinates as reliable fallback
|
||||
|
||||
### Deferred Issues
|
||||
|
||||
@@ -54,5 +56,5 @@ None yet.
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2026-01-10
|
||||
Stopped at: Completed 01-01-PLAN.md
|
||||
Stopped at: Completed 01-02-PLAN.md
|
||||
Resume file: None
|
||||
|
||||
91
.planning/phases/01-script-architecture/01-02-SUMMARY.md
Normal file
91
.planning/phases/01-script-architecture/01-02-SUMMARY.md
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
phase: 01-script-architecture
|
||||
plan: 02
|
||||
subsystem: data-pipeline
|
||||
tags: [python, scrapers, modular-architecture, nba, nhl]
|
||||
|
||||
# Dependency graph
|
||||
requires: [01-01]
|
||||
provides:
|
||||
- nba.py NBA-specific scrapers
|
||||
- nhl.py NHL-specific scrapers
|
||||
affects: [01-03]
|
||||
|
||||
# Tech tracking
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "get_{sport}_season_string() for cross-calendar-year seasons (2024-25)"
|
||||
- "Hardcoded stadium data with coordinates as fallback source"
|
||||
|
||||
key-files:
|
||||
created:
|
||||
- Scripts/nba.py
|
||||
- Scripts/nhl.py
|
||||
modified: []
|
||||
|
||||
key-decisions:
|
||||
- "NBA/NHL use season string format (2024-25) for cross-calendar-year seasons"
|
||||
- "Each module has hardcoded stadium list with coordinates as reliable fallback"
|
||||
|
||||
patterns-established:
|
||||
- "Sport modules follow identical structure: TEAMS dict, scrapers, sources, convenience function"
|
||||
|
||||
issues-created: []
|
||||
|
||||
# Metrics
|
||||
duration: 10min
|
||||
completed: 2026-01-10
|
||||
---
|
||||
|
||||
# Phase 1 Plan 02: NBA + NHL Modules Summary
|
||||
|
||||
**Extracted NBA and NHL scrapers from monolithic script into dedicated sport modules**
|
||||
|
||||
## Performance
|
||||
|
||||
- **Duration:** 10 min
|
||||
- **Started:** 2026-01-10T06:03:30Z
|
||||
- **Completed:** 2026-01-10T06:13:30Z
|
||||
- **Tasks:** 2
|
||||
- **Files created:** 2
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Created `Scripts/nba.py` with NBA_TEAMS (30 teams), 3 game scrapers, stadium data with coordinates
|
||||
- Created `Scripts/nhl.py` with NHL_TEAMS (32 teams including Utah Hockey Club), 3 game scrapers, stadium data
|
||||
- Both modules follow the mlb.py pattern exactly for consistency
|
||||
|
||||
## Task Commits
|
||||
|
||||
Each task was committed atomically:
|
||||
|
||||
1. **Task 1: Create nba.py sport module** - `70acfb7` (feat)
|
||||
2. **Task 2: Create nhl.py sport module** - `c229fa7` (feat)
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `Scripts/nba.py` - NBA team mappings, Basketball-Reference/ESPN/CBS scrapers, 30 arenas with coordinates
|
||||
- `Scripts/nhl.py` - NHL team mappings, Hockey-Reference/NHL API/ESPN scrapers, 32 arenas with coordinates
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- Used `get_nba_season_string()` and `get_nhl_season_string()` instead of a shared function to maintain module independence
|
||||
- Included Utah Hockey Club (newest NHL team) in team mappings
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None - plan executed exactly as written.
|
||||
|
||||
## Issues Encountered
|
||||
|
||||
None
|
||||
|
||||
## Next Phase Readiness
|
||||
|
||||
- core.py, mlb.py, nba.py, nhl.py all complete
|
||||
- Ready for 01-03-PLAN.md (nfl.py + orchestrator refactor)
|
||||
|
||||
---
|
||||
*Phase: 01-script-architecture*
|
||||
*Completed: 2026-01-10*
|
||||
Reference in New Issue
Block a user