Commit Graph

239 Commits

Author SHA1 Message Date
Estrella Pan
66dea1af0f chore(types): add mypy to CI and fix ~20 bugs it surfaced
Add mypy>=2.1.0 as a dev dependency with a check_untyped_defs baseline
config and per-module ignore overrides (module.__version__, httpx_socks,
aiohttp, test.* method-assign), and run it in CI right after ruff.

Convert positional Field(value, ...) defaults to Field(default=value, ...)
across models/config.py so pydantic v2 stops treating aliased fields as
required constructor args. Fix real bugs the sweep surfaced: unguarded
None bangumi_id in TorrentManager.refind_poster, RSSAnalyser.torrent_to_data
silently returning None past its declared type, missing __aenter__ guards
on RequestURL/downloader clients, database/engine.py's sync sessionmaker
on an AsyncEngine, and RequestContent.post_json shadowing RequestURL.post_json
(renamed to post_form_json). Remove a dead, type-unsafe str_to_list() helper
in api/bangumi.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
2026-07-02 19:00:37 +02:00
Estrella Pan
c2261ece0a docs(ci): make release changelog lookup version-aware, add 3.3 changelog, fix docker-compose PGID/PUID
Derive the release changelog path from the release version instead of
hardcoding 3.2.md, so the workflow keeps working after 3.3 ships. Add
docs/changelog/3.3.md summarizing the 3.3.0 section of CHANGELOG.md.
Fix docker-compose.yml's PGID/PUID falling back to shell substitution
that never runs in a compose file, using numeric defaults instead, and
drop the obsolete top-level 'version' key. Fix README's Python badge to
3.13 to match backend/pyproject.toml's requires-python.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
2026-07-02 17:39:49 +02:00
Estrella Pan
42418d5b18 ci: restore release build fix, gate dev-branch PRs, mock the live TMDB test
- Apply the docker-actions/cache fix from 4a513df so 3.3 releases build; fix buildx outputs typo
- Run CI on PRs targeting 3.*-dev; add ruff + frontend lint/vitest steps
- .dockerignore excludes tests and __pycache__ from the image
- test_tmdb mocks the HTTP layer (was hitting the live TMDB API in the default suite)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014w1Z6Nxy6XTRgkFXqPr9Zh
2026-07-02 17:05:50 +02:00
Estrella Pan
07522ae284 ci(release): include pyproject.toml / uv.lock / requirements.txt (#994, #1015)
The release artifact only zipped backend/src, omitting pyproject.toml and
uv.lock, so local deployments couldn't install dependencies. #994 also
reported the missing requirements.txt after the uv migration in 3.2.0.

Install uv in the release job and generate a production-only
requirements.txt via `uv export --no-dev`, then bundle all three alongside
src in the app zip.

Closes #994
Closes #1015
2026-04-19 13:01:27 +02:00
EstrellaXD
e0cca519b5 fix(ci): extract version number from PR title
The workflow was using the full PR title (e.g., 'Release 3.2.1') as the
version string, causing Docker tags and release creation to fail.

Now extracts just the version number (X.Y.Z or X.Y.Z-suffix) from the
PR title, handling formats like 'Release 3.2.1', 'v3.2.1', or '3.2.1'.
2026-01-27 10:59:21 +01:00
EstrellaXD
7b5c8d9ac5 chore: upgrade Python version to 3.13
- Update requires-python to >=3.13 in pyproject.toml
- Update ruff and black target versions to py313
- Update Dockerfile to use python:3.13-alpine
- Add explicit Python 3.13 setup in CI workflow
- Regenerate uv.lock for Python 3.13

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:30:25 +01:00
Estrella Pan
82c641aba8 ci: use changelog file as release body for pre-releases
Tag pushes (beta/alpha) don't have a PR body, so fall back to reading
docs/changelog/3.2.md for the release notes.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:55:26 +01:00
Estrella Pan
938cd265aa ci: remove arm/v7 platform from Docker build
The uv builder image (ghcr.io/astral-sh/uv:0.5-python3.12-alpine) only
supports amd64 and arm64, not arm/v7.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:31:42 +01:00
Estrella Pan
b28f1b4431 ci: upgrade actions/upload-artifact and download-artifact to v4
v3 is deprecated and GitHub now rejects it, causing build-webui to fail.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:27:37 +01:00
Estrella Pan
e25d4f08a1 ci: run build-webui and build-docker on open PRs from dev branches
Previously the build pipeline only ran after a PR was merged to main.
Now it also runs as a test build (push: false) when a PR is opened or
updated from a *-dev branch, allowing build verification before merge.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:25:45 +01:00
EstrellaXD
9c5474d8e9 feat: migrate backend to uv package manager
Replace pip + requirements.txt with uv for dependency management.

- Multi-stage Dockerfile using ghcr.io/astral-sh/uv builder image
- CI updated to use astral-sh/setup-uv@v4
- Ruff config moved to [tool.ruff.lint] (fixes deprecation)
- Transitive deps removed, missing direct deps added (requests, PySocks, urllib3)
- Database layer migrated to async (AsyncSession + aiosqlite)
- Tests updated to match async database interface

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:56:23 +01:00
Rewrite0
7913061f45 ci: modify process 2024-05-31 16:37:22 +08:00
Rewrite0
8e05b5ed19 ci: add webui build test 2024-05-31 16:13:26 +08:00
Rewrite0
b0eef9e8d2 fix: ci pnpm version 2024-05-31 16:05:52 +08:00
EstrellaXD
004b1cefeb fix: error in build webui 2024-04-10 15:58:53 +08:00
EstrellaXD
e9c4e72dd3 docs: update readme and bug_report template 2023-12-16 15:22:53 +08:00
EstrellaXD
e3d7f7826b template: change basic bug report template. 2023-10-31 21:36:39 +08:00
DDSDerek
6396c42062 feat: Local deployment files are provided requirements.txt 2023-10-13 23:58:53 +08:00
DDSRem
08e47fdbbc feat: add version number to app file 2023-10-04 19:38:57 +08:00
DDSRem
3acee793e4 feat: provide complete program installation package 2023-10-04 19:23:20 +08:00
EstrellaXD
6b63ed1c2a fix: ci 2023-10-03 23:00:31 +08:00
EstrellaXD
b35fdf1da9 docs: update rss. ci 2023-10-02 16:40:46 +08:00
EstrellaXD
2380e21868 docs: adjust ci, and adjust index icon. 2023-10-02 16:37:17 +08:00
EstrellaXD
cb628cfe8c docs: update index, update ci. 2023-10-02 15:46:45 +08:00
EstrellaXD
9c48ff5051 docs: update ci. update 3.1 docs. 2023-10-02 15:43:37 +08:00
EstrellaXD
4cb2f685f6 fix: version tag problem. 2023-09-24 14:50:58 +08:00
EstrellaXD
8d48d682be fix: version tag problem. 2023-09-24 14:43:36 +08:00
EstrellaXD
a07557f564 fix: version tag problem. 2023-09-24 14:39:17 +08:00
EstrellaXD
f936bd8a2e fix: remove create tag action 2023-09-24 14:24:35 +08:00
EstrellaXD
b7c2eb8435 fix: ci problem. 2023-09-24 14:11:13 +08:00
EstrellaXD
0a6538a541 fix: ci problem. 2023-09-24 14:10:38 +08:00
EstrellaXD
50031d41c0 fix: ci problem. 2023-09-24 14:09:47 +08:00
EstrellaXD
695a131e5e fix: ci problem. 2023-09-24 14:07:45 +08:00
EstrellaXD
d0605fef49 fix: ci problem. 2023-09-24 13:58:45 +08:00
EstrellaXD
bc4ad22dad fix: ci problem. 2023-09-24 13:55:13 +08:00
EstrellaXD
03e23943bf fix: ci problem. 2023-09-24 13:53:11 +08:00
EstrellaXD
6e6a316193 fix: ci problem. 2023-09-24 13:50:29 +08:00
EstrellaXD
42e49534f9 fix: ci problem. 2023-09-24 13:47:42 +08:00
EstrellaXD
d996ddf85a fix: ci problem. 2023-09-24 13:09:09 +08:00
EstrellaXD
0714390259 fix: string problem. 2023-09-24 11:46:59 +08:00
EstrellaXD
4b6ac31409 fix: string problem. 2023-09-24 11:44:13 +08:00
EstrellaXD
63ab5a941e fix: tag message. 2023-09-24 11:37:22 +08:00
EstrellaXD
de091fa53b fix: pr ci. 2023-09-24 11:35:50 +08:00
EstrellaXD
155aa4f369 Merge branch 'main' into 3.1-dev
# Conflicts:
#	.github/workflows/docker.yml
#	.github/workflows/release.yml
#	.gitignore
#	Dockerfile
#	backend/.pre-commit-config.yaml
#	backend/pyproject.toml
#	backend/src/docker/etc/cont-init.d/010-old-compatible
#	backend/src/docker/etc/cont-init.d/020-fixuser
#	backend/src/docker/etc/services.d/auto_bangumi/finish
#	backend/src/docker/etc/services.d/auto_bangumi/notification-fd
#	backend/src/docker/etc/services.d/auto_bangumi/run
#	backend/src/icon
#	backend/src/main.py
#	backend/src/module/api/__init__.py
#	backend/src/module/api/auth.py
#	backend/src/module/api/bangumi.py
#	backend/src/module/api/config.py
#	backend/src/module/api/download.py
#	backend/src/module/api/log.py
#	backend/src/module/api/program.py
#	backend/src/module/api/web.py
#	backend/src/module/checker/checker.py
#	backend/src/module/conf/__init__.py
#	backend/src/module/core/program.py
#	backend/src/module/core/rss_feed.py
#	backend/src/module/database/__init__.py
#	backend/src/module/database/bangumi.py
#	backend/src/module/database/connector.py
#	backend/src/module/database/torrent.py
#	backend/src/module/database/user.py
#	backend/src/module/downloader/download_client.py
#	backend/src/module/manager/collector.py
#	backend/src/module/manager/torrent.py
#	backend/src/module/models/__init__.py
#	backend/src/module/models/bangumi.py
#	backend/src/module/models/torrent.py
#	backend/src/module/models/user.py
#	backend/src/module/network/__init__.py
#	backend/src/module/network/request_contents.py
#	backend/src/module/network/site/__init__.py
#	backend/src/module/network/site/mikan.py
#	backend/src/module/notification/notification.py
#	backend/src/module/parser/analyser/raw_parser.py
#	backend/src/module/parser/analyser/tmdb_parser.py
#	backend/src/module/rss/analyser.py
#	backend/src/module/rss/filter.py
#	backend/src/module/rss/searcher.py
#	backend/src/module/searcher/plugin/__init__.py
#	backend/src/module/searcher/plugin/mikan.py
#	backend/src/module/searcher/searcher.py
#	backend/src/module/security/__init__.py
#	backend/src/module/security/api.py
#	backend/src/module/update/__init__.py
#	backend/src/module/update/data_migration.py
#	backend/src/test/test_raw_parser.py
#	requirements.txt
2023-09-19 14:20:28 +08:00
EstrellaXD
89cc0b89cf fix: ci 2023-08-29 21:43:26 +08:00
EstrellaXD
7ccee98e2e fix: bugs, add disable rss api. 2023-08-29 19:28:44 +08:00
EstrellaXD
4a509deb16 fix: version issue. 2023-08-29 14:47:13 +08:00
EstrellaXD
0c264b2696 ci: fix tg notify url missing problem. 2023-08-29 14:24:05 +08:00
EstrellaXD
fbfd756c19 ci: fix ci bug. 2023-08-29 14:11:44 +08:00
EstrellaXD
38cc1c09c4 ci: fix shell problem. 2023-08-29 14:06:13 +08:00