docs: align DataItems examples with server-side GameDataItemsEnum - #96
Merged
Conversation
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>
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.
Summary
DataItemsdocstring,docs/api/helpers.md, and the Sync/Asyncexamples/get_game_data.pyscripts to use the server-acceptedSEGMENT1–SEGMENT4aggregates instead of raw single-collection bit values (DataItems.UNITS,"UnitDefinitions"). The Comlink server validatesitemsagainst itsGameDataItemsEnumand rejects single-bit values with HTTP 400 — same root cause as the integration test fix in Update game data items constants #95.docs/migration.mdcovering theSegment2(68717379584→1125968624222208) andSegment4(281200098803712→3377424842620928) aggregate value changes, the newDataItemsmembers (ABILITY_DECISION_TREE,ERA_DEFINITION,UBS_UPDATE), and the new legacy-name aliases. Updates the migration summary table to reflect the same.docs/migration.mdwhereConstants.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 correctedSEGMENT2/SEGMENT4values) land in #95. Recommend merging #95 first; this branch will then rebase cleanly ontomainand the diff will narrow to docs-only.Test plan
uv run mkdocs build --strictbuilds clean (new#9-gamedataitems-server-alignmentanchor resolves)uv run ruff format/uv run ruff checkclean on the edited source fileuv run pytest tests/unit/test_helpers.py -k "Constants or GameDataItemsEnumSync"— 12 passed🤖 Generated with Claude Code