Skip to main content

NHL Roster Scrabble Score Analyzer - Calculate Scrabble scores for NHL player names

Project description

NHL Scrabble Logo

NHL Scrabble Score Analyzer

CI CodeQL Docs codecov

Code style: ruff Type checked: mypy pre-commit pre-commit.ci status interrogate

PyPI version PyPI downloads Python 3.12-3.14 License: MIT Powered by UV Latest Release

Contributors GitHub stars PRs Welcome GitHub issues Commit Activity GitHub last commit

Maintenance

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
    • Interactive dashboard with real-time analysis
    • Chart.js visualizations and graphs
    • REST API with OpenAPI documentation
    • Mobile-friendly responsive design (WCAG 2.1 AA)
  • ๐Ÿ“Š 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

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:

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:

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:

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:

Community:

Contributing

Contributions are welcome! See CONTRIBUTING.md for detailed guidelines.

Quick Overview:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run quality checks (make check)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nhl_scrabble-0.0.5rc0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nhl_scrabble-0.0.5rc0-py3-none-any.whl (178.0 kB view details)

Uploaded Python 3

File details

Details for the file nhl_scrabble-0.0.5rc0.tar.gz.

File metadata

  • Download URL: nhl_scrabble-0.0.5rc0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nhl_scrabble-0.0.5rc0.tar.gz
Algorithm Hash digest
SHA256 f7ea4984ce4b01257e4172782f508269f842fe88ddc683e5015dde016d760557
MD5 3dd751d59994cd9ac527f8cb3cd9d739
BLAKE2b-256 8db474fcca7d51d0cfb0a97b8a4e4be84d0308f1c3983f75303a6426fdbf578e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nhl_scrabble-0.0.5rc0.tar.gz:

Publisher: publish.yml on bdperkin/nhl-scrabble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nhl_scrabble-0.0.5rc0-py3-none-any.whl.

File metadata

  • Download URL: nhl_scrabble-0.0.5rc0-py3-none-any.whl
  • Upload date:
  • Size: 178.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nhl_scrabble-0.0.5rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d904f813847ec6a60d9b64be3a7d11fc407dd9f018f859306416c3e225da7bb
MD5 1d4140b39bb03d494cb44a79180afb8a
BLAKE2b-256 b5f38255afc56a08b8e1eb066da93fe92b8e077d0e019e397b7199dbc20908cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for nhl_scrabble-0.0.5rc0-py3-none-any.whl:

Publisher: publish.yml on bdperkin/nhl-scrabble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page