Skip to content

docs: align DataItems examples with server-side GameDataItemsEnum - #96

Merged
MarTrepodi merged 5 commits into
mainfrom
docs/sync-with-game-data-items-enum
Jun 3, 2026
Merged

docs: align DataItems examples with server-side GameDataItemsEnum#96
MarTrepodi merged 5 commits into
mainfrom
docs/sync-with-game-data-items-enum

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

Summary

  • Update DataItems docstring, docs/api/helpers.md, and the Sync/Async examples/get_game_data.py scripts to use the server-accepted SEGMENT1SEGMENT4 aggregates instead of raw single-collection bit values (DataItems.UNITS, "UnitDefinitions"). The Comlink server validates items against its GameDataItemsEnum and rejects single-bit values with HTTP 400 — same root cause as the integration test fix in Update game data items constants #95.
  • Add a new "GameDataItems server alignment" section (§9) to docs/migration.md covering the Segment2 (687173795841125968624222208) and Segment4 (2812000988037123377424842620928) aggregate value changes, the new DataItems members (ABILITY_DECISION_TREE, ERA_DEFINITION, UBS_UPDATE), and the new legacy-name aliases. Updates the migration summary table to reflect the same.
  • Fix a pre-existing typo in docs/migration.md where Constants.get("Segment1") was annotated as returning '206158430208' (Segment3's value) — it actually returns '2097151'.

Dependencies

Built on top of #95. The helper symbols this PR documents (DataItems.ABILITY_DECISION_TREE, etc., and the corrected SEGMENT2/SEGMENT4 values) land in #95. Recommend merging #95 first; this branch will then rebase cleanly onto main and the diff will narrow to docs-only.

Test plan

  • uv run mkdocs build --strict builds clean (new #9-gamedataitems-server-alignment anchor resolves)
  • uv run ruff format / uv run ruff check clean on the edited source file
  • uv run pytest tests/unit/test_helpers.py -k "Constants or GameDataItemsEnumSync" — 12 passed
  • CI green on push (after Update game data items constants #95 merges and this rebases)

🤖 Generated with Claude Code

MarTrepodi and others added 4 commits June 3, 2026 13:00
Add Python 3.14 to the ci.yml test matrix so CI verifies the package
runs on the latest stable interpreter, and add the corresponding
"Programming Language :: Python :: 3.14" trove classifier so PyPI
metadata accurately reflects supported versions.

`requires-python = ">=3.10"` already covers 3.14, and the ruff
`target-version = "py310"` / mypy `python_version = "3.10"` settings
are floor values so they need no update.

Branch protection on main has also been updated separately to require
the new `Test (Python 3.14)` status check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ion test

The comlink server rejects raw single-bit item values (HTTP 400) with a
message recommending Segment1-4. Switch the filtered get_game_data
integration test from DataItems.UNITS to DataItems.SEGMENT1 so it runs
against a value the server accepts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Update helper docstring, helpers.md API reference, and the Sync/Async
get_game_data example scripts to use the server-accepted SEGMENT1-4
aggregates rather than raw single-collection bit values
(DataItems.UNITS, "UnitDefinitions"), which the Comlink server rejects
with HTTP 400.

Also adds a new "GameDataItems server alignment" section to the v1 to
v2 migration guide documenting the Segment2 and Segment4 aggregate
value changes and the new DataItems members (ABILITY_DECISION_TREE,
ERA_DEFINITION, UBS_UPDATE) introduced when re-syncing against the live
enum.

Fixes a pre-existing typo in the migration guide where the
Constants.get Segment1 example was annotated as returning '206158430208'
(Segment3's value) instead of '2097151'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci Changes related to continuous integration processes dependencies Updates to package dependency libraries code testing labels Jun 3, 2026
Comment thread examples/Async/get_game_data.py Dismissed
Comment thread examples/Async/get_game_data.py Dismissed
@MarTrepodi
MarTrepodi merged commit a456b1b into main Jun 3, 2026
15 of 16 checks passed
@MarTrepodi
MarTrepodi deleted the docs/sync-with-game-data-items-enum branch June 3, 2026 17:37
MarTrepodi added a commit that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes related to continuous integration processes code dependencies Updates to package dependency libraries documentation Improvements or additions to documentation testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant