Skip to content

Slim PyTAG jar + release automation#360

Open
martinballa wants to merge 3 commits into
masterfrom
pytag-slim-jar
Open

Slim PyTAG jar + release automation#360
martinballa wants to merge 3 commits into
masterfrom
pytag-slim-jar

Conversation

@martinballa

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a second maven-assembly-plugin execution producing target/TAG-pytag.jar (~13MB vs ~404MB for the full TAG.jar), built from src/assembly/pytag-jar.xml. It keeps the core engine, all games, built-in players, and the Swing GUI/replay path, but excludes the Spark/Hadoop ML-learner, tablesaw analytics, and langchain4j/google-cloud dependency trees that PyTAG never touches. Verified end-to-end against the real PyTAG package via JPype (vector + JSON obs examples, multi-agent).
  • Fixes a crash (NoSuchElementException) in SSPPlayerView, SGPlayerView, and GoFishPlayerView when constructing the GUI with no human player (e.g. all-AI games, or PyTAG's RL agents) - they called human.stream().toList().getFirst() instead of falling back to -1 like LoveLetterPlayerView already does. Found while sweeping games to verify the slim jar renders correctly.
  • Adds .github/workflows/release-pytag-jar.yml: on publishing a GitHub release, builds the project and uploads target/TAG-pytag.jar as an asset named TAG.jar, matching the URL shape (.../releases/latest/download/TAG.jar) PyTAG's jar_setup.py expects.

Test plan

  • mvn package builds both TAG.jar and TAG-pytag.jar cleanly
  • TAG-pytag.jar verified against a real pip install -e . PyTAG checkout (JPype), running pt-action-masking.py (vector obs, action masking) and ma-random.py (JSON obs, multi-agent) to completion
  • Swept ~11 games (incl. asset-heavy ones: Pandemic, ColtExpress, Dominion, Uno, Catan) launching the GUI manager on the slim jar with no exceptions
  • Release workflow itself is untested against a real GitHub release (needs a maintainer to publish a release to trigger it)

Adds a second maven-assembly-plugin execution producing target/TAG-pytag.jar
(~13MB vs ~404MB for the full TAG.jar), built from a custom descriptor that
keeps the core engine, all games, built-in players, and Swing GUI/replay, but
excludes the Spark/Hadoop ML-learner, tablesaw analytics, and langchain4j/
google-cloud dependency trees that PyTAG (github.com/martinballa/PyTAG) never
touches. Verified end-to-end against the actual PyTAG package via JPype.
SSPPlayerView, SGPlayerView, and GoFishPlayerView called
human.stream().toList().getFirst() to derive the local viewing
perspective, which throws NoSuchElementException whenever a game runs
with no human player (e.g. all-AI games, or PyTAG's RL agents). Match
LoveLetterPlayerView's existing pattern of falling back to -1, the
sentinel DeckView already uses to mean "no human perspective".
On publishing a GitHub release, builds the project and uploads
target/TAG-pytag.jar as an asset named TAG.jar - the exact filename
and URL shape (.../releases/latest/download/TAG.jar) that PyTAG's
jar_setup.py expects (github.com/martinballa/PyTAG), so PyTAG users
can fetch it without any manual build/copy step.
@martinballa
martinballa requested a review from hopshackle July 21, 2026 20:12
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.

1 participant