Repository navigation
Move to cookie-pyrate - #3
Merged
Merged
Conversation
Minted from cookie-pyrate v1.0.3 (Python 3.14, Docker, no docs site). The package moves to src/sc2bot, Poetry to uv, and every person with commits is an author.
ruff format and the safe ruff check fixes only.
aiogram 2 doesn't run on Python 3.14. The entry point becomes main() (the sc2bot command) with a router, and the handler and the daily post get tests. The daily fetch no longer runs in a worker thread: the database session belongs to the loop's thread, so it failed there.
Mapped columns replace the sqlalchemy-stubs plugin, which doesn't work with current mypy, so the type: ignore workarounds go. MetaData binding and autocommit sessions are gone in 2.x.
The template's ruff and mypy settings are stricter than the old ones. /help no longer shadows a builtin, command targets take keyword-only Telegram fields, and the API clients get request timeouts and typed JSON. The sc2ladder query goes in the request params: in the URL, "#1234" was dropped as a fragment. Users and player profiles get unique constraints. Tests and scripts are fully annotated and close their database connections.
sc2ladder.com is gone, so /register found no profiles. SC2 Pulse's character search returns every profile of the Battle Tag's account (sc2ladder only knew some of them). Profiles on another realm are skipped, since the daily fetch only asks Blizzard for REALM_ID. SC2 Pulse is credited in the README.
Each release pushes ghcr.io/gvieralopez/sc2helperbot, tagged with the version and latest, through the template's publish-docker-image input.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves SC2Helperbot onto cookie-pyrate v1.0.3, on Python 3.14. One commit per step:
src/sc2bot, and Poetry is replaced by uv. Everyone with commits is an author, including @sildel. The README follows the template layout.ruff formatand the saferuff checkfixes only.sc2botcommand now runsmain()with a router. The handlers and the daily post have tests. The daily fetch no longer runs in a worker thread, because the database session can't cross threads.#1234part of the Battle Tag because it went in the URL. It's now sent as a parameter./registerfound no profiles. It now uses SC2 Pulse's character search, which returns every profile of the account. Profiles on another realm thanREALM_IDare skipped. SC2 Pulse is credited in the README.publish-docker-imageoption. The image is published asghcr.io/gvieralopez/sc2helperbot.make qapasses (85 tests, 95.7% coverage), including from a fresh clone. The image builds locally and the bot starts in it.After merge:
make repo(release key, ruleset, Dependabot)🤖 Generated with Claude Code