Skip to content

Update game data items constants - #95

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

Update game data items constants#95
MarTrepodi merged 3 commits into
mainfrom
chore/sync-data-items-with-game-data-items-enum

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

Description

Update the game data items constants with latest values from Comlink

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Documentation
  • Tests

Checklist

  • My commits follow the Angular commit convention (feat:, fix:, refactor:, etc.)
  • I have added/updated docstrings with type hints for any new or changed public methods
  • I have added unit tests that cover my changes (mocked, not requiring a live comlink service)
  • All existing tests still pass (python -m pytest tests/ -v)
  • Ruff linter passes (ruff check src/ tests/)
  • I have not bundled unrelated changes in this PR

@MarTrepodi MarTrepodi self-assigned this Jun 3, 2026
@github-actions github-actions Bot added dependencies Updates to package dependency libraries code testing labels Jun 3, 2026
@MarTrepodi MarTrepodi added code maintenance General code housekeeping items and removed dependencies Updates to package dependency libraries code testing labels Jun 3, 2026
@MarTrepodi
MarTrepodi enabled auto-merge (squash) June 3, 2026 17:06
MarTrepodi and others added 2 commits June 3, 2026 13:16
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>
@github-actions github-actions Bot added ci Changes related to continuous integration processes dependencies Updates to package dependency libraries code testing labels Jun 3, 2026
@MarTrepodi
MarTrepodi merged commit 562f6d3 into main Jun 3, 2026
14 of 15 checks passed
@MarTrepodi
MarTrepodi deleted the chore/sync-data-items-with-game-data-items-enum branch June 3, 2026 17:19
MarTrepodi added a commit that referenced this pull request Jun 3, 2026
## Summary

- Update `DataItems` docstring, `docs/api/helpers.md`, and the
Sync/Async `examples/get_game_data.py` scripts to use the
server-accepted `SEGMENT1`–`SEGMENT4` 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 #95.
- Add a new "GameDataItems server alignment" section (§9) to
`docs/migration.md` covering the `Segment2` (`68717379584` →
`1125968624222208`) and `Segment4` (`281200098803712` →
`3377424842620928`) 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

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 maintenance General code housekeeping items code dependencies Updates to package dependency libraries testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant