acggr-py 0.2.0b0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. acggr_py-0.2.0b0/.gitattributes +9 -0
  2. acggr_py-0.2.0b0/.github/ISSUE_TEMPLATE/bug-report.yml +65 -0
  3. acggr_py-0.2.0b0/.github/ISSUE_TEMPLATE/feature-request.yml +26 -0
  4. acggr_py-0.2.0b0/.github/PULL_REQUEST_TEMPLATE.md +18 -0
  5. acggr_py-0.2.0b0/.github/scripts/smoke_wheel.py +51 -0
  6. acggr_py-0.2.0b0/.github/workflows/publish-update-feed.yml +151 -0
  7. acggr_py-0.2.0b0/.github/workflows/release.yml +218 -0
  8. acggr_py-0.2.0b0/.gitignore +135 -0
  9. acggr_py-0.2.0b0/LICENSE +21 -0
  10. acggr_py-0.2.0b0/PKG-INFO +54 -0
  11. acggr_py-0.2.0b0/README.md +11 -0
  12. acggr_py-0.2.0b0/acggr.py +26 -0
  13. acggr_py-0.2.0b0/app/GUI/__init__.py +2648 -0
  14. acggr_py-0.2.0b0/app/GUI/cbg/__init__.py +683 -0
  15. acggr_py-0.2.0b0/app/GUI/cbg/preview.py +122 -0
  16. acggr_py-0.2.0b0/app/GUI/danbooru/__init__.py +11 -0
  17. acggr_py-0.2.0b0/app/GUI/danbooru/card.py +660 -0
  18. acggr_py-0.2.0b0/app/GUI/danbooru/challenge.py +132 -0
  19. acggr_py-0.2.0b0/app/GUI/danbooru/core.py +848 -0
  20. acggr_py-0.2.0b0/app/GUI/danbooru/detail_preview.py +859 -0
  21. acggr_py-0.2.0b0/app/GUI/danbooru/interface.py +1362 -0
  22. acggr_py-0.2.0b0/app/GUI/danbooru/page_nav/__init__.py +11 -0
  23. acggr_py-0.2.0b0/app/GUI/danbooru/page_nav/controller.py +135 -0
  24. acggr_py-0.2.0b0/app/GUI/danbooru/page_nav/fab.py +316 -0
  25. acggr_py-0.2.0b0/app/GUI/danbooru/page_nav/model.py +56 -0
  26. acggr_py-0.2.0b0/app/GUI/danbooru/page_nav/policy.py +135 -0
  27. acggr_py-0.2.0b0/app/GUI/danbooru/pin_flyout.py +48 -0
  28. acggr_py-0.2.0b0/app/GUI/danbooru/preview_loader.py +361 -0
  29. acggr_py-0.2.0b0/app/GUI/danbooru/style.py +306 -0
  30. acggr_py-0.2.0b0/app/GUI/danbooru/tab.py +707 -0
  31. acggr_py-0.2.0b0/app/GUI/danbooru/tag/__init__.py +18 -0
  32. acggr_py-0.2.0b0/app/GUI/danbooru/tag/actions.py +684 -0
  33. acggr_py-0.2.0b0/app/GUI/danbooru/tag/comfy/__init__.py +10 -0
  34. acggr_py-0.2.0b0/app/GUI/danbooru/tag/comfy/fav_chips.py +425 -0
  35. acggr_py-0.2.0b0/app/GUI/danbooru/tag/comfy/jobs.py +1786 -0
  36. acggr_py-0.2.0b0/app/GUI/danbooru/tag/comfy/prompt.py +198 -0
  37. acggr_py-0.2.0b0/app/GUI/danbooru/tag/comfy/tag_groups_state.py +440 -0
  38. acggr_py-0.2.0b0/app/GUI/danbooru/tag/export.py +1389 -0
  39. acggr_py-0.2.0b0/app/GUI/danbooru/tag/favorite_groups.py +306 -0
  40. acggr_py-0.2.0b0/app/GUI/danbooru/tag/favorite_translate.py +629 -0
  41. acggr_py-0.2.0b0/app/GUI/danbooru/tag/favorites.py +823 -0
  42. acggr_py-0.2.0b0/app/GUI/danbooru/video_proxy.py +64 -0
  43. acggr_py-0.2.0b0/app/GUI/danbooru/viewer.py +1148 -0
  44. acggr_py-0.2.0b0/app/GUI/jsoneri/__init__.py +3 -0
  45. acggr_py-0.2.0b0/app/GUI/jsoneri/browser.py +269 -0
  46. acggr_py-0.2.0b0/app/GUI/jsoneri/client.py +157 -0
  47. acggr_py-0.2.0b0/app/GUI/jsoneri/dashboard.py +435 -0
  48. acggr_py-0.2.0b0/app/GUI/jsoneri/interface.py +846 -0
  49. acggr_py-0.2.0b0/app/GUI/jsoneri/models.py +263 -0
  50. acggr_py-0.2.0b0/app/GUI/jsoneri/preview_cache.py +173 -0
  51. acggr_py-0.2.0b0/app/GUI/jsoneri/style.py +31 -0
  52. acggr_py-0.2.0b0/app/GUI/log.py +13 -0
  53. acggr_py-0.2.0b0/app/GUI/pawchive/__init__.py +2159 -0
  54. acggr_py-0.2.0b0/app/GUI/pawchive/avatar.py +208 -0
  55. acggr_py-0.2.0b0/app/GUI/pawchive/card.py +1067 -0
  56. acggr_py-0.2.0b0/app/GUI/pawchive/detail_preview.py +944 -0
  57. acggr_py-0.2.0b0/app/GUI/pawchive/env_probe.py +146 -0
  58. acggr_py-0.2.0b0/app/GUI/pawchive/grid.py +1338 -0
  59. acggr_py-0.2.0b0/app/GUI/pawchive/masonry.py +134 -0
  60. acggr_py-0.2.0b0/app/GUI/pawchive/post_adapter.py +215 -0
  61. acggr_py-0.2.0b0/app/GUI/pawchive/preview_loader.py +461 -0
  62. acggr_py-0.2.0b0/app/GUI/pawchive/selection.py +326 -0
  63. acggr_py-0.2.0b0/app/GUI/pawchive/style.py +288 -0
  64. acggr_py-0.2.0b0/app/GUI/pawchive/tabs.py +1082 -0
  65. acggr_py-0.2.0b0/app/GUI/pawchive/video_proxy.py +142 -0
  66. acggr_py-0.2.0b0/app/GUI/pawchive/viewer.py +1578 -0
  67. acggr_py-0.2.0b0/app/GUI/settings_aria2.py +66 -0
  68. acggr_py-0.2.0b0/app/GUI/settings_jsoneri.py +57 -0
  69. acggr_py-0.2.0b0/app/GUI/settings_redis.py +172 -0
  70. acggr_py-0.2.0b0/app/GUI/settings_update.py +385 -0
  71. acggr_py-0.2.0b0/app/GUI/viewer/__init__.py +150 -0
  72. acggr_py-0.2.0b0/app/GUI/viewer/chrome.py +508 -0
  73. acggr_py-0.2.0b0/app/GUI/viewer/image_pipeline.py +368 -0
  74. acggr_py-0.2.0b0/app/GUI/viewer/layout.py +295 -0
  75. acggr_py-0.2.0b0/app/GUI/viewer/loading.py +61 -0
  76. acggr_py-0.2.0b0/app/GUI/viewer/settings.py +368 -0
  77. acggr_py-0.2.0b0/app/GUI/viewer/shortcuts.py +89 -0
  78. acggr_py-0.2.0b0/app/GUI/viewer/source_engine.py +155 -0
  79. acggr_py-0.2.0b0/app/GUI/viewer/video_proxy.py +892 -0
  80. acggr_py-0.2.0b0/app/GUI/web/__init__.py +554 -0
  81. acggr_py-0.2.0b0/app/GUI/web/service_tab.py +146 -0
  82. acggr_py-0.2.0b0/app/__init__.py +409 -0
  83. acggr_py-0.2.0b0/app/restart.py +80 -0
  84. acggr_py-0.2.0b0/core/__init__.py +123 -0
  85. acggr_py-0.2.0b0/core/chore.py +23 -0
  86. acggr_py-0.2.0b0/core/config/__init__.py +346 -0
  87. acggr_py-0.2.0b0/core/config/history.py +90 -0
  88. acggr_py-0.2.0b0/core/config/import_cgs.py +873 -0
  89. acggr_py-0.2.0b0/core/config/legacy_conf.py +68 -0
  90. acggr_py-0.2.0b0/core/config/qc.py +679 -0
  91. acggr_py-0.2.0b0/core/core.py +50 -0
  92. acggr_py-0.2.0b0/core/network/doh.py +471 -0
  93. acggr_py-0.2.0b0/core/network/doh_policy.py +84 -0
  94. acggr_py-0.2.0b0/core/network/extra.py +418 -0
  95. acggr_py-0.2.0b0/core/network/socket_errors.py +17 -0
  96. acggr_py-0.2.0b0/core/processed_class.py +77 -0
  97. acggr_py-0.2.0b0/core/script/__init__.py +104 -0
  98. acggr_py-0.2.0b0/core/script/ai/__init__.py +20 -0
  99. acggr_py-0.2.0b0/core/script/ai/capabilities/__init__.py +1 -0
  100. acggr_py-0.2.0b0/core/script/ai/capabilities/anima_prompt/__init__.py +15 -0
  101. acggr_py-0.2.0b0/core/script/ai/capabilities/anima_prompt/pipeline.py +103 -0
  102. acggr_py-0.2.0b0/core/script/ai/capabilities/anima_prompt/prompts.py +56 -0
  103. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/__init__.py +28 -0
  104. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/pipeline.py +201 -0
  105. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/prompts.py +134 -0
  106. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/serp/__init__.py +15 -0
  107. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/serp/gatherer.py +691 -0
  108. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/serp/models.py +383 -0
  109. acggr_py-0.2.0b0/core/script/ai/capabilities/tag_translate/serp/session.py +560 -0
  110. acggr_py-0.2.0b0/core/script/ai/kernel/__init__.py +16 -0
  111. acggr_py-0.2.0b0/core/script/ai/kernel/openai_client.py +108 -0
  112. acggr_py-0.2.0b0/core/script/ai/kernel/provider.py +141 -0
  113. acggr_py-0.2.0b0/core/script/aria2/__init__.py +51 -0
  114. acggr_py-0.2.0b0/core/script/aria2/bootstrap.py +362 -0
  115. acggr_py-0.2.0b0/core/script/aria2/conf.py +136 -0
  116. acggr_py-0.2.0b0/core/script/aria2/engine.py +496 -0
  117. acggr_py-0.2.0b0/core/script/aria2/history_watch.py +253 -0
  118. acggr_py-0.2.0b0/core/script/aria2/lock.py +368 -0
  119. acggr_py-0.2.0b0/core/script/aria2/rpc.py +161 -0
  120. acggr_py-0.2.0b0/core/script/aria2/settings.py +99 -0
  121. acggr_py-0.2.0b0/core/script/aria2/tagging.py +251 -0
  122. acggr_py-0.2.0b0/core/script/cbg.py +321 -0
  123. acggr_py-0.2.0b0/core/script/entry_descriptor.py +74 -0
  124. acggr_py-0.2.0b0/core/script/entry_migrate.py +93 -0
  125. acggr_py-0.2.0b0/core/script/image/__init__.py +2 -0
  126. acggr_py-0.2.0b0/core/script/image/anima/anima_spec.py +153 -0
  127. acggr_py-0.2.0b0/core/script/image/anima/anima_turbo_api_workflow.json +129 -0
  128. acggr_py-0.2.0b0/core/script/image/anima/comfy_client.py +596 -0
  129. acggr_py-0.2.0b0/core/script/image/anima/danbooru_anima.py +519 -0
  130. acggr_py-0.2.0b0/core/script/image/anima/prompt_doc.py +172 -0
  131. acggr_py-0.2.0b0/core/script/image/anima/styles/anima_palette.json +24 -0
  132. acggr_py-0.2.0b0/core/script/image/danbooru/__init__.py +5 -0
  133. acggr_py-0.2.0b0/core/script/image/danbooru/client.py +299 -0
  134. acggr_py-0.2.0b0/core/script/image/danbooru/constants.py +75 -0
  135. acggr_py-0.2.0b0/core/script/image/danbooru/debug.py +44 -0
  136. acggr_py-0.2.0b0/core/script/image/danbooru/download.py +134 -0
  137. acggr_py-0.2.0b0/core/script/image/danbooru/http.py +150 -0
  138. acggr_py-0.2.0b0/core/script/image/danbooru/models.py +353 -0
  139. acggr_py-0.2.0b0/core/script/image/danbooru/session.py +234 -0
  140. acggr_py-0.2.0b0/core/script/image/danbooru/tag_prompt.py +117 -0
  141. acggr_py-0.2.0b0/core/script/jsoneri/__init__.py +33 -0
  142. acggr_py-0.2.0b0/core/script/jsoneri/imgpalace_job.py +351 -0
  143. acggr_py-0.2.0b0/core/sql/__init__.py +352 -0
  144. acggr_py-0.2.0b0/core/sql/comfy_job_snapshots.py +622 -0
  145. acggr_py-0.2.0b0/core/sql/download_history.py +252 -0
  146. acggr_py-0.2.0b0/core/update.py +416 -0
  147. acggr_py-0.2.0b0/core/updater.py +305 -0
  148. acggr_py-0.2.0b0/core/variables.py +39 -0
  149. acggr_py-0.2.0b0/core/website/contracts.py +30 -0
  150. acggr_py-0.2.0b0/core/website/core/__init__.py +813 -0
  151. acggr_py-0.2.0b0/core/website/pawchive/__init__.py +37 -0
  152. acggr_py-0.2.0b0/core/website/pawchive/api.py +376 -0
  153. acggr_py-0.2.0b0/core/website/pawchive/db.py +375 -0
  154. acggr_py-0.2.0b0/core/website/pawchive/service.py +932 -0
  155. acggr_py-0.2.0b0/core/website/preprocess_script.py +416 -0
  156. acggr_py-0.2.0b0/core/website/runtime_context.py +103 -0
  157. acggr_py-0.2.0b0/deploy/__init__.py +52 -0
  158. acggr_py-0.2.0b0/deploy/launcher/mac/__init__.py +60 -0
  159. acggr_py-0.2.0b0/deploy/launcher/mac/acggr.bash +6 -0
  160. acggr_py-0.2.0b0/deploy/launcher/mac/init.bash +57 -0
  161. acggr_py-0.2.0b0/deploy/scripts/compose_update_feed.py +133 -0
  162. acggr_py-0.2.0b0/deploy/self_update.py +278 -0
  163. acggr_py-0.2.0b0/docs/_github/preset_preview.md +1 -0
  164. acggr_py-0.2.0b0/docs/_github/preset_stable.md +1 -0
  165. acggr_py-0.2.0b0/docs/_github/release_notes.md +14 -0
  166. acggr_py-0.2.0b0/docs/changelog.md +25 -0
  167. acggr_py-0.2.0b0/docs/contribute.md +141 -0
  168. acggr_py-0.2.0b0/docs/contribute_en.md +140 -0
  169. acggr_py-0.2.0b0/logo.png +0 -0
  170. acggr_py-0.2.0b0/pyproject.toml +81 -0
  171. acggr_py-0.2.0b0/res/__init__.py +115 -0
  172. acggr_py-0.2.0b0/res/cbg_sample.js +125 -0
  173. acggr_py-0.2.0b0/res/i18n/__init__.py +164 -0
  174. acggr_py-0.2.0b0/res/i18n/build.py +432 -0
  175. acggr_py-0.2.0b0/res/i18n/en_US.yml +547 -0
  176. acggr_py-0.2.0b0/res/i18n/zh_CN.yml +547 -0
  177. acggr_py-0.2.0b0/res/jsoneri/previews/.gitkeep +0 -0
  178. acggr_py-0.2.0b0/res/lang_data.py +80 -0
  179. acggr_py-0.2.0b0/res/material_ct.py +1036 -0
  180. acggr_py-0.2.0b0/ui/__init__.py +14 -0
  181. acggr_py-0.2.0b0/ui/async_task.py +775 -0
  182. acggr_py-0.2.0b0/ui/browser_window.py +420 -0
  183. acggr_py-0.2.0b0/ui/core/anim.py +501 -0
  184. acggr_py-0.2.0b0/ui/core/browser/__init__.py +13 -0
  185. acggr_py-0.2.0b0/ui/core/browser/aria2_bridge.py +1262 -0
  186. acggr_py-0.2.0b0/ui/core/browser/challenge.py +162 -0
  187. acggr_py-0.2.0b0/ui/core/browser/devtools.py +66 -0
  188. acggr_py-0.2.0b0/ui/core/browser/download.py +212 -0
  189. acggr_py-0.2.0b0/ui/core/browser/environment.py +12 -0
  190. acggr_py-0.2.0b0/ui/core/browser/js/aria2_bridge.js +249 -0
  191. acggr_py-0.2.0b0/ui/core/browser/js/ariang_history.js +378 -0
  192. acggr_py-0.2.0b0/ui/core/browser/js/ariang_language.js +48 -0
  193. acggr_py-0.2.0b0/ui/core/browser/js/ariang_open_dir.js +109 -0
  194. acggr_py-0.2.0b0/ui/core/browser/js/ariang_theme.js +58 -0
  195. acggr_py-0.2.0b0/ui/core/browser/js/page_scrollbar.js +13 -0
  196. acggr_py-0.2.0b0/ui/core/browser/js/ready_probe.js +18 -0
  197. acggr_py-0.2.0b0/ui/core/browser/js/structured_wrapper.js +32 -0
  198. acggr_py-0.2.0b0/ui/core/browser/page_runtime.py +492 -0
  199. acggr_py-0.2.0b0/ui/core/browser/profile.py +139 -0
  200. acggr_py-0.2.0b0/ui/core/browser/runtime.py +658 -0
  201. acggr_py-0.2.0b0/ui/core/browser/types.py +60 -0
  202. acggr_py-0.2.0b0/ui/core/browser/ui_browser.py +165 -0
  203. acggr_py-0.2.0b0/ui/core/browser/window_mode.py +296 -0
  204. acggr_py-0.2.0b0/ui/core/doh_runtime.py +63 -0
  205. acggr_py-0.2.0b0/ui/core/exception_feedback.py +224 -0
  206. acggr_py-0.2.0b0/ui/core/font.py +46 -0
  207. acggr_py-0.2.0b0/ui/core/lang.py +49 -0
  208. acggr_py-0.2.0b0/ui/core/theme/__init__.py +310 -0
  209. acggr_py-0.2.0b0/ui/core/theme/cbg.qss +103 -0
  210. acggr_py-0.2.0b0/ui/core/theme/danbooru.qss +399 -0
  211. acggr_py-0.2.0b0/ui/core/theme/jsoneri.qss +131 -0
  212. acggr_py-0.2.0b0/ui/core/theme/mid.py +132 -0
  213. acggr_py-0.2.0b0/ui/core/theme/pawchive.qss +325 -0
  214. acggr_py-0.2.0b0/ui/core/theme/qss_template.py +65 -0
  215. acggr_py-0.2.0b0/ui/core/theme/viewer.qss +121 -0
  216. acggr_py-0.2.0b0/ui/core/theme/web_tabs.qss +26 -0
  217. acggr_py-0.2.0b0/ui/core/timer.py +18 -0
  218. acggr_py-0.2.0b0/ui/qfluent/__init__.py +178 -0
  219. acggr_py-0.2.0b0/ui/qfluent/components/__init__.py +23 -0
  220. acggr_py-0.2.0b0/ui/qfluent/components/accent_tabs.py +148 -0
  221. acggr_py-0.2.0b0/ui/qfluent/components/badge.py +227 -0
  222. acggr_py-0.2.0b0/ui/qfluent/components/busy_ring.py +107 -0
  223. acggr_py-0.2.0b0/ui/qfluent/components/cust.py +118 -0
  224. acggr_py-0.2.0b0/ui/qfluent/components/elided_card.py +85 -0
  225. acggr_py-0.2.0b0/ui/qfluent/components/flyout_kit.py +123 -0
  226. acggr_py-0.2.0b0/ui/qfluent/components/icons.py +162 -0
  227. acggr_py-0.2.0b0/ui/qfluent/components/range_calendar.py +653 -0
  228. acggr_py-0.2.0b0/ui/qfluent/components/setting_cards.py +48 -0
  229. acggr_py-0.2.0b0/ui/qfluent/components/text_componet.py +149 -0
  230. acggr_py-0.2.0b0/ui/qfluent/components/toast.py +234 -0
