Files
doge_cogs/mise.toml
T
ziadarafatandClaude Opus 5.5 aaa287d753 Add the watch cog: preload media through media-preload
`[p]watch <title>` asks the home lab's media-preload service to cache a
movie, a season, some episodes or the next N unwatched episodes, and
keeps a progress message (with a Cancel button) updated until done.
`link`/`unlink` store a Jellyfin user name for "next"; `status` and
`cancel` work on request ids.

The API client in clients/media-preload-client is generated from the
service's OpenAPI spec with openapi-python-client (`mise run
generate-client`); the cog installs it from this repo via info.json.

Also: ruff target py311 (Red 3.5's Python), a dev group with the client,
pytest, ruff and ty, and mise tasks. Lint and type checks cover the new
cog; doge_alignment is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GUebqhE8dK19vyn4Ct5g1L
2026-11-05 09:37:45 -07:00

33 lines
1.0 KiB
TOML

# Dev tools and tasks. Python and its dependencies are managed by uv.
# Lint and type checks cover the watch cog; doge_alignment predates them.
[tools]
uv = "0.13"
[tasks.sync]
run = "uv sync"
[tasks.fmt]
run = ["uv run ruff format watch tests", "uv run ruff check --fix watch tests"]
[tasks.lint]
run = ["uv run ruff format --check watch tests", "uv run ruff check watch tests"]
[tasks.typecheck]
run = "uv run ty check"
[tasks.test]
run = "uv run pytest"
[tasks.check]
depends = ["lint", "typecheck", "test"]
[tasks.generate-client]
description = "Regenerate clients/media-preload-client from the live media-preload spec"
run = """
curl -fsS http://10.0.0.38:8125/openapi.json | jq . > clients/media-preload.openapi.json
uvx --from openapi-python-client==0.29.1 --with ruff openapi-python-client generate \
--path clients/media-preload.openapi.json --config clients/openapi-python-client.yaml \
--meta uv --output-path clients/media-preload-client --overwrite
rm -rf clients/media-preload-client/.ruff_cache
"""