improve deps CI formatting and name resolution by youknowone · Pull Request #6847 · RustPython/RustPython
Caution
Review failed
The pull request is closed.
📝 Walkthrough
Walkthrough
Adds module-name resolution and redirection for dependency analysis: maps hard-dep names to parent modules, recognizes import test.x patterns, resolves/deduplicates module names in show_deps output, and tweaks workflow/test-file handling and todo-list formatting. (≤50 words)
Changes
| Cohort / File(s) | Summary |
|---|---|
Workflow Config .github/workflows/lib-deps-check.yaml |
Derive module names for files under Lib/test/* (include test_ modules rather than skipping); use recreate: true when posting dependency comments. |
Dependency Parsing scripts/update_lib/deps.py |
Add `resolve_hard_dep_parent(name: str) -> str |
Dependency Display / Resolution scripts/update_lib/show_deps.py |
Add _resolve_module_name() and integrate resolution: redirect test_ modules, map hard-deps to parents, resolve/dedupe input names while preserving order, and adjust whitespace/section formatting. |
Todo Output Formatting scripts/update_lib/show_todo.py |
Prepend a literal "-" field to formatted todo lines (cosmetic formatting change). |
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
- improve deps CI formatting and name resolution #6847: Appears to contain overlapping changes to
deps.py,show_deps.py, and the workflow/test-file handling—likely the closest duplicate. - [update_lib] show dependent tests in
depssubcommand #6828: Modifies test-import parsing and relatedscripts/update_liblogic (overlaps with parse_test_imports changes). - update_lib hard dependency resolver #6817: Adds hard-dep parent resolution and integrates it into dependency display (closely related to resolve_hard_dep_parent usage).
Suggested labels
skip:ci
Suggested reviewers
- moreal
- ShaharNaveh
Poem
🐰
I nibble through imports, quick and spry,
Hard parents found beneath the sky,
Test modules hop into the list,
Dedupe dance — none will be missed,
Hooray, the deps are neat and spry!
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title 'improve deps CI formatting and name resolution' accurately reflects the main changes across all modified files, which focus on enhancing CI workflow formatting and adding module name resolution logic. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
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 @coderabbitai help to get the list of available commands and usage tips.