Metadata-Version: 2.4
Name: elo-system
Version: 1.0.0
Summary: Elo rating system for fantasy sports leagues (Fantrax NBA, with multi-season dynasty support).
Author-email: Rohan V <r.vahalia@gmail.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/riders994/eloSystem
Keywords: elo,fantasy,sports,fantrax,sleeper,rating
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.2
Requires-Dist: numpy>=1.26
Requires-Dist: PyYAML>=6.0
Requires-Dist: psycopg2-binary>=2.9
Requires-Dist: requests>=2.31
Provides-Extra: sleeper
Requires-Dist: sleeper>=2.0; extra == "sleeper"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-mock>=3; extra == "dev"
Requires-Dist: pyflakes>=3; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Dynamic: license-file

# elo-system

An Elo rating system for fantasy sports leagues. It scrapes weekly scoreboards
from a fantasy platform, converts them into per-week Elo ratings, and supports
multi-season **dynasty** ratings with an offseason regression-to-mean
adjustment.

- **Platforms:** Fantrax (NBA, head-to-head categories) is implemented. A
  Sleeper backend is planned.
- **Outputs:** per-season and combined-dynasty rating frames, written to CSV
  (a Postgres backend is scaffolded but not yet wired up).

## Installation

The project depends on a fork of `fantraxapi` (the PyPI release is broken for
H2H-rotisserie leagues), so it installs from source rather than from PyPI:

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .            # add [dev] for the test/lint tooling
```

`requirements.frozen` holds the exact, reproducible dependency pins (including
the fantraxapi fork commit) used during development.

## Layout

```
elo_system/
  elo_system.py            EloSystem orchestrator (config + reader/writer wiring)
  tools/
    elo_league.py          EloLeague: season management + run/dynasty pipeline
    elo_data.py            EloCSV / EloSQL persistence backends
    basics/                LeagueBase/DataBase, Elo math, config IO, constants
    helpers/               scraper, league, formatter, calculator, frame_manager
```

## Tests

```bash
python -m pytest          # run from the repo root
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for development notes and conventions,
and [CHANGELOG.md](CHANGELOG.md) for release history.