@@ -0,0 +1,9 @@
1
+ # Trellis: append-only developer journals should merge cleanly across
2
+ # parallel sessions/worktrees — each session only appends a new block, so
3
+ # there is nothing to actually conflict on.
4
+ #
5
+ # Do NOT add a rule for workspace/*/index.md here — it is fully regenerated
6
+ # every session, so a real conflict there is expected and safe to resolve by
7
+ # picking either side (task state lives in task.json, not index.md). See
8
+ # .trellis/spec/cli/backend/directory-structure.md for details.
9
+ .trellis/workspace/*/journal-*.md merge=union
@@ -0,0 +1,65 @@
1
+ name: Bug Report 🐛
2
+ description: 创建 Bug 报告以帮助我们改进 / Create a report to help us improve
3
+ title: 🐛[Bug] (标题这里简述一下,多问题集合的话取最重点的那个)
4
+ assignees:
5
+ - jasoneri
6
+ labels: bug
7
+ body:
8
+ - type: textarea
9
+ attributes:
10
+ label: 🐛 描述(Description)
11
+ description: >-
12
+ 详细地描述 bug,让大家都能理解/Describe the bug in detail so that everyone can
13
+ understand it
14
+ validations:
15
+ required: true
16
+ - type: textarea
17
+ attributes:
18
+ label: 📷 复现步骤(Steps to Reproduce)
19
+ description: >-
20
+ 清晰描述复现步骤,让别人也能看到问题/Clearly describe the reproduction steps so that
21
+ others can see the problem
22
+ value: |-
23
+ 1.
24
+ 2.
25
+ 3.
26
+ validations:
27
+ required: true
28
+ - type: textarea
29
+ attributes:
30
+ label: ' 📄 [异常/日志]信息([Exception/Log] Information)'
31
+ description: 报错 traceback 或日志可以贴在这里,或上传 log 文件/Paste the traceback or log file here, or upload it
32
+ - type: markdown
33
+ attributes:
34
+ value: '## 🚑 **基本信息(Basic Information)**'
35
+ - type: input
36
+ attributes:
37
+ label: 程序版本(Program version)
38
+ description: >-
39
+ 填写当前程序的版本号,见主窗口标题栏 `ACGGR-py v...`;版本号同时定义于 core/variables.py
40
+ / Enter the current version shown in the main window title bar `ACGGR-py v...`; also defined in core/variables.py
41
+ validations:
42
+ required: true
43
+ - type: dropdown
44
+ attributes:
45
+ label: 系统(OS)
46
+ description: 在哪些系统中出现此问题/In which systems does this problem occur
47
+ multiple: true
48
+ options:
49
+ - Windows10
50
+ - Windows11
51
+ - macOS
52
+ - 其他/else
53
+ validations:
54
+ required: true
55
+ - type: textarea
56
+ attributes:
57
+ label: 📄 配置文件(Configuration file)
58
+ description: >-
59
+ 贴 `%LOCALAPPDATA%\Acggr\conf.yml` 相关片段或配置窗口截图,私人信息请打码
60
+ / Paste relevant parts of `%LOCALAPPDATA%\Acggr\conf.yml` or configure-dialog
61
+ screenshots, remember blur personal information
62
+ - type: textarea
63
+ attributes:
64
+ label: ' 🖼 其他截图(Screenshots)'
65
+ description: 其他截图可以贴在这里/Screenshots of other situations can be posted here
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: "Feature request 👑"
3
+ description: 对程序的需求或建议 / Suggest an idea for program
4
+ title: "👑[Feature Request] (标题这里简述一下,多需求集合的话取最重点的那个)"
5
+ labels: enhancement
6
+ assignees:
7
+ - jasoneri
8
+ body:
9
+ - type: textarea
10
+ attributes:
11
+ label: 🥰 需求描述(Description)
12
+ placeholder: 详细地描述需求,让大家都能理解/Describe the requirements in detail so that everyone can understand them
13
+ validations:
14
+ required: true
15
+ - type: textarea
16
+ attributes:
17
+ label: 🧐 解决方案(Solution)
18
+ placeholder: 如果你有解决方案,在这里清晰地阐述/If you have a solution, explain it clearly here
19
+ validations:
20
+ required: true
21
+ - type: textarea
22
+ attributes:
23
+ label: Additional context/其他信息
24
+ placeholder: 如截图等其他信息可以贴在这里/Other information such as screenshots can be posted here
25
+ validations:
26
+ required: false
@@ -0,0 +1,18 @@
1
+ <!-- You can erase any parts of this template not applicable to your Pull Request. -->
2
+
3
+ ## Description
4
+ <!-- 简要描述本次 PR 的改动内容 / Write a brief description of the changes introduced by this PR -->
5
+
6
+ ## Related Issues
7
+ <!--
8
+ Link to the issue that is fixed by this PR (if there is one)
9
+ e.g. Fixes #1234, Addresses #1234, Related to #1234, etc.
10
+ -->
11
+
12
+ ### Checklist:
13
+
14
+ * [ ] PR 目标分支为 `pyapp`,分支名符合 `pyapp/<site>-<topic>` 规范
15
+ * [ ] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?
16
+ * [ ] Have you linted your code with [ruff](https://docs.astral.sh/ruff/) locally prior to submission?
17
+ * [ ] Have you successfully ran `uv run acggr.py --check` with your changes locally? (UI 相关改动另附截图或说明 / attach screenshots or notes for UI changes)
18
+ * [ ] Have you respected the layer constraints (`app -> ui -> core -> res`, no reverse imports)?
@@ -0,0 +1,51 @@
1
+ """Smoke test for the built ``acggr-py`` wheel.
2
+
3
+ Runs under ``QT_QPA_PLATFORM=offscreen`` and ``ACGG_CHECK_MODE=1``: it only
4
+ verifies that the wheel installs and every layer imports cleanly. No GUI is
5
+ started.
6
+
7
+ The check-mode switch must short-circuit *before* ``QApplication``
8
+ construction inside ``app.start()``; nothing may import Qt widgets on this path.
9
+ """
10
+
11
+ import os
12
+ import subprocess
13
+ import sys
14
+
15
+
16
+ def run_test(name, cmd, env):
17
+ print(f"::group::{name}")
18
+ result = subprocess.run(cmd, env=env, text=True, capture_output=True)
19
+ if result.stdout:
20
+ print(result.stdout)
21
+ if result.stderr:
22
+ print(result.stderr, file=sys.stderr)
23
+ print(f"exit_code={result.returncode}")
24
+ print("::endgroup::")
25
+ return result.returncode
26
+
27
+
28
+ def main():
29
+ env = os.environ.copy()
30
+ tests = [
31
+ ("layer imports", [sys.executable, "-c",
32
+ "import app, core, ui, res"]),
33
+ ("version consistency", [sys.executable, "-c",
34
+ "import core; print(core.__version__)"]),
35
+ ("check mode startup", [sys.executable, "-c",
36
+ "import app; app.start()"]),
37
+ ("cli help (default)", ["acggr", "--help"]),
38
+ ("cli help (uvx target)", ["acggr-py", "--help"]),
39
+ ]
40
+
41
+ failures = []
42
+ for name, cmd in tests:
43
+ if run_test(name, cmd, env) != 0:
44
+ failures.append(name)
45
+
46
+ if failures:
47
+ raise SystemExit(f"Smoke tests failed: {', '.join(failures)}")
48
+
49
+
50
+ if __name__ == "__main__":
51
+ main()
@@ -0,0 +1,151 @@
1
+ name: Publish Update Feed
2
+
3
+ # Rewrites the machine-readable feed on the permanent `updater` release tag.
4
+ # Clients poll one fixed URL, so this workflow -- not the versioned release --
5
+ # owns that URL:
6
+ # https://github.com/<repo>/releases/download/updater/update.json
7
+ #
8
+ # Manual / repair entry point. The *automatic* refresh after a tag push lives
9
+ # inline in `release.yml`: a release created with the repo's GITHUB_TOKEN does
10
+ # not cascade a `release` event, and this file is hidden from plain `git add` by
11
+ # a developer-level global ignore (`.*/`), so the critical path must not depend
12
+ # on it. This workflow covers:
13
+ # - `workflow_dispatch`: backfill after a missed publish, or roll the feed back
14
+ # to an older tag;
15
+ # - `release: [published, prereleased]`: releases published by a human or by
16
+ # another token.
17
+ on:
18
+ release:
19
+ types: [published, prereleased]
20
+ workflow_dispatch:
21
+ inputs:
22
+ tag:
23
+ description: Release tag to publish (e.g. v0.2.0)
24
+ required: true
25
+ type: string
26
+
27
+ permissions:
28
+ contents: write
29
+
30
+ jobs:
31
+ publish:
32
+ runs-on: ubuntu-latest
33
+ # The feed release itself has tag `updater`, which is not a version: a
34
+ # human re-publishing that release must not feed its own tag back in.
35
+ if: github.event_name != 'release' || github.event.release.tag_name != 'updater'
36
+ steps:
37
+ - name: Checkout
38
+ uses: actions/checkout@v4
39
+ with:
40
+ fetch-depth: 1
41
+
42
+ - name: Resolve tag
43
+ id: tag
44
+ env:
45
+ EVENT_TAG: ${{ github.event.release.tag_name }}
46
+ DISPATCH_TAG: ${{ github.event.inputs.tag }}
47
+ CALL_TAG: ${{ inputs.tag }}
48
+ run: |
49
+ set -euo pipefail
50
+ # Dispatch input, then the reusable-workflow input, then the release
51
+ # event. Empty for every path that has nothing to publish.
52
+ tag="${DISPATCH_TAG:-${CALL_TAG:-$EVENT_TAG}}"
53
+ if [ -z "$tag" ]; then
54
+ echo "::error::no tag resolved (release event had no tag_name and no input)"
55
+ exit 1
56
+ fi
57
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
58
+ echo "resolved tag: $tag"
59
+
60
+ - name: Fetch release body and timestamp
61
+ id: notes
62
+ env:
63
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64
+ TAG: ${{ steps.tag.outputs.tag }}
65
+ run: |
66
+ set -euo pipefail
67
+ # `gh api` failure is fatal on purpose: an empty body would silently
68
+ # publish a feed without notes, which looks like a client bug later.
69
+ gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${TAG}" > "$RUNNER_TEMP/release.json"
70
+ python3 - "$RUNNER_TEMP" <<'PY'
71
+ import json, os, pathlib, sys
72
+
73
+ work = pathlib.Path(sys.argv[1])
74
+ data = json.loads((work / "release.json").read_text(encoding="utf-8"))
75
+ body = data.get("body") or ""
76
+ (work / "body.md").write_text(body, encoding="utf-8")
77
+ published_at = data.get("published_at") or ""
78
+ with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
79
+ fh.write(f"published_at={published_at}\n")
80
+ print(f"body_chars={len(body)} published_at={published_at}")
81
+ PY
82
+
83
+ - name: Compose feed
84
+ env:
85
+ TAG: ${{ steps.tag.outputs.tag }}
86
+ PUBLISHED_AT: ${{ steps.notes.outputs.published_at }}
87
+ run: |
88
+ set -euo pipefail
89
+ python3 deploy/scripts/compose_update_feed.py \
90
+ --tag "$TAG" \
91
+ --body-file "$RUNNER_TEMP/body.md" \
92
+ --published-at "$PUBLISHED_AT" \
93
+ --repo "$GITHUB_REPOSITORY" \
94
+ --output "$RUNNER_TEMP/update.json"
95
+
96
+ - name: Ensure the permanent updater release exists
97
+ env:
98
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99
+ run: |
100
+ set -euo pipefail
101
+ if gh release view updater >/dev/null 2>&1; then
102
+ echo "updater release already exists"
103
+ else
104
+ # Created once; every later run clobbers only update.json. Releases
105
+ # created with GITHUB_TOKEN do not cascade `release published`
106
+ # events, so this cannot re-enter the workflow.
107
+ gh release create updater \
108
+ --title "updater" \
109
+ --notes "Machine-readable update feed for shipped clients. Do not delete: update.json is polled at a fixed URL." \
110
+ --latest=false
111
+ fi
112
+
113
+ - name: Upload feed
114
+ env:
115
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116
+ run: |
117
+ set -euo pipefail
118
+ gh release upload updater "$RUNNER_TEMP/update.json" --clobber
119
+
120
+ - name: Verify the public feed
121
+ env:
122
+ TAG: ${{ steps.tag.outputs.tag }}
123
+ run: |
124
+ set -euo pipefail
125
+ url="https://github.com/${GITHUB_REPOSITORY}/releases/download/updater/update.json"
126
+ # The asset CDN can lag a few seconds behind the API; retry instead of
127
+ # reporting a red build for a cache miss.
128
+ for attempt in 1 2 3 4 5; do
129
+ if curl -fsSL --retry 2 --retry-delay 2 "$url" -o "$RUNNER_TEMP/public.json"; then
130
+ break
131
+ fi
132
+ echo "attempt ${attempt}: feed not reachable yet"
133
+ sleep 3
134
+ done
135
+ test -s "$RUNNER_TEMP/public.json"
136
+ python3 - "$RUNNER_TEMP/public.json" <<'PY'
137
+ import json, os, pathlib, sys
138
+
139
+ data = json.loads(pathlib.Path(sys.argv[1]).read_text(encoding="utf-8"))
140
+ required = {"version", "channel", "published_at", "notes", "release_url"}
141
+ missing = sorted(required - data.keys())
142
+ assert not missing, f"feed missing keys: {missing}"
143
+ # The fixed URL is a shared mutable address: a stale asset (CDN cache or
144
+ # a rollback someone forgot) would look fine field-wise, so compare the
145
+ # advertised version with the tag this run was told to publish.
146
+ expected = os.environ["TAG"].strip().lstrip("vV")
147
+ assert data["version"] == expected, f"feed version {data['version']!r} != tag {expected!r}"
148
+ assert data["channel"] in ("stable", "preview"), f"bad channel: {data['channel']!r}"
149
+ print(f"feed ok: version={data['version']} channel={data['channel']}")
150
+ PY
151
+ echo "feed published for ${TAG}: $url"
@@ -0,0 +1,218 @@
1
+ name: Release
2
+ permissions:
3
+ contents: write
4
+ pull-requests: write
5
+ id-token: write
6
+ on:
7
+ push:
8
+ tags:
9
+ - 'v*.*.*'
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ validate-and-publish-pypi:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 1
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v4
23
+ with:
24
+ enable-cache: false
25
+
26
+ - name: Verify tag matches package version
27
+ if: github.event_name != 'workflow_dispatch' && github.ref_type == 'tag'
28
+ run: |
29
+ # core/variables.py::__version__ is the single source of truth for the
30
+ # wheel version. Read it as text: no import, no Qt, no config writes.
31
+ # The step-level if already skips workflow_dispatch on Actions; this
32
+ # guard also makes the raw run block safe to simulate locally.
33
+ if [ "${GITHUB_EVENT_NAME:-}" = "workflow_dispatch" ] || [ "${GITHUB_REF_TYPE:-}" != "tag" ]; then
34
+ echo "non-tag ref: skip tag/version check"
35
+ exit 0
36
+ fi
37
+ version=$(sed -n 's/^__version__[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' core/variables.py | head -n1)
38
+ tag="${GITHUB_REF_NAME#v}"
39
+ echo "tag=$tag version=$version"
40
+ if [ -z "$version" ]; then
41
+ echo "::error::__version__ not found in core/variables.py" >&2
42
+ exit 1
43
+ fi
44
+ if [ "$tag" != "$version" ]; then
45
+ echo "::error::tag=$tag does not match __version__=$version (core/variables.py); bump __version__ before tagging" >&2
46
+ exit 1
47
+ fi
48
+ echo "tag/version match: $version"
49
+
50
+ - name: Build package
51
+ run: uv build
52
+
53
+ - name: Install Qt runtime libs for smoke test
54
+ uses: tlambert03/setup-qt-libs@v1
55
+
56
+ - name: Smoke test wheel before publish
57
+ env:
58
+ QT_QPA_PLATFORM: offscreen
59
+ ACGG_CHECK_MODE: "1"
60
+ LOCALAPPDATA: ${{ runner.temp }}/acggr_la
61
+ XDG_CONFIG_HOME: ${{ runner.temp }}/acggr_xdg
62
+ run: |
63
+ uv venv .venv-smoke
64
+ source .venv-smoke/bin/activate
65
+ uv pip install dist/*.whl
66
+ uv run .github/scripts/smoke_wheel.py
67
+
68
+ - name: Publish to PyPI
69
+ run: uv publish
70
+
71
+ create-release:
72
+ needs: validate-and-publish-pypi
73
+ runs-on: ubuntu-latest
74
+ steps:
75
+ - name: Checkout code
76
+ uses: actions/checkout@v4
77
+ with:
78
+ fetch-depth: 1
79
+
80
+ - name: Compose Release Notes
81
+ id: compose_notes
82
+ run: |
83
+ TAG_NAME="${GITHUB_REF#refs/tags/}"
84
+ echo "version: $TAG_NAME"
85
+ base=$(cat docs/_github/release_notes.md)
86
+
87
+ case "$TAG_NAME" in
88
+ *beta*)
89
+ extra=$(cat docs/_github/preset_preview.md)
90
+ echo "is_beta=true" >> $GITHUB_OUTPUT
91
+ ;;
92
+ *)
93
+ extra=$(cat docs/_github/preset_stable.md)
94
+ echo "is_beta=false" >> $GITHUB_OUTPUT
95
+ ;;
96
+ esac
97
+
98
+ # printf, not `echo "$base\n$extra"`: bash's builtin echo does not expand
99
+ # \n without -e, so the literal two characters ended up in the release
100
+ # body -- which the in-app update dialog now renders verbatim.
101
+ printf '%s\n\n%s\n' "$base" "$extra" > /tmp/full_body.md
102
+
103
+ - name: Create Release
104
+ uses: softprops/action-gh-release@v1
105
+ with:
106
+ tag_name: ${{ github.ref }}
107
+ name: ${{ github.ref_name }}
108
+ prerelease: ${{ steps.compose_notes.outputs.is_beta == 'true' }}
109
+ body_path: /tmp/full_body.md
110
+ env:
111
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112
+
113
+ publish-update-feed:
114
+ # Same run as the release, and inlined rather than `uses:` a reusable
115
+ # workflow, for two independent reasons:
116
+ # 1. a release created with the repo's GITHUB_TOKEN does not emit a
117
+ # cascading `release` event, so an event-triggered job never fires on a
118
+ # normal tag push;
119
+ # 2. `.github/workflows/publish-update-feed.yml` is hidden from plain
120
+ # `git add` by a developer-level global ignore (`.*/`), so `uses:` would
121
+ # point at a file CI may not have.
122
+ # The standalone workflow remains for manual backfill/rollback of a tag.
123
+ if: github.ref_type == 'tag'
124
+ needs: create-release
125
+ permissions:
126
+ contents: write
127
+ runs-on: ubuntu-latest
128
+ steps:
129
+ - name: Checkout
130
+ uses: actions/checkout@v4
131
+ with:
132
+ fetch-depth: 1
133
+
134
+ - name: Fetch release body and timestamp
135
+ id: notes
136
+ env:
137
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138
+ run: |
139
+ set -euo pipefail
140
+ # `gh api` failure is fatal on purpose: an empty body would silently
141
+ # publish a feed without notes, which looks like a client bug later.
142
+ gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${GITHUB_REF_NAME}" > "$RUNNER_TEMP/release.json"
143
+ python3 - "$RUNNER_TEMP" <<'PY'
144
+ import json, os, pathlib, sys
145
+
146
+ work = pathlib.Path(sys.argv[1])
147
+ data = json.loads((work / "release.json").read_text(encoding="utf-8"))
148
+ body = data.get("body") or ""
149
+ (work / "body.md").write_text(body, encoding="utf-8")
150
+ published_at = data.get("published_at") or ""
151
+ with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
152
+ fh.write(f"published_at={published_at}\n")
153
+ print(f"body_chars={len(body)} published_at={published_at}")
154
+ PY
155
+
156
+ - name: Compose feed
157
+ env:
158
+ PUBLISHED_AT: ${{ steps.notes.outputs.published_at }}
159
+ run: |
160
+ set -euo pipefail
161
+ python3 deploy/scripts/compose_update_feed.py \
162
+ --tag "$GITHUB_REF_NAME" \
163
+ --body-file "$RUNNER_TEMP/body.md" \
164
+ --published-at "$PUBLISHED_AT" \
165
+ --repo "$GITHUB_REPOSITORY" \
166
+ --output "$RUNNER_TEMP/update.json"
167
+
168
+ - name: Ensure the permanent updater release exists
169
+ env:
170
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
171
+ run: |
172
+ set -euo pipefail
173
+ if gh release view updater >/dev/null 2>&1; then
174
+ echo "updater release already exists"
175
+ else
176
+ # Created once; every later run clobbers only update.json. Releases
177
+ # created with GITHUB_TOKEN do not cascade `release published`
178
+ # events, so this cannot re-enter the workflow.
179
+ gh release create updater \
180
+ --title "updater" \
181
+ --notes "Machine-readable update feed for shipped clients. Do not delete: update.json is polled at a fixed URL." \
182
+ --latest=false
183
+ fi
184
+
185
+ - name: Upload feed
186
+ env:
187
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188
+ run: |
189
+ set -euo pipefail
190
+ gh release upload updater "$RUNNER_TEMP/update.json" --clobber
191
+
192
+ - name: Verify the public feed
193
+ run: |
194
+ set -euo pipefail
195
+ url="https://github.com/${GITHUB_REPOSITORY}/releases/download/updater/update.json"
196
+ # The asset CDN can lag a few seconds behind the API; retry instead of
197
+ # reporting a red build for a cache miss.
198
+ for attempt in 1 2 3 4 5; do
199
+ if curl -fsSL --retry 2 --retry-delay 2 "$url" -o "$RUNNER_TEMP/public.json"; then
200
+ break
201
+ fi
202
+ echo "attempt ${attempt}: feed not reachable yet"
203
+ sleep 3
204
+ done
205
+ test -s "$RUNNER_TEMP/public.json"
206
+ python3 - "$RUNNER_TEMP/public.json" "$GITHUB_REF_NAME" <<'PY'
207
+ import json, pathlib, sys
208
+
209
+ data = json.loads(pathlib.Path(sys.argv[1]).read_text(encoding="utf-8"))
210
+ required = {"version", "channel", "published_at", "notes", "release_url"}
211
+ missing = sorted(required - data.keys())
212
+ assert not missing, f"feed missing keys: {missing}"
213
+ tag = sys.argv[2].lstrip("vV")
214
+ assert data["version"] == tag, f"feed version {data['version']!r} != tag {tag!r}"
215
+ assert data["channel"] in {"stable", "preview"}, f"bad channel {data['channel']!r}"
216
+ print(f"feed ok: version={data['version']} channel={data['channel']}")
217
+ PY
218
+ echo "feed published for ${GITHUB_REF_NAME}: $url"
@@ -0,0 +1,135 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+
7
+ ##----------idea----------
8
+ *.iml
9
+ .idea/
10
+ *.ipr
11
+ *.iws
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ pip-wheel-metadata/
28
+ share/python-wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+ node_modules/
34
+
35
+ # Translations: res/i18n/<lang>.yml is the only tracked file. res/i18n compiles
36
+ # it to <lang>.qm on launch (PySide6 lupdate + lrelease); the .ts is a temp file
37
+ # and the .hash is the compile cache stamp. None of them belong in git.
38
+ *.po
39
+ *.mo
40
+ *.pot
41
+ *.hash
42
+ *.ts
43
+ *.qm
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ .py,cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+
59
+ # Local logs / databases
60
+ *.log
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # GUI related
65
+ *.ui
66
+ source/
67
+
68
+ # vscode
69
+ .vscode
70
+
71
+ # Environments
72
+ .env
73
+ .venv
74
+ env/
75
+ venv/
76
+ ENV/
77
+ env.bak/
78
+ venv.bak/
79
+ .venv-smoke/
80
+
81
+ # mypy
82
+ .mypy_cache/
83
+ .dmypy.json
84
+ dmypy.json
85
+
86
+ # ----------acggr local (never tracked)----------
87
+ # Local test scripts & probes: kept locally, never committed
88
+ test/
89
+ __temp/
90
+ plans/
91
+ *.db*
92
+ version.json
93
+ desc.html
94
+ nul
95
+ data/
96
+ outputs/
97
+ private_*.json
98
+ *test*.py
99
+ *_local.yml
100
+ *.lock
101
+
102
+ # ----------resources----------
103
+ # Track ONLY the compiled rcc module (res/material_ct.py): every byte of the
104
+ # .qrc and of the svg/png/ico it packs is already inlined into that module, so
105
+ # tracking the sources too would store the same resources twice. This is the
106
+ # upstream GUI project's arrangement (see harness/docs/res-assets.md).
107
+ #
108
+ # The .qrc and the raw assets stay local (regenerate the module with
109
+ # `pyside6-rcc res/app.qrc -o res/material_ct.py`); the repo-root logo.png is
110
+ # the one original that IS tracked, because README.md shows it directly.
111
+ *.rcc
112
+ *.qrc
113
+ res/*.svg
114
+ res/*.png
115
+ res/*.ico
116
+
117
+ # OSX
118
+ *~
119
+ .DS_Store
120
+
121
+ # ----------agent harness (local only)----------
122
+ # Probes/guards and architecture contracts live here for development and AI
123
+ # sessions; they are working knowledge, not part of the shipped repository.
124
+ harness/
125
+
126
+ # AI
127
+ .cursor
128
+ .claude
129
+ .codex
130
+ .gemini
131
+ .kilocode
132
+ .ace-tool/
133
+ openspec/
134
+ .omc
135
+ *.*ai