Skip to content

Bundle AsyncTI4 resources in PyPI artifacts and support installed-package resource paths - #40

Merged
adam133 merged 2 commits into
mainfrom
copilot/bundle-submodule-directory
Apr 17, 2026
Merged

Bundle AsyncTI4 resources in PyPI artifacts and support installed-package resource paths#40
adam133 merged 2 commits into
mainfrom
copilot/bundle-submodule-directory

Conversation

Copilot AI commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

analyze() failed in PyPI installs because AsyncTI4 resources were not shipped in the distribution and path resolution only targeted repo-style layouts. This change makes packaged installs self-contained and resolves resources from both source and installed contexts.

  • Packaging: ship full AsyncTI4 resources

    • Updated pyproject.toml to include data/TI4_map_generator_bot/src/main/resources in both build targets:
      • wheel: force-include into ti4_rules_engine/data/.../resources
      • sdist: include full resources tree (not only resources/data)
  • Runtime path resolution: support packaged layout

    • Updated _data_paths.py to search multiple candidate locations:
      • data/TI4_map_generator_bot/src/main/resources (repo checkout)
      • ti4_rules_engine/data/TI4_map_generator_bot/src/main/resources (installed package)
    • Error messaging now reflects both expected layouts.
  • Regression coverage

    • Added focused tests for _locate_asyncti4_resources_dir() covering both repo-style and packaged-style directory structures.
[tool.hatch.build.targets.wheel.force-include]
"data/TI4_map_generator_bot/src/main/resources" = "ti4_rules_engine/data/TI4_map_generator_bot/src/main/resources"

@adam133
adam133 marked this pull request as ready for review April 17, 2026 17:26
@adam133
adam133 merged commit 35b36a2 into main Apr 17, 2026
1 of 2 checks passed
@adam133
adam133 deleted the copilot/bundle-submodule-directory branch April 17, 2026 18:08
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.

2 participants