Lineup post merge - #18
Merged
Merged
Conversation
…data. Mock get_cfb_roster_seasons so CI no longer fails once 2025 rosters are published. Co-authored-by: Cursor <cursoragent@cursor.com>
Fix docs/subcommand names, typing.Any, token file perms, parent CLI flags, and 401/403-only private-league detection. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new ffpy-ingest command-line workflow for importing fantasy league data from ESPN, Yahoo, and Sleeper, formatting it for display/export, and optionally persisting it into the existing SQLite database schema. It also adjusts ESPN cookie handling to avoid sending empty cookies on public leagues and adds tests covering the new ingestion flows.
Changes:
- Add new ingest modules (ESPN/Yahoo/Sleeper), shared auth helpers, output formatters, and a unified
ffpy-ingestCLI entrypoint. - Update ESPN integration request behavior to only include cookies when both SWID and
espn_s2are present. - Add comprehensive tests for ingest modules, auth helpers, CLI parsing, and a small cfbverse test improvement.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_ingest_sleeper.py | Adds coverage for Sleeper ingest normalization, roster skipping, and sorting behavior. |
| tests/test_ingest_output.py | Adds coverage for JSON/CSV/table formatting and DB persistence roundtrip. |
| tests/test_ingest_espn.py | Adds coverage for ESPN public/private behavior, cookie usage, and output shape. |
| tests/test_ingest_cli.py | Validates CLI argument parsing defaults and flag behaviors. |
| tests/test_ingest_auth.py | Adds coverage for token/cookie file read-write semantics and env-var precedence. |
| tests/test_cfbverse.py | Makes roster availability message tests deterministic by patching available seasons. |
| src/ffpy/integrations/espn_league.py | Avoids sending empty cookies; only attaches cookies when both values exist. |
| src/ffpy/ingest/yahoo.py | Implements Yahoo ingest with OAuth token loading/refreshing and normalization to DB shape. |
| src/ffpy/ingest/sleeper.py | Implements Sleeper ingest normalization, roster enrichment, and matchup aggregation. |
| src/ffpy/ingest/output.py | Adds JSON/CSV/table writers plus DB persistence helper. |
| src/ffpy/ingest/espn.py | Implements ESPN ingest with public/private auto-detect and normalization. |
| src/ffpy/ingest/cli.py | Adds ffpy-ingest CLI with ingest + DB inspection subcommands. |
| src/ffpy/ingest/auth.py | Adds token/cookie file helpers with secure permissions and env/file precedence. |
| src/ffpy/ingest/init.py | Exposes ingest package modules and documents CLI usage. |
| pyproject.toml | Registers ffpy-ingest = ffpy.ingest.cli:main console script. |
| .gitignore | Ignores pre-commit cache/home directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…mpty weeks. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.