Skip to content

Add the Fixture fields from spec 1.13.82 - #11

Open
bensynapse wants to merge 1 commit into
mainfrom
feat/fixture-fields-1.13.82
Open

bensynapse wants to merge 1 commit into
mainfrom
feat/fixture-fields-1.13.82

Conversation

@bensynapse

Copy link
Copy Markdown
Member

What changed

The spec at version 1.13.82 lists 20 fields on a fixture row. The Fixture model typed 13 of them.

Fixture gains seven fields:

  • reason: str | None. One of walkover, retired, cancelled, default, postponed.
  • match_id: int | None. The id of the match the fixture became. None until one exists.
  • gender: str | None. men or women. None for mixed events.
  • is_qualifying: bool | None. None means never stated, and None is not False.
  • created_at: datetime | None, UTC.
  • updated_at: datetime | None, UTC.
  • pregame_forecasts: list[dict] | None. ULTRA only. The field is absent below ULTRA.

Match gains two fields from the same spec era:

  • is_qualifying: bool | None.
  • pregame_forecasts: list[dict] | None. Sent on ULTRA upcoming list rows only.

Notes for review

  • All of these were already readable through raw and attribute passthrough. They are now typed and documented.
  • created_at and updated_at join _datetime_fields, so they parse like start_time.
  • An absent pregame_forecasts reads None. An empty list from the server stays [].
  • The changelog entry sits under a new Unreleased heading. The package version is untouched.
  • Nothing is tagged or published here.

Tests

  • pytest -q -m "not contract": 254 passed.
  • ruff check src/ tests/ and ruff format --check src/: clean.
  • sh scripts/truthcheck.sh: OK.

The spec lists 20 fields on a fixture row and the model typed 13.
Fixture gains reason, match_id, gender, is_qualifying, created_at, updated_at and pregame_forecasts.
Match gains is_qualifying and pregame_forecasts.
is_qualifying has three values. None means never stated, and None is not False.
pregame_forecasts is sent on ULTRA only, so None means the field was absent.
The package version stays as it is.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant