Show established at launch and say plainly that self-reported matches count

Open
#418 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, backend, testing

Research direction

Start with the rating schemas, ratings API docstrings, README.md, and CONTEXT.md named in the issue; check what the API currently returns for established and how player facing reliability text describes provisional ratings and self reported matches. Then inspect the existing Match ledger and rating tests before adding the listed coverage. Done means the launch criteria hold on engine 1.0.0; the reliability cap and upgrade checks wait for the next engine release.

Written by the indexing model from the issue text.

Description

area:ratings enhancement size:S

Context: openpickleball/.github#14 was amended: confirmed self-reported matches count toward provisional ratings, at their lower weight. The backend already counts them (Match.objects.counted() counts every confirmed match, of any match type). backend#227 decides only who is a trusted submitter.

The app launches on engine 1.0.0. The rule from openpickleball/engine#164 is merged but not in a release yet. That rule keeps reliability below 60 until a player has at least 3 tournament, league, or recreational verified matches in the format. Until it ships, a player with only self-reported matches can show reliability above 60. Engine 1.0.0 already reports that player as not established, since established needs 3 verified matches. So at launch the app shows established, and the reliability cap arrives with the next engine release.

Tasks at launch (engine 1.0.0):

  • Return established with every rating the API serves, if it is not already returned, and say in the schema description what it means
  • Label a rating that is not established as provisional wherever reliability is described to players
  • Add a test that a confirmed self-reported Match is in the engine ledger and moves both teams' ratings, and that a pending one is not, if no such test exists
  • Add a test that a Player with only confirmed self-reported matches gets a rating with established false
  • Check every player-facing text about ratings (rating schemas, the ratings API docstrings, README.md, CONTEXT.md) for any claim that only organizer matches count, and correct it
  • Say, wherever reliability is described to players, that self-reported matches count less than organized ones

Tasks when the next engine release ships (with engine#164):

  • Move the pin in pyproject.toml and uv.lock from v1.0.0 to that release (docs/engine.md)
  • Run recompute_ratings after the upgrade, as its docstring says for an engine upgrade
  • Add a test that a Player with only confirmed self-reported matches shows reliability below 60

Acceptance criteria:

  • At launch: a confirmed self-reported Match counts and a pending one does not, every served rating carries established, and no backend doc or API description says that only organizer matches count
  • After the upgrade: a Player with only self-reported matches shows reliability below 60

Depends on: the next engine release, for the upgrade tasks only

Size: S

Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.