Skip to content

Reduce PyPI artifact size by excluding AsyncTI4 image assets from package build - #41

Merged
adam133 merged 1 commit into
mainfrom
copilot/remove-large-images-from-pypi
Apr 17, 2026
Merged

Reduce PyPI artifact size by excluding AsyncTI4 image assets from package build#41
adam133 merged 1 commit into
mainfrom
copilot/remove-large-images-from-pypi

Conversation

Copilot AI commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

PyPI publish was failing with 400 File too large because the build configuration bundled the full AsyncTI4 resources tree from the submodule, including large image directories. This change narrows package contents to only the JSON-backed data directories required by the rules engine runtime.

  • Packaging scope reduction (Hatch build config)

    • Updated pyproject.toml wheel force-include paths to include only:
      • data/TI4_map_generator_bot/src/main/resources/data
      • data/TI4_map_generator_bot/src/main/resources/planets
      • data/TI4_map_generator_bot/src/main/resources/systems
    • Updated sdist only-include to the same three directories instead of the entire resources tree.
  • Distribution content impact

    • Removes bundled image assets (.png, .jpg, .jpeg, .gif, .webp, .svg) from wheel/sdist.
    • Keeps required structured game data available to loaders without shipping non-runtime media.
  • Representative config change

    [tool.hatch.build.targets.wheel.force-include]
    "data/TI4_map_generator_bot/src/main/resources/data" = "ti4_rules_engine/data/TI4_map_generator_bot/src/main/resources/data"
    "data/TI4_map_generator_bot/src/main/resources/planets" = "ti4_rules_engine/data/TI4_map_generator_bot/src/main/resources/planets"
    "data/TI4_map_generator_bot/src/main/resources/systems" = "ti4_rules_engine/data/TI4_map_generator_bot/src/main/resources/systems"

@adam133
adam133 marked this pull request as ready for review April 17, 2026 18:36
@adam133
adam133 merged commit 5998fe1 into main Apr 17, 2026
1 check failed
@adam133
adam133 deleted the copilot/remove-large-images-from-pypi branch April 17, 2026 18:36
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