Skip to content

部分app的debug函数修改,适配框架更新 - #591

Open
JoshCai233 wants to merge 2 commits into
OneDragon-Anything:mainfrom
JoshCai233:部分app的debug函数修改

Hidden character warning

The head ref may contain hidden characters: "\u90e8\u5206app\u7684debug\u51fd\u6570\u4fee\u6539"
Open

部分app的debug函数修改,适配框架更新#591
JoshCai233 wants to merge 2 commits into
OneDragon-Anything:mainfrom
JoshCai233:部分app的debug函数修改

Conversation

@JoshCai233

@JoshCai233 JoshCai233 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

发布说明

  • 重构
    • 优化了应用初始化流程,提升系统启动稳定性和一致性。

Review Change Stack

@JoshCai233 JoshCai233 changed the title 部分app的debug函数修改 部分app的debug函数修改,适配框架更新 May 15, 2026
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 64d2c32a-7021-4120-94f2-5b32840c9405

📥 Commits

Reviewing files that changed from the base of the PR and between 7870dc9 and fe605d2.

📒 Files selected for processing (12)
  • src/sr_od/application/assignments/assignments_app.py
  • src/sr_od/application/daily_training/daily_training_app.py
  • src/sr_od/application/echo_of_war/echo_of_war_app.py
  • src/sr_od/application/large_map_recorder/large_map_recorder_app.py
  • src/sr_od/application/nameless_honor/nameless_honor_app.py
  • src/sr_od/application/notify/notify_app.py
  • src/sr_od/application/one_dragon_app/sr_one_dragon_app.py
  • src/sr_od/application/relic_salvage/relic_salvage_app.py
  • src/sr_od/application/sim_universe/sim_uni_app.py
  • src/sr_od/application/trailblaze_power/trailblaze_power_app.py
  • src/sr_od/application/trick_snack/trick_snack_app.py
  • src/sr_od/application/world_patrol/world_patrol_app.py

总览

该 PR 在 12 个应用模块的调试入口中统一重构了 SrContext 初始化流程:将 init_by_config() 替换为 init(),部分应用增加了显式的应用 ID 绑定和更新的上下文启动方法调用。

变更

上下文初始化统一重构

层 / 文件(s) 摘要
简化初始化方法的应用
src/sr_od/application/notify/notify_app.py, src/sr_od/application/one_dragon_app/sr_one_dragon_app.py, src/sr_od/application/relic_salvage/relic_salvage_app.py, src/sr_od/application/trick_snack/trick_snack_app.py, src/sr_od/application/world_patrol/world_patrol_app.py
5 个应用模块在 __debug() 入口中将 SrContext 初始化方法从 ctx.init_by_config() 替换为 ctx.init()
显式应用 ID 绑定的初始化
src/sr_od/application/assignments/assignments_app.py, src/sr_od/application/daily_training/daily_training_app.py, src/sr_od/application/echo_of_war/echo_of_war_app.py, src/sr_od/application/nameless_honor/nameless_honor_app.py, src/sr_od/application/sim_universe/sim_uni_app.py, src/sr_od/application/trailblaze_power/trailblaze_power_app.py
6 个应用模块在 ctx.init() 后显式设置 ctx.run_context.current_app_id,并通过 ctx.run_context.start_running() 启动运行上下文。
模式感知的条件初始化
src/sr_od/application/large_map_recorder/large_map_recorder_app.py
大地图记录器应用根据运行模式(screenshot 或 all)对 context 启动进行条件调整,仅在 screenshot 模式时调用 ctx.run_context.start_running()

代码审查工作量

🎯 2 (Simple) | ⏱️ ~12 分钟

诗歌

十二个应用齐步走,
初始化路径焕新颜,
init() 统一新秩序,
应用 ID 明确绑,
重构如春风化雨——
🐰 兔兔用魔法统整了神铁上的一切

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题清晰准确地反映了主要变更内容:多个应用的debug函数已修改以适配框架更新,总结了所有10个文件的核心改动。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant