Skip to content

Bot API for Python: Replace drawsvg with our graphics#162

Merged
flemming-n-larsen merged 10 commits intomainfrom
python-graphics
Sep 16, 2025
Merged

Bot API for Python: Replace drawsvg with our graphics#162
flemming-n-larsen merged 10 commits intomainfrom
python-graphics

Conversation

@flemming-n-larsen
Copy link
Contributor

  • Replaces the drawsvg library with our own lightweight and fast SVG renderer which is consistent between all bot APIs for all supported platforms/languages (Java, C#/.Net, Python, Wasm)
  • Created tests for the new graphics classes.
  • Added PaintingBot.py that demonstrates the paintings.
  • Improved README with info for running the tests.

- Introduced `pytest` and test setup in `requirements-test.txt` and `build.gradle.kts`.
- Updated imports to rename `SvgGraphicsABC` and route `Color` through `graphics` module.
- Documented `test` Gradle task usage in README.
# Conflicts:
#	bot-api/python/build.gradle.kts
… abstraction and update related dependencies
@flemming-n-larsen
Copy link
Contributor Author

flemming-n-larsen commented Aug 29, 2025

@yangli2
I have sent you an invite to be a member of Robocode Tank Royale on GitHub, so I can add you as reviewer. 🙂

I should like you to review this PR.

And you can try out the PaintingBot.py sample bot to see the painting. It pust a filled red circle on its target.

Note:
You need to "toggle graphical debugging" in the bot console for Painting Bot first in order to see the paintings:
https://robocode-dev.github.io/tank-royale/articles/gui.html#viewing-the-bot-properties

@flemming-n-larsen
Copy link
Contributor Author

I merge this to the branch now and start working on:

  • Sample bots (to find potential issues to fix)
  • Building API documentation for: https://robocode-dev.github.io/tank-royale/api/apis.html
  • Prepare releasing the Python Bot API as a package using TestPyPI at first, and the real PyPI later. This include the release template.
  • Creating a real official release of the Python Bot API with all other language APIs when we do the next release, and the stuff above is done.

@flemming-n-larsen flemming-n-larsen merged commit f655602 into main Sep 16, 2025
1 check passed
@flemming-n-larsen flemming-n-larsen deleted the python-graphics branch September 16, 2025 21:08
@yangli2
Copy link
Collaborator

yangli2 commented Sep 17, 2025

Oops, sorry I missed your earlier msg and just saw this - if you don't mind sending the invite again I can accept (the previous one expired). I'll take a look at the changes and see if there is anything that needs doing.

@flemming-n-larsen
Copy link
Contributor Author

@yangli2 I sent another request and granted you "read" access. I can give you more privileges, if you need it in the future.

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