Skip to content

FPL - Implemented import and other house-keeping#33

Open
TimWheeler-SQUP wants to merge 2 commits intomainfrom
work/tw/fpl-import
Open

FPL - Implemented import and other house-keeping#33
TimWheeler-SQUP wants to merge 2 commits intomainfrom
work/tw/fpl-import

Conversation

@TimWheeler-SQUP
Copy link
Copy Markdown
Contributor

@TimWheeler-SQUP TimWheeler-SQUP commented Apr 5, 2026

📋 Summary

  • Index definitions — gameweeks, classic leagues, and H2H leagues are now indexed as searchable objects using the three custom types already defined in custom_types.json

  • Centralised Manager ID now it is entered on setup page

  • Data streams populate league IDs based on Manager ID leagueSummary & h2hLeagueSummary

  • Robust property names — gameweek chip data is now keyed by chip name (bboost, 3xc, wildcard, freehit) via a post-request script

  • Config validation — the Manager ID is now validated when saving the plugin, giving immediate feedback if the ID is wrong

  • Metadata updates to standardise with other plugins


🔗 Related issue(s)

N/A


🧩 Plugin details

  • Fantasy Premier League:
  • Type of change:
    • Enhancement to existing datastream
    • Documentation / metadata / logo
    • Import

⚠️ Breaking changes

Does this PR introduce any breaking changes?

  • No
  • Yes (please describe):
    It adds import and changes the data source config screen. Not sure how that works with existing plugins.
    Data stream changes should work with existing setup.

📚 Documentation

Not yet, where should it live?


✅ Checklist

  • No secrets or credentials included
  • Plugin, datastream and UI naming follow SquaredUp guidelines
  • I agree to the Code of Conduct

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things worth a human look before merging: the gameweekData.json renames chip field paths (e.g. chip_plays.0.num_playedchip_plays.bboost) which would break existing dashboards using those fields — this may warrant a major version bump rather than a patch bump. Also, the per-datastream userID removal assumes all existing configs will seamlessly pick up the new global ui.json field, which may need verification. Documentation is also noted as incomplete in the PR description.

Extended reasoning...

Overview

This PR touches 15 files in the FantasyPremierLeague plugin, introducing: import support (indexDefinitions, custom_types, configValidation), three new data streams (classicLeagues, h2hLeagues, h2hLeagueSummary), a post-request script for robust chip data keying, centralised Manager ID in ui.json, and various metadata/cspell updates. The version is bumped from 1.0.2 to 1.0.3.

Security risks

No security risks identified — no credentials, no auth changes, uses a public FPL API with no authentication.

Level of scrutiny

This PR warrants careful human review. The scope is substantial (15 files, new architectural features), and two changes in particular deserve closer inspection before merging:

  1. Potential breaking change in gameweekData: The chip_plays field names change from index-based paths () to name-keyed paths (, , etc.). Any existing dashboards referencing the old field names will break. The repo guidelines state a major version bump is required for significant field modifications. A patch bump to 1.0.3 may be insufficient.

  2. Centralised userID migration: The per-datastream UI fields are removed from managerHistory, managerInformation, and managerSummary, replaced by a global field. Existing plugin configurations may need to be reconfigured, which could also be considered a breaking change.

Other factors

The PR description notes documentation as incomplete ('Not yet, where should it live?'). The inline bug comments cover several nit-level guideline violations (missing placeholder, prohibited title attributes, missing tags). These are minor, but the breaking change question is the primary reason to defer here.

@TimWheeler-SQUP TimWheeler-SQUP added new-plugin Used to PR newly added plugins enhancement New feature or request and removed new-plugin Used to PR newly added plugins labels Apr 5, 2026
@TimWheeler-SQUP TimWheeler-SQUP requested a review from clarkd April 5, 2026 16:33
@TimWheeler-SQUP
Copy link
Copy Markdown
Contributor Author

@clarkd - Quite a lot of changes here, but only 3 uses of the plugin. Happy to bump major version or merge breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

1 participant