NHL Roster Scrabble Score Analyzer - Calculate Scrabble scores for NHL player names
Project description
NHL Scrabble Score Analyzer
A Python application that fetches current NHL roster data and calculates "Scrabble scores" for player names based on standard Scrabble letter values. Generate comprehensive reports showing team, division, and conference standings complete with playoff brackets!
Features
- ๐ Live NHL Data - Fetches current roster data from the official NHL API
- ๐ Web Interface - FastAPI-powered server with interactive dashboard
- ๐ Comprehensive Reports - Conference/division standings, playoff brackets, team scores, statistics
- ๐ Progress Tracking - Real-time progress bars for long operations
- ๐ฏ Flexible Output - Text, JSON, or HTML format
- ๐จ Colorized Logging - Color-coded log levels with TTY detection and NO_COLOR support
- ๐งช Well-Tested - >90% coverage on core modules with 170+ tests
- โก Lightning Fast - UV support for 10-100x faster installation
- ๐ Production-Ready - Security headers, CORS, caching, deployment guides
Screenshots
Web Interface
The NHL Scrabble web interface provides a modern, interactive experience:
- Main Dashboard - Clean, responsive design with one-click analysis
- Analysis Results - Sortable tables, standings, playoff brackets, statistics
- Interactive Features - Chart.js visualizations, export (JSON/CSV/PDF), table sorting
- API Documentation - Swagger UI (
/docs) and ReDoc (/redoc)
CLI Output
Text Output (Default)
๐ NHL SCRABBLE SCORE ANALYSIS ๐
TOP 20 PLAYERS BY SCRABBLE SCORE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. Alexander Ovechkin (WSH) 45 points
2. Zdeno Chara (BOS) 42 points
...
JSON Output - Machine-readable format for integrations
HTML Output - Fully styled browser report with embedded CSS
Installation
From Source
# Clone the repository
git clone https://github.com/bdperkin/nhl-scrabble.git
cd nhl-scrabble
# Install in development mode
make init
# Or manually with pip
pip install -e ".[dev]"
Requirements
- Supported: Python 3.12, 3.13, 3.14
- Experimental: Python 3.15-dev (CI testing only, may have issues)
- Dependencies:
requests,click,pydantic,python-dotenv,rich,fastapi,uvicorn,jinja2 - Note: UV acceleration is automatic when using tox (via tox-uv plugin)
Quick Start
Run the analysis with default settings:
nhl-scrabble analyze
Or use the Python module directly:
python -m nhl_scrabble analyze
For detailed usage, see the CLI Tutorial.
Usage
CLI Commands
# Basic analysis
nhl-scrabble analyze
# Verbose output with colorized logging
nhl-scrabble analyze -v
# JSON output to file
nhl-scrabble analyze -f json -o report.json
# HTML output
nhl-scrabble analyze -f html -o report.html
# Customize display
nhl-scrabble analyze --top-players 50 --top-team-players 10
Web Server
# Start web server (default port 8000)
nhl-scrabble serve
# Custom host and port with auto-reload
nhl-scrabble serve --host 0.0.0.0 --port 5000 --reload
Visit http://localhost:8000/docs for interactive API documentation.
Interactive Dashboard
# Launch terminal dashboard
nhl-scrabble dashboard
# Filter by division/conference
nhl-scrabble dashboard --divisions Atlantic --conferences Eastern
# Static snapshot (no live updates)
nhl-scrabble dashboard --static
Complete Usage Documentation:
- CLI Tutorial - Step-by-step CLI guide
- CLI Reference - All commands and options
- Configuration Guide - Environment variables and settings
How It Works
The analyzer uses standard English Scrabble letter point values (A=1, Z=10, etc.) to score player names. It fetches live NHL data, calculates scores, aggregates by team/division/conference, and generates comprehensive reports with playoff brackets.
Learn More:
- Why Scrabble Scoring? - The concept explained
- How Scrabble Scoring Works - Detailed scoring logic
- Architecture Overview - System design
- NHL API Strategy - API integration approach
Development
Quick Start
# Clone and setup
git clone https://github.com/bdperkin/nhl-scrabble.git
cd nhl-scrabble
make init
source .venv/bin/activate
# View all available commands (57 targets)
make help
Testing
# Run all tests
make test
# Run with coverage
make test-cov
# Multi-version testing with tox
make tox # Test Python 3.12, 3.13, 3.14
make tox-parallel # Faster parallel execution
Code Quality
# Format and lint
make ruff-format
make ruff-check
# Type checking
make mypy
# Run all quality checks
make quality
# Full validation (format + quality + tests)
make check
Pre-commit Hooks
The project uses 67 comprehensive pre-commit hooks for automatic code quality validation:
# Install hooks (one-time)
pre-commit install
# Run all hooks manually
pre-commit run --all-files
# Update hook versions
pre-commit autoupdate
Complete Development Documentation:
- CONTRIBUTING.md - Development guidelines and workflow
- Makefile Reference - All 57 Makefile targets
- Testing Guide - Test execution and configuration
- UV Package Manager - 10-100x faster installation
Project Structure
nhl-scrabble/
โโโ src/nhl_scrabble/ # Main package
โ โโโ api/ # NHL API client
โ โโโ scoring/ # Scrabble scoring logic
โ โโโ models/ # Data models (Pydantic)
โ โโโ processors/ # Business logic
โ โโโ reports/ # Report generators
โ โโโ cli.py # CLI interface (Click)
โ โโโ config.py # Configuration management
โโโ tests/ # Test suite (170+ tests)
โ โโโ unit/ # Unit tests
โ โโโ integration/ # Integration tests
โโโ docs/ # Documentation (Diรกtaxis framework)
โโโ pyproject.toml # Project & UV configuration
โโโ uv.lock # Dependency lock file (1,957 lines)
See Architecture Overview for detailed system design.
Documentation
Online Documentation: https://bdperkin.github.io/nhl-scrabble/
Documentation follows the Diรกtaxis framework:
- Tutorials - Step-by-step lessons for beginners
- How-to Guides - Practical solutions to specific tasks
- Reference - Technical specifications
- Explanation - Design philosophy and concepts
Community:
- CONTRIBUTING.md - Development guidelines
- SECURITY.md - Security policy
- SUPPORT.md - Getting help
- CHANGELOG.md - Version history
- CLAUDE.md - Project overview for Claude Code
Contributing
Contributions are welcome! See CONTRIBUTING.md for detailed guidelines.
Quick Overview:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests
- Run quality checks (
make check) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Security
This project takes security seriously with comprehensive automated scanning:
- Dependabot - Automated dependency updates and security alerts
- pip-audit - CI vulnerability scanning
- CodeQL - Weekly security scans
- Pre-commit hooks - 67 comprehensive quality and security checks
Reporting Vulnerabilities: See SECURITY.md for responsible disclosure guidelines. Do not report security vulnerabilities through public GitHub issues.
Support
- Documentation: https://bdperkin.github.io/nhl-scrabble/
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Ask questions in GitHub Discussions
See SUPPORT.md for detailed support information.
License
This project is licensed under the MIT License - see the LICENSE file for details.
All runtime dependencies use permissive licenses compatible with MIT (Apache, BSD, ISC, etc.). See LICENSES.md for the complete list.
To verify license compliance:
tox -e licenses
Project Statistics
- Test Coverage: 49.93% overall, >90% on core modules
- Tests: 170+ tests (100% passing)
- Modules: 15 core modules
- Makefile Targets: 57 documented targets
- Pre-commit Hooks: 67 comprehensive quality checks
- CI/CD: GitHub Actions on Python 3.12, 3.13, 3.14 (required), 3.15-dev (experimental)
See Project Stats for complete metrics.
Acknowledgments
- NHL API for providing roster data
- Scrabble is a trademark of Hasbro, Inc.
Changelog
See CHANGELOG.md for version history.
Made with โค๏ธ for hockey and word games
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nhl_scrabble-0.0.9.tar.gz.
File metadata
- Download URL: nhl_scrabble-0.0.9.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0098cf1c73398027fe3b70536d516b7259335d5f4ba7c51f249b3c1589e7e3a8
|
|
| MD5 |
cf5aea7dc49e53e3d08023de0cbe244b
|
|
| BLAKE2b-256 |
fb0357d6b8e82b06910056e50e6aa735577a1c1f352180e8831fa32ac05d8aaf
|
Provenance
The following attestation bundles were made for nhl_scrabble-0.0.9.tar.gz:
Publisher:
publish.yml on bdperkin/nhl-scrabble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nhl_scrabble-0.0.9.tar.gz -
Subject digest:
0098cf1c73398027fe3b70536d516b7259335d5f4ba7c51f249b3c1589e7e3a8 - Sigstore transparency entry: 1397000460
- Sigstore integration time:
-
Permalink:
bdperkin/nhl-scrabble@63dd6fc6cb59d5480597dca1e2a0eafac2bf1721 -
Branch / Tag:
refs/tags/v0.0.9 - Owner: https://github.com/bdperkin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@63dd6fc6cb59d5480597dca1e2a0eafac2bf1721 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nhl_scrabble-0.0.9-py3-none-any.whl.
File metadata
- Download URL: nhl_scrabble-0.0.9-py3-none-any.whl
- Upload date:
- Size: 182.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77296b7aca94f6d1892ca74fa8d19ffcda2a10cb35a4c7d27f15cd83d55c09f1
|
|
| MD5 |
5315df3c85f9cbb5555975399d549204
|
|
| BLAKE2b-256 |
eefbc78065961dba193f68cf13ee8c69f5221e65caea11981cd5b82e96b06532
|
Provenance
The following attestation bundles were made for nhl_scrabble-0.0.9-py3-none-any.whl:
Publisher:
publish.yml on bdperkin/nhl-scrabble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nhl_scrabble-0.0.9-py3-none-any.whl -
Subject digest:
77296b7aca94f6d1892ca74fa8d19ffcda2a10cb35a4c7d27f15cd83d55c09f1 - Sigstore transparency entry: 1397000463
- Sigstore integration time:
-
Permalink:
bdperkin/nhl-scrabble@63dd6fc6cb59d5480597dca1e2a0eafac2bf1721 -
Branch / Tag:
refs/tags/v0.0.9 - Owner: https://github.com/bdperkin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@63dd6fc6cb59d5480597dca1e2a0eafac2bf1721 -
Trigger Event:
push
-
Statement type: