-
Notifications
You must be signed in to change notification settings - Fork 1.4k
improve deps CI formatting and name resolution #6847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds module-name resolution and redirection for dependency analysis: maps hard-dep names to parent modules, recognizes Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Workflow
participant FS as Repository (Lib/, scripts/)
participant Deps as deps.py
participant Show as show_deps.py
participant API as Comments API
GH->>FS: Trigger lib-deps-check job
FS->>Deps: Collect imports (including Lib/test/*)
Deps->>Deps: parse_test_imports (handle "import test.x")
Deps->>Deps: resolve_hard_dep_parent(name)
Deps-->>Show: Emit resolved module list
Show->>Show: _resolve_module_name -> dedupe & format
Show->>API: Post/update dependency comment (recreate: true)
API-->>GH: Comment updated
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
|
Code has been automatically formatted The code in this PR has been formatted using:
git pull origin deps-ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@scripts/update_lib/show_deps.py`:
- Around line 161-171: The import list in scripts/update_lib/show_deps.py
includes unused symbols—remove pathlib, parse_lib_imports, and safe_read_text
from the top-level imports since they are not used in format_deps (pathlib is
imported where needed in _resolve_module_name); update the import block that
currently brings in DEPENDENCIES, find_dependent_tests_tree, get_lib_paths,
get_test_paths, parse_lib_imports, resolve_hard_dep_parent to drop
parse_lib_imports and remove the separate safe_read_text and pathlib imports so
only actually used symbols remain.
Summary by CodeRabbit
Improvements
Style
✏️ Tip: You can customize this high-level summary in your review settings.